diff --git a/src/internal.c b/src/internal.c index 5e0eae51e..308a594c2 100644 --- a/src/internal.c +++ b/src/internal.c @@ -12857,14 +12857,14 @@ int DoSessionTicket(WOLFSSL* ssl, if (ret != 0) return ret; - /* store info in SSL context for later */ + /* store info in SSL for later */ XMEMCPY(ssl->arrays->serverRandom, output + idx, RAN_LEN); idx += RAN_LEN; output[idx++] = sessIdSz; XMEMCPY(ssl->arrays->sessionID, output + idx, sessIdSz); } else { - /* If resuming, use info from SSL context */ + /* If resuming, use info from SSL */ XMEMCPY(output + idx, ssl->arrays->serverRandom, RAN_LEN); idx += RAN_LEN; output[idx++] = sessIdSz; diff --git a/wolfcrypt/src/signature.c b/wolfcrypt/src/signature.c index 10aa9969f..618632a43 100644 --- a/wolfcrypt/src/signature.c +++ b/wolfcrypt/src/signature.c @@ -113,7 +113,7 @@ int wc_SignatureVerify( } /* Allocate temporary buffer for hash data */ - hash_data = XMALLOC(hash_len, NULL, DYNAMIC_TYPE_TMP_BUFFER); + hash_data = (byte*)XMALLOC(hash_len, NULL, DYNAMIC_TYPE_TMP_BUFFER); if (hash_data == NULL) { return MEMORY_E; } @@ -141,7 +141,7 @@ int wc_SignatureVerify( #ifndef NO_RSA case WC_SIGNATURE_TYPE_RSA: { - byte *plain_data = XMALLOC(hash_len, NULL, DYNAMIC_TYPE_TMP_BUFFER); + byte *plain_data = (byte*)XMALLOC(hash_len, NULL, DYNAMIC_TYPE_TMP_BUFFER); if (plain_data) { /* Perform verification of signature using provided RSA key */ ret = wc_RsaSSL_Verify(sig, sig_len, plain_data, hash_len, (RsaKey*)key); @@ -203,7 +203,7 @@ int wc_SignatureGenerate( } /* Allocate temporary buffer for hash data */ - hash_data = XMALLOC(hash_len, NULL, DYNAMIC_TYPE_TMP_BUFFER); + hash_data = (byte*)XMALLOC(hash_len, NULL, DYNAMIC_TYPE_TMP_BUFFER); if (hash_data == NULL) { return MEMORY_E; }