Skip to content

Commit 2e7a1b2

Browse files
committed
No more OPENSSL_ALL
1 parent 8fadecb commit 2e7a1b2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tests/api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14431,7 +14431,7 @@ static int test_wolfSSL_X509_ACERT_misc_api(void)
1443114431
{
1443214432
EXPECT_DECLS;
1443314433
#if defined(WOLFSSL_ACERT) && !defined(NO_CERTS) && !defined(NO_RSA) && \
14434-
!defined(NO_FILESYSTEM) && defined(OPENSSL_EXTRA)
14434+
!defined(NO_FILESYSTEM) && defined(WC_RSA_PSS)
1443514435
const char * acerts[4] = {"certs/acert/acert.pem",
1443614436
"certs/acert/acert_ietf.pem",
1443714437
"certs/acert/rsa_pss/acert.pem",
@@ -24189,7 +24189,7 @@ static int test_wolfSSL_PEM_read_PrivateKey(void)
2418924189
#ifndef NO_DH
2419024190
/* Read in a DH key. */
2419124191
ExpectTrue((file = XFOPEN(fname_dh, "rb")) != XBADFILE);
24192-
#if (defined(WOLFSSL_QT) || defined(OPENSSL_ALL) || \
24192+
#if (defined(WOLFSSL_QT) || defined(WC_RSA_PSS) || \
2419324193
defined(WOLFSSL_OPENSSH)) && (!defined(HAVE_FIPS) || \
2419424194
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2)))
2419524195
ExpectNotNull(pkey = PEM_read_PrivateKey(file, NULL, NULL, NULL));
@@ -24591,7 +24591,7 @@ static int test_wolfSSL_PEM_PrivateKey_dh(void)
2459124591
EXPECT_DECLS;
2459224592
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && !defined(NO_DH) && \
2459324593
!defined(NO_FILESYSTEM) && !defined(NO_BIO)
24594-
#if (defined(WOLFSSL_QT) || defined(OPENSSL_ALL) || \
24594+
#if (defined(WOLFSSL_QT) || defined(WC_RSA_PSS) || \
2459524595
defined(WOLFSSL_OPENSSH)) && (!defined(HAVE_FIPS) || \
2459624596
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2)))
2459724597
BIO* bio = NULL;

wolfcrypt/src/evp.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,9 +2541,11 @@ WOLFSSL_EVP_PKEY_CTX *wolfSSL_EVP_PKEY_CTX_new(WOLFSSL_EVP_PKEY *pkey, WOLFSSL_E
25412541
#if !defined(NO_RSA)
25422542
ctx->padding = WC_RSA_PKCS1_PADDING;
25432543
ctx->md = NULL;
2544+
#ifdef WC_RSA_PSS
25442545
ctx->mgf1_md = NULL;
25452546
ctx->saltlen = 0;
25462547
#endif
2548+
#endif
25472549
#ifdef HAVE_ECC
25482550
if (pkey->ecc && pkey->ecc->group) {
25492551
/* set curve NID from pkey if available */
@@ -3330,7 +3332,7 @@ int wolfSSL_EVP_PKEY_sign(WOLFSSL_EVP_PKEY_CTX *ctx, unsigned char *sig,
33303332
return WOLFSSL_SUCCESS;
33313333
}
33323334

3333-
#if defined(OPENSSL_ALL) && (!defined(HAVE_FIPS) || FIPS_VERSION_GT(2,0))
3335+
#if defined(WC_RSA_PSS) && (!defined(HAVE_FIPS) || FIPS_VERSION_GT(2,0))
33343336
/* Handle PSS padding using RSA_padding_add_PKCS1_PSS_mgf1 if saltlen
33353337
* or mgf1 hash were set. Use generic signing otherwise. */
33363338
if (ctx->mgf1_md || ctx->saltlen) {
@@ -3372,7 +3374,7 @@ int wolfSSL_EVP_PKEY_sign(WOLFSSL_EVP_PKEY_CTX *ctx, unsigned char *sig,
33723374
*siglen = (size_t)usiglen;
33733375
return WOLFSSL_SUCCESS;
33743376
} else
3375-
#endif /* OPENSSL_ALL */
3377+
#endif /* WC_RSA_PSS && (!HAVE_FIPS || FIPS_VERSION > 2.0) */
33763378
{
33773379
/* Use existing method for other padding types */
33783380
if (wolfSSL_RSA_sign_generic_padding(wolfSSL_EVP_MD_type(ctx->md), tbs,
@@ -3519,7 +3521,7 @@ int wolfSSL_EVP_PKEY_verify(WOLFSSL_EVP_PKEY_CTX *ctx, const unsigned char *sig,
35193521
switch (ctx->pkey->type) {
35203522
#ifndef NO_RSA
35213523
case WC_EVP_PKEY_RSA:
3522-
#if defined(OPENSSL_ALL) && (!defined(HAVE_FIPS) || FIPS_VERSION_GT(2,0))
3524+
#if defined(WC_RSA_PSS) && (!defined(HAVE_FIPS) || FIPS_VERSION_GT(2,0))
35233525
/* Verify PSS padding using wolfSSL_RSA_verify_PKCS1_PSS_mgf1 if saltlen
35243526
* or mgf1 hash were set. Do generic verification otherwise. */
35253527
if (ctx->mgf1_md || ctx->saltlen) {
@@ -3557,7 +3559,7 @@ int wolfSSL_EVP_PKEY_verify(WOLFSSL_EVP_PKEY_CTX *ctx, const unsigned char *sig,
35573559

35583560
return WOLFSSL_SUCCESS;
35593561
} else
3560-
#endif /* OPENSSL_ALL */
3562+
#endif /* WC_RSA_PSS && (!HAVE_FIPS || FIPS_VERSION > 2.0) */
35613563
{
35623564
/* Use existing method for other padding types */
35633565
return wolfSSL_RSA_verify_ex(wolfSSL_EVP_MD_type(ctx->md), tbs,

0 commit comments

Comments
 (0)