Skip to content

Commit c2e60d5

Browse files
fix for WOLFSSL_NO_PEM build
1 parent 03ed52b commit c2e60d5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/ssl_load.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2530,7 +2530,7 @@ int ProcessFile(WOLFSSL_CTX* ctx, const char* fname, int format, int type,
25302530
}
25312531
/* Try to detect type by parsing cert header and footer. */
25322532
if ((ret == 0) && (type == DETECT_CERT_TYPE)) {
2533-
#ifndef NO_CODING
2533+
#if !defined(NO_CODING) && !defined(WOLFSSL_NO_PEM)
25342534
const char* header = NULL;
25352535
const char* footer = NULL;
25362536

tests/api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12505,7 +12505,7 @@ static int test_wolfSSL_PKCS8(void)
1250512505
XFILE f = XBADFILE;
1250612506
int bytes = 0;
1250712507
WOLFSSL_CTX* ctx = NULL;
12508-
#if defined(HAVE_ECC) && !defined(NO_CODING)
12508+
#if defined(HAVE_ECC) && !defined(NO_CODING) && !defined(WOLFSSL_NO_PEM)
1250912509
int ret;
1251012510
ecc_key key;
1251112511
word32 x = 0;
@@ -12665,7 +12665,7 @@ static int test_wolfSSL_PKCS8(void)
1266512665
ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_buffer(ctx, buff, bytes,
1266612666
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
1266712667

12668-
#ifndef NO_CODING
12668+
#if !defined(NO_CODING) && !defined(WOLFSSL_NO_PEM)
1266912669
/* decrypt PKCS8 PEM to key in DER format */
1267012670
ExpectIntGT((bytes = wc_KeyPemToDer(buff, bytes, der,
1267112671
(word32)sizeof(der), NULL)), 0);

0 commit comments

Comments
 (0)