diff --git a/src/ssl.c b/src/ssl.c index fcb8bf99a..f468dc5e0 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -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; diff --git a/wolfcrypt/src/misc.c b/wolfcrypt/src/misc.c index a0f53cfdd..10f733bd0 100644 --- a/wolfcrypt/src/misc.c +++ b/wolfcrypt/src/misc.c @@ -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'; }