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,7 +3152,7 @@ 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 ;
3155+ if (ctx == NULL || ctx -> pkey == NULL ) return WOLFSSL_FAILURE ;
31563156 WOLFSSL_ENTER ("wolfSSL_EVP_PKEY_decrypt_init" );
31573157 switch (ctx -> pkey -> type ) {
31583158 case WC_EVP_PKEY_RSA :
@@ -3256,7 +3256,7 @@ 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 ;
3259+ if (ctx == NULL || ctx -> pkey == NULL ) return WOLFSSL_FAILURE ;
32603260 WOLFSSL_ENTER ("wolfSSL_EVP_PKEY_encrypt_init" );
32613261
32623262 switch (ctx -> pkey -> type ) {
You can’t perform that action at this time.
0 commit comments