forked from wolfSSL/wolfssl
fix build errors when compiler is C++
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user