forked from wolfSSL/wolfssl
revert BN_CTX_init stub for older applications
This commit is contained in:
21
src/ssl_bn.c
21
src/ssl_bn.c
@@ -2382,6 +2382,27 @@ WOLFSSL_BN_CTX* wolfSSL_BN_CTX_new(void)
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_WOLFSSL_STUB
|
||||
/* deprecated
|
||||
*
|
||||
* Initialize a BN context object.
|
||||
* This function was removed in OpenSSL 1.1.0 and later.
|
||||
* Keeping a stub function here for older applications that have BN_CTX_init()
|
||||
* calls.
|
||||
*
|
||||
* @param [in] ctx Dummy BN context.
|
||||
*/
|
||||
void wolfSSL_BN_CTX_init(WOLFSSL_BN_CTX* ctx)
|
||||
{
|
||||
(void)ctx;
|
||||
WOLFSSL_ENTER("wolfSSL_BN_CTX_init");
|
||||
WOLFSSL_STUB("wolfSSL_BN_CTX_init");
|
||||
WOLFSSL_MSG("wolfSSL_BN_CTX_init is deprecated");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Free a BN context object.
|
||||
*
|
||||
* @param [in] ctx BN context object.
|
||||
|
@@ -28725,6 +28725,9 @@ static int test_wolfSSL_BN_CTX(void)
|
||||
|
||||
ExpectNotNull(bn_ctx = BN_CTX_new());
|
||||
|
||||
/* No implementation. */
|
||||
BN_CTX_init(NULL);
|
||||
|
||||
ExpectNull(BN_CTX_get(NULL));
|
||||
ExpectNotNull(BN_CTX_get(bn_ctx));
|
||||
ExpectNotNull(BN_CTX_get(bn_ctx));
|
||||
|
@@ -88,6 +88,7 @@ typedef struct WOLFSSL_BN_MONT_CTX WOLFSSL_BN_MONT_CTX;
|
||||
typedef struct WOLFSSL_BN_GENCB WOLFSSL_BN_GENCB;
|
||||
|
||||
WOLFSSL_API WOLFSSL_BN_CTX* wolfSSL_BN_CTX_new(void);
|
||||
WOLFSSL_API void wolfSSL_BN_CTX_init(WOLFSSL_BN_CTX* ctx);
|
||||
WOLFSSL_API void wolfSSL_BN_CTX_free(WOLFSSL_BN_CTX* ctx);
|
||||
|
||||
WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_BN_new(void);
|
||||
|
Reference in New Issue
Block a user