From 94bbefd129b4daca1d8c5212386943be1a3d7b64 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Thu, 9 Jan 2025 02:14:04 -0700 Subject: [PATCH] add macro guards to account for alternate builds --- src/ssl.c | 4 ++++ src/ssl_load.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index e031765d83..c0adf4b309 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -17691,6 +17691,7 @@ static void wolfSSL_CIPHER_copy(WOLFSSL_CIPHER* in, WOLFSSL_CIPHER* out) } +#if defined(OPENSSL_ALL) static WOLFSSL_X509_OBJECT* wolfSSL_X509_OBJECT_dup(WOLFSSL_X509_OBJECT* obj) { WOLFSSL_X509_OBJECT* ret = NULL; @@ -17714,6 +17715,7 @@ static WOLFSSL_X509_OBJECT* wolfSSL_X509_OBJECT_dup(WOLFSSL_X509_OBJECT* obj) } return ret; } +#endif /* OPENSSL_ALL */ WOLFSSL_STACK* wolfSSL_sk_dup(WOLFSSL_STACK* sk) { @@ -17778,6 +17780,7 @@ WOLFSSL_STACK* wolfSSL_sk_dup(WOLFSSL_STACK* sk) } break; case STACK_TYPE_X509_OBJ: + #if defined(OPENSSL_ALL) if (!sk->data.x509_obj) break; cur->data.x509_obj = wolfSSL_X509_OBJECT_dup(sk->data.x509_obj); @@ -17786,6 +17789,7 @@ WOLFSSL_STACK* wolfSSL_sk_dup(WOLFSSL_STACK* sk) goto error; } break; + #endif case STACK_TYPE_BIO: case STACK_TYPE_STRING: case STACK_TYPE_ACCESS_DESCRIPTION: diff --git a/src/ssl_load.c b/src/ssl_load.c index df35d2da45..8a3c4fdc84 100644 --- a/src/ssl_load.c +++ b/src/ssl_load.c @@ -2803,7 +2803,7 @@ int wolfSSL_CTX_load_verify_locations_ex(WOLFSSL_CTX* ctx, const char* file, } if (file != NULL) { - #ifdef HAVE_CRL + #if defined(OPENSSL_EXTRA) && defined(HAVE_CRL) /* handle CRL type being passed in */ WOLFSSL_CRL crl;