Skip to content

Commit b02fe08

Browse files
committed
CI fixes
1 parent 57ce894 commit b02fe08

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/crl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ static RevokedCert *DupRevokedCertList(RevokedCert* in, void* heap)
666666
static CRL_Entry* DupCRL_Entry(const CRL_Entry* ent, void* heap)
667667
{
668668
CRL_Entry *dupl;
669-
const size_t copyOffset = OFFSETOF(CRL_Entry, next) +
670-
sizeof(ent->next);
669+
const size_t copyOffset = OFFSETOF(CRL_Entry, verifyMutex) +
670+
sizeof(ent->verifyMutex);
671671
#ifdef CRL_STATIC_REVOKED_LIST
672672
if (ent->totalCerts > CRL_MAX_REVOKED_CERTS) {
673673
return NULL;

tests/api.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@
366366
defined(HAVE_SESSION_TICKET) || (defined(OPENSSL_EXTRA) && \
367367
defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CERT_GEN)) || \
368368
defined(WOLFSSL_TEST_STATIC_BUILD) || defined(WOLFSSL_DTLS) || \
369-
defined(HAVE_ECH) || defined(HAVE_EX_DATA) || !defined(NO_SESSION_CACHE)
369+
defined(HAVE_ECH) || defined(HAVE_EX_DATA) || !defined(NO_SESSION_CACHE) \
370+
|| !defined(WOLFSSL_NO_TLS12)
370371
/* for testing SSL_get_peer_cert_chain, or SESSION_TICKET_HINT_DEFAULT,
371372
* for setting authKeyIdSrc in WOLFSSL_X509, or testing DTLS sequence
372373
* number tracking */
@@ -64946,7 +64947,7 @@ static int test_certreq_sighash_algos(void)
6494664947
#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && \
6494764948
!defined(WOLFSSL_MAX_STRENGTH) && defined(HAVE_ECC) && \
6494864949
defined(WOLFSSL_SHA384) && defined(WOLFSSL_AES_256) && \
64949-
defined(HAVE_AES_CBC)
64950+
defined(HAVE_AES_CBC) && !defined(WOLFSSL_NO_TLS12)
6495064951
WOLFSSL_CTX *ctx_c = NULL;
6495164952
WOLFSSL_CTX *ctx_s = NULL;
6495264953
WOLFSSL *ssl_c = NULL;
@@ -64957,15 +64958,14 @@ static int test_certreq_sighash_algos(void)
6495764958

6495864959
XMEMSET(&test_ctx, 0, sizeof(test_ctx));
6495964960
test_ctx.c_ciphers = test_ctx.s_ciphers =
64960-
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:"
64961-
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384";
64961+
"ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA384";
6496264962
ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
6496364963
wolfTLSv1_2_client_method, wolfTLSv1_2_server_method), 0);
6496464964

6496564965
ExpectIntEQ(wolfSSL_CTX_load_verify_locations(ctx_c,
6496664966
"./certs/ca-ecc-cert.pem", NULL), WOLFSSL_SUCCESS);
6496764967

64968-
wolfSSL_set_verify(ssl_s, SSL_VERIFY_PEER, NULL);
64968+
wolfSSL_set_verify(ssl_s, WOLFSSL_VERIFY_PEER, NULL);
6496964969
ExpectIntEQ(wolfSSL_use_PrivateKey_file(ssl_s, "./certs/ecc-key.pem",
6497064970
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
6497164971
ExpectIntEQ(wolfSSL_use_certificate_file(ssl_s, "./certs/server-ecc.pem",

wolfssl/internal.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,14 +2464,16 @@ typedef struct CRL_Entry CRL_Entry;
24642464
#endif
24652465
/* Complete CRL */
24662466
struct CRL_Entry {
2467-
wolfSSL_Mutex verifyMutex;
24682467
byte* toBeSigned;
24692468
byte* signature;
24702469
#if defined(OPENSSL_EXTRA)
24712470
WOLFSSL_X509_NAME* issuer; /* X509_NAME type issuer */
24722471
#endif
24732472
CRL_Entry* next; /* next entry */
2474-
/* DupCRL_Entry copies data after the `next` member */
2473+
wolfSSL_Mutex verifyMutex;
2474+
/* DupCRL_Entry copies data after the `verifyMutex` member. Using the mutex
2475+
* as the marker because clang-tidy doesn't like taking the sizeof a
2476+
* pointer. */
24752477
byte issuerHash[CRL_DIGEST_SIZE]; /* issuer hash */
24762478
/* byte crlHash[CRL_DIGEST_SIZE]; raw crl data hash */
24772479
/* restore the hash here if needed for optimized comparisons */

0 commit comments

Comments
 (0)