diff --git a/tests/api.c b/tests/api.c index 7980af8f1..1824f865c 100644 --- a/tests/api.c +++ b/tests/api.c @@ -36089,6 +36089,7 @@ static void test_wolfSSL_EVP_PKEY_derive(void) #endif /* OPENSSL_ALL */ } +#ifndef NO_RSA static void test_wolfSSL_RSA_padding_add_PKCS1_PSS(void) { #if defined(OPENSSL_ALL) && defined(WC_RSA_PSS) && !defined(WC_NO_RNG) @@ -36111,6 +36112,7 @@ static void test_wolfSSL_RSA_padding_add_PKCS1_PSS(void) #endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */ #endif /* OPENSSL_ALL && WC_RSA_PSS && !WC_NO_RNG*/ } +#endif static void test_wolfSSL_EC_get_builtin_curves(void) { @@ -36757,16 +36759,15 @@ static void test_wolfSSL_EVP_PKEY_sign(void) /* error cases */ AssertIntNE(EVP_PKEY_sign_init(NULL), WOLFSSL_SUCCESS); - ctx->pkey->type = EVP_PKEY_RSA2; - AssertIntNE(EVP_PKEY_sign_init(ctx), WOLFSSL_SUCCESS); + ctx->pkey->type = EVP_PKEY_RSA; + AssertIntEQ(EVP_PKEY_sign_init(ctx), WOLFSSL_SUCCESS); AssertIntNE(EVP_PKEY_sign(NULL, sig, &siglen, (byte*)in, inlen), WOLFSSL_SUCCESS); - AssertIntNE(EVP_PKEY_sign(ctx, sig, &siglen, (byte*)in, inlen), + AssertIntEQ(EVP_PKEY_sign(ctx, sig, &siglen, (byte*)in, inlen), WOLFSSL_SUCCESS); EVP_PKEY_free(pkey); EVP_PKEY_CTX_free(ctx); - wolfSSL_RSA_free(rsa); XFREE(sig, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); XFREE(sigVerify, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); #endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */ @@ -40508,7 +40509,9 @@ void ApiTest(void) test_wolfSSL_OCSP_resp_count(); test_wolfSSL_OCSP_resp_get0(); test_wolfSSL_EVP_PKEY_derive(); +#ifndef NO_RSA test_wolfSSL_RSA_padding_add_PKCS1_PSS(); +#endif #if defined(OPENSSL_ALL) test_wolfSSL_X509_PUBKEY_get(); diff --git a/wolfssl/openssl/evp.h b/wolfssl/openssl/evp.h index 9a26b6d72..98cc122f0 100644 --- a/wolfssl/openssl/evp.h +++ b/wolfssl/openssl/evp.h @@ -928,7 +928,6 @@ typedef WOLFSSL_EVP_CIPHER_CTX EVP_CIPHER_CTX; #define EVP_R_PRIVATE_KEY_DECODE_ERROR (-MIN_CODE_E + 100 + 4) #define EVP_PKEY_NONE NID_undef -#define EVP_PKEY_RSA2 19 #define EVP_PKEY_DH 28 #define EVP_CIPHER_mode WOLFSSL_CIPHER_mode /* WOLFSSL_EVP_CIPHER is just the string name of the cipher */