forked from wolfSSL/wolfssl
Remove BN_CTX_init as its no longer in OpenSSL for a long time
This commit is contained in:
15
src/ssl_bn.c
15
src/ssl_bn.c
@@ -2380,25 +2380,12 @@ WOLFSSL_BN_CTX* wolfSSL_BN_CTX_new(void)
|
|||||||
ctx = (WOLFSSL_BN_CTX*)XMALLOC(sizeof(WOLFSSL_BN_CTX), NULL,
|
ctx = (WOLFSSL_BN_CTX*)XMALLOC(sizeof(WOLFSSL_BN_CTX), NULL,
|
||||||
DYNAMIC_TYPE_OPENSSL);
|
DYNAMIC_TYPE_OPENSSL);
|
||||||
if (ctx != NULL) {
|
if (ctx != NULL) {
|
||||||
wolfSSL_BN_CTX_init(ctx);
|
XMEMSET(ctx, 0, sizeof(WOLFSSL_BN_CTX));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize a BN context object.
|
|
||||||
*
|
|
||||||
* @param [in] ctx BN context object.
|
|
||||||
*/
|
|
||||||
void wolfSSL_BN_CTX_init(WOLFSSL_BN_CTX* ctx)
|
|
||||||
{
|
|
||||||
WOLFSSL_ENTER("wolfSSL_BN_CTX_init");
|
|
||||||
if (ctx != NULL) {
|
|
||||||
XMEMSET(ctx, 0, sizeof(WOLFSSL_BN_CTX));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Free a BN context object.
|
/* Free a BN context object.
|
||||||
*
|
*
|
||||||
* @param [in] ctx BN context object.
|
* @param [in] ctx BN context object.
|
||||||
|
@@ -62646,9 +62646,6 @@ static int test_wolfSSL_BN_CTX(void)
|
|||||||
|
|
||||||
ExpectNotNull(bn_ctx = BN_CTX_new());
|
ExpectNotNull(bn_ctx = BN_CTX_new());
|
||||||
|
|
||||||
/* No implementation. */
|
|
||||||
BN_CTX_init(NULL);
|
|
||||||
|
|
||||||
ExpectNull(BN_CTX_get(NULL));
|
ExpectNull(BN_CTX_get(NULL));
|
||||||
ExpectNotNull(BN_CTX_get(bn_ctx));
|
ExpectNotNull(BN_CTX_get(bn_ctx));
|
||||||
ExpectNotNull(BN_CTX_get(bn_ctx));
|
ExpectNotNull(BN_CTX_get(bn_ctx));
|
||||||
|
@@ -88,7 +88,6 @@ typedef struct WOLFSSL_BN_MONT_CTX WOLFSSL_BN_MONT_CTX;
|
|||||||
typedef struct WOLFSSL_BN_GENCB WOLFSSL_BN_GENCB;
|
typedef struct WOLFSSL_BN_GENCB WOLFSSL_BN_GENCB;
|
||||||
|
|
||||||
WOLFSSL_API WOLFSSL_BN_CTX* wolfSSL_BN_CTX_new(void);
|
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 void wolfSSL_BN_CTX_free(WOLFSSL_BN_CTX* ctx);
|
||||||
|
|
||||||
WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_BN_new(void);
|
WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_BN_new(void);
|
||||||
@@ -215,7 +214,6 @@ typedef WOLFSSL_BN_MONT_CTX BN_MONT_CTX;
|
|||||||
typedef WOLFSSL_BN_GENCB BN_GENCB;
|
typedef WOLFSSL_BN_GENCB BN_GENCB;
|
||||||
|
|
||||||
#define BN_CTX_new wolfSSL_BN_CTX_new
|
#define BN_CTX_new wolfSSL_BN_CTX_new
|
||||||
#define BN_CTX_init wolfSSL_BN_CTX_init
|
|
||||||
#define BN_CTX_free wolfSSL_BN_CTX_free
|
#define BN_CTX_free wolfSSL_BN_CTX_free
|
||||||
|
|
||||||
#define BN_new wolfSSL_BN_new
|
#define BN_new wolfSSL_BN_new
|
||||||
|
Reference in New Issue
Block a user