Skip to content

Commit d60e4dd

Browse files
Merge pull request #9329 from SparkiDev/regression_fixes_20
Regression testing fixes
2 parents 58e3706 + 821dc5c commit d60e4dd

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

tests/api.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20972,13 +20972,14 @@ static int test_wolfSSL_X509_LOOKUP_load_file(void)
2097220972
{
2097320973
EXPECT_DECLS;
2097420974
#if defined(OPENSSL_EXTRA) && defined(HAVE_CRL) && \
20975-
!defined(NO_FILESYSTEM) && !defined(NO_RSA) && \
20975+
!defined(NO_FILESYSTEM) && !defined(NO_RSA) && defined(HAVE_ECC) && \
2097620976
(!defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH))
2097720977
WOLFSSL_X509_STORE* store = NULL;
2097820978
WOLFSSL_X509_LOOKUP* lookup = NULL;
2097920979

2098020980
ExpectNotNull(store = wolfSSL_X509_STORE_new());
2098120981
ExpectNotNull(lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file()));
20982+
/* One RSA and one ECC certificate in file. */
2098220983
ExpectIntEQ(wolfSSL_X509_LOOKUP_load_file(lookup, "certs/client-ca.pem",
2098320984
X509_FILETYPE_PEM), 1);
2098420985
ExpectIntEQ(wolfSSL_X509_LOOKUP_load_file(lookup, "certs/crl/crl2.pem",
@@ -36199,7 +36200,8 @@ static int test_sk_X509(void)
3619936200
static int test_sk_X509_CRL(void)
3620036201
{
3620136202
EXPECT_DECLS;
36202-
#if defined(OPENSSL_ALL) && !defined(NO_CERTS) && defined(HAVE_CRL)
36203+
#if defined(OPENSSL_ALL) && !defined(NO_CERTS) && defined(HAVE_CRL) && \
36204+
!defined(NO_RSA)
3620336205
X509_CRL* crl = NULL;
3620436206
XFILE fp = XBADFILE;
3620536207
STACK_OF(X509_CRL)* s = NULL;
@@ -36635,7 +36637,7 @@ static int test_X509_REQ(void)
3663536637
static int test_wolfSSL_X509_REQ_print(void)
3663636638
{
3663736639
EXPECT_DECLS;
36638-
#if defined(OPENSSL_ALL) && !defined(NO_CERTS) && \
36640+
#if defined(OPENSSL_ALL) && !defined(NO_RSA) && !defined(NO_CERTS) && \
3663936641
defined(WOLFSSL_CERT_GEN) && defined(WOLFSSL_CERT_REQ) && !defined(NO_BIO)
3664036642
WOLFSSL_X509* req = NULL;
3664136643
XFILE fp = XBADFILE;

tests/api/test_pkcs7.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,7 @@ static int myCEKwrapFunc(PKCS7* pkcs7, byte* cek, word32 cekSz, byte* keyId,
20562056
HAVE_AES_KEYWRAP */
20572057

20582058

2059-
#if defined(HAVE_PKCS7) && defined(ASN_BER_TO_DER)
2059+
#if defined(HAVE_PKCS7) && defined(ASN_BER_TO_DER) && !defined(NO_RSA)
20602060
#define MAX_TEST_DECODE_SIZE 6000
20612061
static int test_wc_PKCS7_DecodeEnvelopedData_stream_decrypt_cb(wc_PKCS7* pkcs7,
20622062
const byte* output, word32 outputSz, void* ctx) {
@@ -2088,8 +2088,8 @@ static int test_wc_PKCS7_DecodeEnvelopedData_stream_decrypt_cb(wc_PKCS7* pkcs7,
20882088
*/
20892089
int test_wc_PKCS7_DecodeEnvelopedData_stream(void)
20902090
{
2091-
#if defined(HAVE_PKCS7) && defined(ASN_BER_TO_DER)
20922091
EXPECT_DECLS;
2092+
#if defined(HAVE_PKCS7) && defined(ASN_BER_TO_DER) && !defined(NO_RSA)
20932093
PKCS7* pkcs7 = NULL;
20942094
int ret = 0;
20952095
XFILE f = XBADFILE;
@@ -2139,10 +2139,8 @@ int test_wc_PKCS7_DecodeEnvelopedData_stream(void)
21392139
}
21402140

21412141
wc_PKCS7_Free(pkcs7);
2142-
return EXPECT_RESULT();
2143-
#else
2144-
return TEST_SKIPPED;
21452142
#endif
2143+
return EXPECT_RESULT();
21462144
} /* END test_wc_PKCS7_DecodeEnvelopedData_stream() */
21472145

21482146

@@ -2151,8 +2149,8 @@ int test_wc_PKCS7_DecodeEnvelopedData_stream(void)
21512149
*/
21522150
int test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients(void)
21532151
{
2154-
#if defined(HAVE_PKCS7)
21552152
EXPECT_DECLS;
2153+
#if defined(HAVE_PKCS7) && !defined(NO_RSA)
21562154
PKCS7* pkcs7 = NULL;
21572155
int ret = 0;
21582156
XFILE f = XBADFILE;
@@ -2227,10 +2225,8 @@ int test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients(void)
22272225
pkcs7 = NULL;
22282226
}
22292227

2230-
return EXPECT_RESULT();
2231-
#else
2232-
return TEST_SKIPPED;
22332228
#endif
2229+
return EXPECT_RESULT();
22342230
} /* END test_wc_PKCS7_DecodeEnvelopedData_multiple_recipients() */
22352231

22362232
/*

0 commit comments

Comments
 (0)