mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-02-04 03:25:05 +01:00
Rebase and make wolfSSL_CTX_up_ref always available
`wolfSSL_CTX_up_ref` is a small and potentially useful API for users so it doesn't need to be restricted only to the compatibility layer. The reference counting mechanisms are always available anyway. This just exposes the functionality to the user.
This commit is contained in:
@@ -547,14 +547,12 @@ WOLFSSL_CTX* wolfSSL_CTX_new(WOLFSSL_METHOD* method)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
/* increases CTX reference count to track proper time to "free" */
|
||||
int wolfSSL_CTX_up_ref(WOLFSSL_CTX* ctx)
|
||||
{
|
||||
int refCount = SSL_CTX_RefCount(ctx, 1);
|
||||
return ((refCount > 1) ? WOLFSSL_SUCCESS : WOLFSSL_FAILURE);
|
||||
}
|
||||
#endif
|
||||
|
||||
WOLFSSL_ABI
|
||||
void wolfSSL_CTX_free(WOLFSSL_CTX* ctx)
|
||||
|
||||
Reference in New Issue
Block a user