Merge pull request #7439 from JacobBarthelmeh/build_test

fix for WOLFSSL_NO_PEM build
This commit is contained in:
Sean Parkinson
2024-04-22 10:48:57 +10:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@ -2531,7 +2531,7 @@ int ProcessFile(WOLFSSL_CTX* ctx, const char* fname, int format, int type,
}
/* Try to detect type by parsing cert header and footer. */
if ((ret == 0) && (type == DETECT_CERT_TYPE)) {
#ifndef NO_CODING
#if !defined(NO_CODING) && !defined(WOLFSSL_NO_PEM)
const char* header = NULL;
const char* footer = NULL;

View File

@ -12505,7 +12505,7 @@ static int test_wolfSSL_PKCS8(void)
XFILE f = XBADFILE;
int bytes = 0;
WOLFSSL_CTX* ctx = NULL;
#if defined(HAVE_ECC) && !defined(NO_CODING)
#if defined(HAVE_ECC) && !defined(NO_CODING) && !defined(WOLFSSL_NO_PEM)
int ret;
ecc_key key;
word32 x = 0;
@ -12665,7 +12665,7 @@ static int test_wolfSSL_PKCS8(void)
ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_buffer(ctx, buff, bytes,
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
#ifndef NO_CODING
#if !defined(NO_CODING) && !defined(WOLFSSL_NO_PEM)
/* decrypt PKCS8 PEM to key in DER format */
ExpectIntGT((bytes = wc_KeyPemToDer(buff, bytes, der,
(word32)sizeof(der), NULL)), 0);