Updates per review comments

pull/8267/head
Colton Willey 2024-12-09 13:10:32 -08:00
parent 324b87614e
commit c83c9e68c9
2 changed files with 2 additions and 7 deletions

View File

@ -4148,9 +4148,6 @@ int wolfSSL_CTX_use_AltPrivateKey_Label(WOLFSSL_CTX* ctx, const char* label,
#if defined(WOLF_CRYPTO_CB) && !defined(NO_CERTS) #if defined(WOLF_CRYPTO_CB) && !defined(NO_CERTS)
static int wolfSSL_CTX_use_certificate_ex(WOLFSSL_CTX* ctx,
const char *label, const unsigned char *id, int idLen, int devId);
static int wolfSSL_CTX_use_certificate_ex(WOLFSSL_CTX* ctx, static int wolfSSL_CTX_use_certificate_ex(WOLFSSL_CTX* ctx,
const char *label, const unsigned char *id, int idLen, int devId) const char *label, const unsigned char *id, int idLen, int devId)
{ {
@ -4159,7 +4156,7 @@ static int wolfSSL_CTX_use_certificate_ex(WOLFSSL_CTX* ctx,
word32 certDataLen = 0; word32 certDataLen = 0;
word32 labelLen = 0; word32 labelLen = 0;
WOLFSSL_ENTER("wolfSSL_CTX_use_certificate_label_ex"); WOLFSSL_ENTER("wolfSSL_CTX_use_certificate_ex");
if (label != NULL) { if (label != NULL) {
labelLen = (word32)XSTRLEN(label); labelLen = (word32)XSTRLEN(label);
@ -4195,7 +4192,6 @@ int wolfSSL_CTX_use_certificate_label(WOLFSSL_CTX* ctx,
const char *label, int devId) const char *label, int devId)
{ {
if ((ctx == NULL) || (label == NULL)) { if ((ctx == NULL) || (label == NULL)) {
WOLFSSL_MSG("Bad Argument");
return WOLFSSL_FAILURE; return WOLFSSL_FAILURE;
} }
@ -4215,7 +4211,6 @@ int wolfSSL_CTX_use_certificate_id(WOLFSSL_CTX* ctx,
const unsigned char *id, int idLen, int devId) const unsigned char *id, int idLen, int devId)
{ {
if ((ctx == NULL) || (id == NULL) || (idLen <= 0)) { if ((ctx == NULL) || (id == NULL) || (idLen <= 0)) {
WOLFSSL_MSG("Bad Argument");
return WOLFSSL_FAILURE; return WOLFSSL_FAILURE;
} }

View File

@ -4021,7 +4021,7 @@ static int Pkcs11GetCert(Pkcs11Session* session, wc_CryptoInfo* info) {
goto exit; goto exit;
} }
certData = XMALLOC( certData = (byte *)XMALLOC(
(int)tmpl[0].ulValueLen, info->cert.heap, DYNAMIC_TYPE_CERT); (int)tmpl[0].ulValueLen, info->cert.heap, DYNAMIC_TYPE_CERT);
if (certData == NULL) { if (certData == NULL) {
ret = MEMORY_E; ret = MEMORY_E;