File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3152,8 +3152,8 @@ int wolfSSL_EVP_PKEY_decrypt(WOLFSSL_EVP_PKEY_CTX *ctx,
31523152 */
31533153int wolfSSL_EVP_PKEY_decrypt_init (WOLFSSL_EVP_PKEY_CTX * ctx )
31543154{
3155- if (ctx == NULL ) return WOLFSSL_FAILURE ;
31563155 WOLFSSL_ENTER ("wolfSSL_EVP_PKEY_decrypt_init" );
3156+ if (ctx == NULL || ctx -> pkey == NULL ) return WOLFSSL_FAILURE ;
31573157 switch (ctx -> pkey -> type ) {
31583158 case WC_EVP_PKEY_RSA :
31593159 ctx -> op = WC_EVP_PKEY_OP_DECRYPT ;
@@ -3256,8 +3256,8 @@ int wolfSSL_EVP_PKEY_encrypt(WOLFSSL_EVP_PKEY_CTX *ctx,
32563256 */
32573257int wolfSSL_EVP_PKEY_encrypt_init (WOLFSSL_EVP_PKEY_CTX * ctx )
32583258{
3259- if (ctx == NULL ) return WOLFSSL_FAILURE ;
32603259 WOLFSSL_ENTER ("wolfSSL_EVP_PKEY_encrypt_init" );
3260+ if (ctx == NULL || ctx -> pkey == NULL ) return WOLFSSL_FAILURE ;
32613261
32623262 switch (ctx -> pkey -> type ) {
32633263 case WC_EVP_PKEY_RSA :
You can’t perform that action at this time.
0 commit comments