Skip to content

Commit

Permalink
make unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyRosenblum committed Oct 3, 2024
1 parent 748bfb2 commit 4f959d0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 16 deletions.
16 changes: 0 additions & 16 deletions api/s2n.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,22 +241,6 @@ S2N_API extern int s2n_init(void);
*/
S2N_API extern int s2n_cleanup(void);

/**
* Cleans up any internal thread-local resources used by s2n-tls. This function is called by `s2n_cleanup`, but depending on your
* thread management model, it may be called directly instead. See [Initialization](https://github.com/aws/s2n-tls/blob/main/docs/usage-guide/topics/ch02-initializing.md) for details.
*
* @returns S2N_SUCCESS on success. S2N_FAILURE on failure
*/
S2N_API extern int s2n_cleanup_thread(void);

/**
* Cleans up any global resources used by s2n-tls. This function is called by `s2n_cleanup`, but depending on your
* thread management model, it may be called directly instead. See [Initialization](https://github.com/aws/s2n-tls/blob/main/docs/usage-guide/topics/ch02-initializing.md) for details.
*
* @returns S2N_SUCCESS on success. S2N_FAILURE on failure
*/
S2N_API extern int s2n_cleanup_final(void);

typedef enum {
S2N_FIPS_MODE_DISABLED = 0,
S2N_FIPS_MODE_ENABLED,
Expand Down
34 changes: 34 additions & 0 deletions api/unstable/cleanup.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

#pragma once

#include <s2n.h>

/**
* Cleans up any internal thread-local resources used by s2n-tls. This function is called by `s2n_cleanup`, but depending on your
* thread management model, it may be called directly instead. See [Initialization](https://github.com/aws/s2n-tls/blob/main/docs/usage-guide/topics/ch02-initializing.md) for details.
*
* @returns S2N_SUCCESS on success. S2N_FAILURE on failure
*/
S2N_API extern int s2n_cleanup_thread(void);

/**
* Cleans up any global resources used by s2n-tls. This function is called by `s2n_cleanup`, but depending on your
* thread management model, it may be called directly instead. See [Initialization](https://github.com/aws/s2n-tls/blob/main/docs/usage-guide/topics/ch02-initializing.md) for details.
*
* @returns S2N_SUCCESS on success. S2N_FAILURE on failure
*/
S2N_API extern int s2n_cleanup_final(void);
1 change: 1 addition & 0 deletions utils/s2n_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <pthread.h>

#include "api/unstable/cleanup.h"
#include "crypto/s2n_fips.h"
#include "crypto/s2n_libcrypto.h"
#include "crypto/s2n_locking.h"
Expand Down

0 comments on commit 4f959d0

Please sign in to comment.