wolfcrypt/src/misc.c: fix -Wconversions in CopyString();

src/ssl.c: fix missing semicolon in wolfSSL_CTX_check_private_key().
This commit is contained in:
Daniel Pouzzner 2024-05-18 02:31:58 -05:00
parent 2d5e8402e8
commit 5c6218696b
2 changed files with 3 additions and 3 deletions

View File

@ -6349,7 +6349,7 @@ int wolfSSL_CTX_check_private_key(const WOLFSSL_CTX* ctx)
res = check_cert_key(ctx->certificate, ctx->privateKey, ctx->altPrivateKey,
ctx->heap, ctx->privateKeyDevId, ctx->privateKeyLabel,
ctx->privateKeyId, ctx->altPrivateKeyDevId, ctx->altPrivateKeyLabel,
ctx->altPrivateKeyId) != 0
ctx->altPrivateKeyId) != 0;
#ifdef WOLFSSL_BLIND_PRIVATE_KEY
{
int ret;

View File

@ -1011,9 +1011,9 @@ WC_MISC_STATIC WC_INLINE char* CopyString(const char* src, int srcLen,
if (srcLen <= 0)
srcLen = (int)XSTRLEN(src);
dst = (char*)XMALLOC(srcLen + 1, heap, type);
dst = (char*)XMALLOC((size_t)srcLen + 1, heap, type);
if (dst != NULL) {
XMEMCPY(dst, src, srcLen);
XMEMCPY(dst, src, (size_t)srcLen);
dst[srcLen] = '\0';
}