Fixed compile error in signature.c with g++. Corrected comment.

pull/207/head
David Garske 2015-12-04 15:22:06 -08:00
parent 179f1cab9b
commit 89a65b0aa0
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;
}