Skip to content

Commit

Permalink
add macro guards to account for alternate builds
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Jan 9, 2025
1 parent 18d49eb commit 9d6643c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -8369,6 +8369,8 @@ void FreeSuites(WOLFSSL* ssl)
wolfSSL_sk_SSL_CIPHER_free(ssl->suitesStack);
ssl->suitesStack = NULL;
}
#endif
#ifdef OPENSSL_EXTRA
XFREE(ssl->clSuites, ssl->heap, DYNAMIC_TYPE_SUITES);
ssl->clSuites = NULL;
#endif
Expand Down Expand Up @@ -37585,7 +37587,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
{
byte b;
ProtocolVersion pv;
#if defined(WOLFSSL_SMALL_STACK) || defined(OPENSSL_ALL)
#if defined(WOLFSSL_SMALL_STACK) || defined(OPENSSL_EXTRA)
Suites* clSuites = NULL;
#else
Suites clSuites[1];
Expand Down Expand Up @@ -37887,7 +37889,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
goto out;
}

#if defined(WOLFSSL_SMALL_STACK) || defined(OPENSSL_ALL)
#if defined(WOLFSSL_SMALL_STACK) || defined(OPENSSL_EXTRA)
clSuites = (Suites*)XMALLOC(sizeof(Suites), ssl->heap,
DYNAMIC_TYPE_SUITES);
if (clSuites == NULL) {
Expand Down
4 changes: 4 additions & 0 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down Expand Up @@ -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);
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/ssl_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9d6643c

Please sign in to comment.