File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2382,6 +2382,27 @@ WOLFSSL_BN_CTX* wolfSSL_BN_CTX_new(void)
23822382 return ctx ;
23832383}
23842384
2385+
2386+ #ifndef NO_WOLFSSL_STUB
2387+ /* deprecated
2388+ *
2389+ * Initialize a BN context object.
2390+ * This function was removed in OpenSSL 1.1.0 and later.
2391+ * Keeping a stub function here for older applications that have BN_CTX_init()
2392+ * calls.
2393+ *
2394+ * @param [in] ctx Dummy BN context.
2395+ */
2396+ void wolfSSL_BN_CTX_init (WOLFSSL_BN_CTX * ctx )
2397+ {
2398+ (void )ctx ;
2399+ WOLFSSL_ENTER ("wolfSSL_BN_CTX_init" );
2400+ WOLFSSL_STUB ("wolfSSL_BN_CTX_init" );
2401+ WOLFSSL_MSG ("wolfSSL_BN_CTX_init is deprecated" );
2402+ }
2403+ #endif
2404+
2405+
23852406/* Free a BN context object.
23862407 *
23872408 * @param [in] ctx BN context object.
Original file line number Diff line number Diff line change @@ -28725,6 +28725,9 @@ static int test_wolfSSL_BN_CTX(void)
2872528725
2872628726 ExpectNotNull(bn_ctx = BN_CTX_new());
2872728727
28728+ /* No implementation. */
28729+ BN_CTX_init(NULL);
28730+
2872828731 ExpectNull(BN_CTX_get(NULL));
2872928732 ExpectNotNull(BN_CTX_get(bn_ctx));
2873028733 ExpectNotNull(BN_CTX_get(bn_ctx));
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ typedef struct WOLFSSL_BN_MONT_CTX WOLFSSL_BN_MONT_CTX;
8888typedef struct WOLFSSL_BN_GENCB WOLFSSL_BN_GENCB ;
8989
9090WOLFSSL_API WOLFSSL_BN_CTX * wolfSSL_BN_CTX_new (void );
91+ WOLFSSL_API void wolfSSL_BN_CTX_init (WOLFSSL_BN_CTX * ctx );
9192WOLFSSL_API void wolfSSL_BN_CTX_free (WOLFSSL_BN_CTX * ctx );
9293
9394WOLFSSL_API WOLFSSL_BIGNUM * wolfSSL_BN_new (void );
You can’t perform that action at this time.
0 commit comments