Merge pull request #9073 from holtrop/fix-inconsistent-prototype-parameter-names-wolfssl

Fix inconsistent function prototype parameter names for wolfssl
This commit is contained in:
Daniel Pouzzner
2025-08-08 23:28:33 -05:00
committed by GitHub
6 changed files with 23 additions and 22 deletions
+8 -7
View File
@@ -4115,7 +4115,7 @@ char* wolfSSL_ERR_error_string(unsigned long errNumber, char* data);
\sa wolfSSL_load_error_strings
*/
void wolfSSL_ERR_error_string_n(unsigned long e, char* buf,
unsigned long sz);
unsigned long len);
/*!
\ingroup TLS
@@ -7659,20 +7659,20 @@ int wolfSSL_SetMinEccKey_Sz(WOLFSSL* ssl, short keySz);
\return MEMORY_E returned if there is an error with memory allocation.
\param ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
\param msk a void pointer variable that will hold the result
\param key a void pointer variable that will hold the result
of the p_hash function.
\param len an unsigned integer that represents the length of
the msk variable.
the key variable.
\param label a constant char pointer that is copied from in wc_PRF().
_Example_
\code
WOLFSSL* ssl = wolfSSL_new(ctx);;
void* msk;
void* key;
unsigned int len;
const char* label;
return wolfSSL_make_eap_keys(ssl, msk, len, label);
return wolfSSL_make_eap_keys(ssl, key, len, label);
\endcode
\sa wc_PRF
@@ -9916,7 +9916,8 @@ int wolfSSL_CertManagerVerifyBuffer(WOLFSSL_CERT_MANAGER* cm,
\param cm a pointer to a WOLFSSL_CERT_MANAGER structure, created using
wolfSSL_CertManagerNew().
\param vc a VerifyCallback function pointer to the callback routine
\param verify_callback a VerifyCallback function pointer to the callback
routine
_Example_
\code
@@ -9935,7 +9936,7 @@ int wolfSSL_CertManagerVerifyBuffer(WOLFSSL_CERT_MANAGER* cm,
\sa wolfSSL_CertManagerVerify
*/
void wolfSSL_CertManagerSetVerify(WOLFSSL_CERT_MANAGER* cm,
VerifyCallback vc);
VerifyCallback verify_callback);
/*!
\brief Check CRL if the option is enabled and compares the cert to the
+4 -4
View File
@@ -9025,7 +9025,7 @@ static SetVerifyOptions ModeToVerifyOptions(int mode)
}
WOLFSSL_ABI
void wolfSSL_CTX_set_verify(WOLFSSL_CTX* ctx, int mode, VerifyCallback vc)
void wolfSSL_CTX_set_verify(WOLFSSL_CTX* ctx, int mode, VerifyCallback verify_callback)
{
SetVerifyOptions opts;
@@ -9043,7 +9043,7 @@ void wolfSSL_CTX_set_verify(WOLFSSL_CTX* ctx, int mode, VerifyCallback vc)
ctx->verifyPostHandshake = opts.verifyPostHandshake;
#endif
ctx->verifyCallback = vc;
ctx->verifyCallback = verify_callback;
}
#ifdef OPENSSL_ALL
@@ -9060,7 +9060,7 @@ void wolfSSL_CTX_set_cert_verify_callback(WOLFSSL_CTX* ctx,
#endif
void wolfSSL_set_verify(WOLFSSL* ssl, int mode, VerifyCallback vc)
void wolfSSL_set_verify(WOLFSSL* ssl, int mode, VerifyCallback verify_callback)
{
SetVerifyOptions opts;
@@ -9078,7 +9078,7 @@ void wolfSSL_set_verify(WOLFSSL* ssl, int mode, VerifyCallback vc)
ssl->options.verifyPostHandshake = opts.verifyPostHandshake;
#endif
ssl->verifyCallback = vc;
ssl->verifyCallback = verify_callback;
}
void wolfSSL_set_verify_result(WOLFSSL *ssl, long v)
+5 -5
View File
@@ -448,12 +448,12 @@ static int _DeriveTlsKeys(byte* key_dig, word32 key_dig_len,
}
/* External facing wrapper so user can call as well, 0 on success */
int wolfSSL_DeriveTlsKeys(byte* key_dig, word32 key_dig_len,
int wolfSSL_DeriveTlsKeys(byte* key_data, word32 keyLen,
const byte* ms, word32 msLen,
const byte* sr, const byte* cr,
int tls1_2, int hash_type)
{
return _DeriveTlsKeys(key_dig, key_dig_len, ms, msLen, sr, cr, tls1_2,
return _DeriveTlsKeys(key_data, keyLen, ms, msLen, sr, cr, tls1_2,
hash_type, NULL, INVALID_DEVID);
}
@@ -705,7 +705,7 @@ int MakeTlsMasterSecret(WOLFSSL* ssl)
/* Used by EAP-TLS and EAP-TTLS to derive keying material from
* the master_secret. */
int wolfSSL_make_eap_keys(WOLFSSL* ssl, void* msk, unsigned int len,
int wolfSSL_make_eap_keys(WOLFSSL* ssl, void* key, unsigned int len,
const char* label)
{
int ret;
@@ -730,7 +730,7 @@ int wolfSSL_make_eap_keys(WOLFSSL* ssl, void* msk, unsigned int len,
#ifdef WOLFSSL_HAVE_PRF
PRIVATE_KEY_UNLOCK();
ret = wc_PRF_TLS((byte*)msk, len, ssl->arrays->masterSecret, SECRET_LEN,
ret = wc_PRF_TLS((byte*)key, len, ssl->arrays->masterSecret, SECRET_LEN,
(const byte *)label, (word32)XSTRLEN(label), seed, SEED_LEN,
IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm,
ssl->heap, ssl->devId);
@@ -740,7 +740,7 @@ int wolfSSL_make_eap_keys(WOLFSSL* ssl, void* msk, unsigned int len,
ret = PRF_MISSING;
WOLFSSL_MSG("Pseudo-random function is not enabled");
(void)msk;
(void)key;
(void)len;
(void)label;
#endif
+1 -1
View File
@@ -264,7 +264,7 @@ enum IOerrors {
WOLFSSL_LOCAL
void SetErrorString(int err, char* buff);
void SetErrorString(int err, char* str);
#if defined(WOLFSSL_DEBUG_TRACE_ERROR_CODES) && \
(defined(BUILDING_WOLFSSL) || \
+3 -3
View File
@@ -2292,7 +2292,7 @@ WOLFSSL_LOCAL void CopyDecodedName(WOLFSSL_X509_NAME* name, DecodedCert* dCert,
#endif
WOLFSSL_LOCAL int SetupTicket(WOLFSSL* ssl);
WOLFSSL_LOCAL int CreateTicket(WOLFSSL* ssl);
WOLFSSL_LOCAL int HashRaw(WOLFSSL* ssl, const byte* output, int sz);
WOLFSSL_LOCAL int HashRaw(WOLFSSL* ssl, const byte* data, int sz);
WOLFSSL_LOCAL int HashOutput(WOLFSSL* ssl, const byte* output, int sz,
int ivSz);
WOLFSSL_LOCAL int HashInput(WOLFSSL* ssl, const byte* input, int sz);
@@ -2779,7 +2779,7 @@ typedef struct ProcPeerCertArgs {
#endif
} ProcPeerCertArgs;
WOLFSSL_LOCAL int DoVerifyCallback(WOLFSSL_CERT_MANAGER* cm, WOLFSSL* ssl,
int ret, ProcPeerCertArgs* args);
int cert_err, ProcPeerCertArgs* args);
WOLFSSL_LOCAL void DoCrlCallback(WOLFSSL_CERT_MANAGER* cm, WOLFSSL* ssl,
ProcPeerCertArgs* args, int* outRet);
@@ -6719,7 +6719,7 @@ WOLFSSL_LOCAL WC_RNG* WOLFSSL_RSA_GetRNG(WOLFSSL_RSA *rsa, WC_RNG **tmpRNG,
WOLFSSL_LOCAL Signer* GetCAByKeyHash(void* vp, const byte* keyHash);
#endif
#if !defined(NO_SKID) && !defined(GetCAByName)
WOLFSSL_LOCAL Signer* GetCAByName(void* cm, byte* hash);
WOLFSSL_LOCAL Signer* GetCAByName(void* vp, byte* hash);
#endif
#endif /* !NO_CERTS */
WOLFSSL_LOCAL int BuildTlsHandshakeHash(WOLFSSL* ssl, byte* hash,
+2 -2
View File
@@ -1835,7 +1835,7 @@ WOLFSSL_API int wolfSSL_ERR_GET_LIB(unsigned long err);
WOLFSSL_API int wolfSSL_ERR_GET_REASON(unsigned long err);
WOLFSSL_API char* wolfSSL_ERR_error_string(unsigned long errNumber,char* data);
WOLFSSL_API void wolfSSL_ERR_error_string_n(unsigned long e, char* buf,
unsigned long sz);
unsigned long len);
WOLFSSL_API const char* wolfSSL_ERR_reason_error_string(unsigned long e);
WOLFSSL_API const char* wolfSSL_ERR_func_error_string(unsigned long e);
WOLFSSL_API const char* wolfSSL_ERR_lib_error_string(unsigned long e);
@@ -4226,7 +4226,7 @@ WOLFSSL_API void wolfSSL_CTX_SetPerformTlsRecordProcessingCb(WOLFSSL_CTX* ctx,
WOLFSSL_API int wolfSSL_CertManagerDisableCRL(WOLFSSL_CERT_MANAGER* cm);
#ifndef NO_WOLFSSL_CM_VERIFY
WOLFSSL_API void wolfSSL_CertManagerSetVerify(WOLFSSL_CERT_MANAGER* cm,
VerifyCallback vc);
VerifyCallback verify_callback);
#endif
WOLFSSL_API int wolfSSL_CertManagerLoadCRL(WOLFSSL_CERT_MANAGER* cm,
const char* path, int type, int monitor);