fix build errors when compiler is C++

This commit is contained in:
toddouska
2014-12-04 17:16:39 -08:00
parent 8105b9efa2
commit 51ffb84e11
10 changed files with 25 additions and 16 deletions

View File

@ -6327,9 +6327,6 @@ static int SetNameFromCert(CertName* cn, const byte* der, int derSz)
#ifndef NO_FILESYSTEM
/* forward from CyaSSL */
int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz);
/* Set cert issuer from issuerFile in PEM */
int SetIssuer(Cert* cert, const char* issuerFile)
{

View File

@ -1768,11 +1768,11 @@ static int ecc_mul2add(ecc_point* A, mp_int* kA,
/* allocate memory */
tA = XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER);
tA = (unsigned char*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (tA == NULL) {
return GEN_MEM_ERR;
}
tB = XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER);
tB = (unsigned char*)XMALLOC(ECC_BUFSIZE, NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (tB == NULL) {
XFREE(tA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return GEN_MEM_ERR;

View File

@ -368,7 +368,7 @@ int InitRng(RNG* rng)
if (rng != NULL) {
byte entropy[ENTROPY_NONCE_SZ];
rng->drbg = XMALLOC(sizeof(DRBG), NULL, DYNAMIC_TYPE_RNG);
rng->drbg = (struct DRBG*)XMALLOC(sizeof(DRBG), NULL, DYNAMIC_TYPE_RNG);
if (rng->drbg == NULL) {
ret = MEMORY_E;
}