From 3edfcfe162c2836faa012d37ab68442e978a98ce Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 29 Nov 2023 18:02:36 +0100 Subject: [PATCH] Jenkins fixes --- doc/dox_comments/header_files/ssl.h | 6 +++--- src/internal.c | 2 +- src/ssl.c | 12 +++++++++--- tests/api.c | 12 ++++++------ wolfssl/ssl.h | 4 +++- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/doc/dox_comments/header_files/ssl.h b/doc/dox_comments/header_files/ssl.h index 67427d9f6..0c7302142 100644 --- a/doc/dox_comments/header_files/ssl.h +++ b/doc/dox_comments/header_files/ssl.h @@ -14931,8 +14931,8 @@ WOLFSSL_CIPHERSUITE_INFO wolfSSL_get_ciphersuite_info(byte first, \brief This returns information about the hash and signature algorithm directly from the raw ciphersuite bytes. - \param [in] first First byte of the hash and signature algorith - \param [in] second Second byte of the hash and signature algorith + \param [in] first First byte of the hash and signature algorithm + \param [in] second Second byte of the hash and signature algorithm \param [out] hashAlgo The enum wc_HashType of the MAC algorithm \param [out] sigAlgo The enum Key_Sum of the authentication algorithm @@ -14954,4 +14954,4 @@ WOLFSSL_CIPHERSUITE_INFO wolfSSL_get_ciphersuite_info(byte first, \sa wolfSSL_get_ciphersuite_info */ void wolfSSL_get_sigalg_info(byte first, byte second, - enum wc_HashType* hashAlgo, enum Key_Sum* sigAlgo); + int* hashAlgo, int* sigAlgo); diff --git a/src/internal.c b/src/internal.c index 786d12261..db44fe38b 100644 --- a/src/internal.c +++ b/src/internal.c @@ -4236,7 +4236,7 @@ void InitSuites(Suites* suites, ProtocolVersion pv, int keySz, word16 haveRSA, * hashalgo The hash algorithm. * hsType The signature type. */ -WC_INLINE void DecodeSigAlg(const byte* input, byte* hashAlgo, byte* hsType) +void DecodeSigAlg(const byte* input, byte* hashAlgo, byte* hsType) { *hsType = invalid_sa_algo; switch (input[0]) { diff --git a/src/ssl.c b/src/ssl.c index 8f08b7375..1b89cd65d 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -16338,8 +16338,14 @@ int wolfSSL_set_compression(WOLFSSL* ssl) return info; } + /** + * @param first First byte of the hash and signature algorithm + * @param second Second byte of the hash and signature algorithm + * @param hashAlgo The enum wc_HashType of the MAC algorithm + * @param sigAlgo The enum Key_Sum of the authentication algorithm + */ void wolfSSL_get_sigalg_info(byte first, byte second, - enum wc_HashType* hashAlgo, enum Key_Sum* sigAlgo) + int* hashAlgo, int* sigAlgo) { byte input[2]; byte hashType; @@ -16399,7 +16405,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl) case invalid_sa_algo: default: *hashAlgo = WC_HASH_TYPE_NONE; - *sigAlgo = (enum Key_Sum)0; + *sigAlgo = 0; return; } @@ -16439,7 +16445,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl) break; default: *hashAlgo = WC_HASH_TYPE_NONE; - *sigAlgo = (enum Key_Sum)0; + *sigAlgo = 0; return; } } diff --git a/tests/api.c b/tests/api.c index d9710a98f..2acd9bc0f 100644 --- a/tests/api.c +++ b/tests/api.c @@ -44865,8 +44865,8 @@ static int test_wolfSSL_cert_cb_dyn_ciphers_certCB(WOLFSSL* ssl, void* arg) haveECC = 0; } for (idx = 0; idx < hashSigAlgoSz; idx += 2) { - enum wc_HashType hashAlgo; - enum Key_Sum sigAlgo; + int hashAlgo; + int sigAlgo; wolfSSL_get_sigalg_info(hashSigAlgo[idx+0], hashSigAlgo[idx+1], &hashAlgo, &sigAlgo); @@ -45078,8 +45078,8 @@ static int test_wolfSSL_sigalg_info(void) InitSuitesHashSigAlgo_ex2(hashSigAlgo, allSigAlgs, 1, 0xFFFFFFFF, &len); for (idx = 0; idx < len; idx += 2) { - enum wc_HashType hashAlgo; - enum Key_Sum sigAlgo; + int hashAlgo; + int sigAlgo; wolfSSL_get_sigalg_info(hashSigAlgo[idx+0], hashSigAlgo[idx+1], &hashAlgo, &sigAlgo); @@ -45091,8 +45091,8 @@ static int test_wolfSSL_sigalg_info(void) InitSuitesHashSigAlgo_ex2(hashSigAlgo, allSigAlgs | SIG_ANON, 1, 0xFFFFFFFF, &len); for (idx = 0; idx < len; idx += 2) { - enum wc_HashType hashAlgo; - enum Key_Sum sigAlgo; + int hashAlgo; + int sigAlgo; wolfSSL_get_sigalg_info(hashSigAlgo[idx+0], hashSigAlgo[idx+1], &hashAlgo, &sigAlgo); diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index 0c4690131..a0263f28a 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -1531,7 +1531,9 @@ WOLFSSL_API int wolfSSL_sk_push_node(WOLFSSL_STACK** stack, WOLFSSL_STACK* in); WOLFSSL_API WOLFSSL_STACK* wolfSSL_sk_get_node(WOLFSSL_STACK* sk, int idx); WOLFSSL_API int wolfSSL_sk_push(WOLFSSL_STACK *st, const void *data); +#if defined(HAVE_OCSP) || defined(HAVE_CRL) #include "wolfssl/wolfcrypt/asn.h" +#endif #if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA) || defined(WOLFSSL_QT) WOLFSSL_API int wolfSSL_sk_ACCESS_DESCRIPTION_push( @@ -2131,7 +2133,7 @@ typedef struct WOLFSSL_CIPHERSUITE_INFO { WOLFSSL_API WOLFSSL_CIPHERSUITE_INFO wolfSSL_get_ciphersuite_info(byte first, byte second); WOLFSSL_API void wolfSSL_get_sigalg_info(byte first, - byte second, enum wc_HashType* hashAlgo, enum Key_Sum* sigAlgo); + byte second, int* hashAlgo, int* sigAlgo); WOLFSSL_LOCAL int CertSetupCbWrapper(WOLFSSL* ssl); WOLFSSL_API void* wolfSSL_X509_STORE_CTX_get_ex_data(