mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Fix mismatched dynamic types
This commit is contained in:
@ -143,9 +143,9 @@ static void FreeCRL_Entry(CRL_Entry* crle, void* heap)
|
|||||||
tmp = next;
|
tmp = next;
|
||||||
}
|
}
|
||||||
if (crle->signature != NULL)
|
if (crle->signature != NULL)
|
||||||
XFREE(crle->signature, heap, DYNAMIC_TYPE_REVOKED);
|
XFREE(crle->signature, heap, DYNAMIC_TYPE_CRL_ENTRY);
|
||||||
if (crle->toBeSigned != NULL)
|
if (crle->toBeSigned != NULL)
|
||||||
XFREE(crle->toBeSigned, heap, DYNAMIC_TYPE_REVOKED);
|
XFREE(crle->toBeSigned, heap, DYNAMIC_TYPE_CRL_ENTRY);
|
||||||
|
|
||||||
(void)heap;
|
(void)heap;
|
||||||
}
|
}
|
||||||
|
@ -11806,13 +11806,13 @@ int DoVerifyCallback(WOLFSSL_CERT_MANAGER* cm, WOLFSSL* ssl, int ret,
|
|||||||
x509 = (WOLFSSL_X509*)XMALLOC(sizeof(WOLFSSL_X509), heap,
|
x509 = (WOLFSSL_X509*)XMALLOC(sizeof(WOLFSSL_X509), heap,
|
||||||
DYNAMIC_TYPE_X509);
|
DYNAMIC_TYPE_X509);
|
||||||
if (x509 == NULL) {
|
if (x509 == NULL) {
|
||||||
XFREE(store, heap, DYNAMIC_TYPE_X509);
|
XFREE(store, heap, DYNAMIC_TYPE_X509_STORE);
|
||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
domain = (char*)XMALLOC(ASN_NAME_MAX, heap, DYNAMIC_TYPE_STRING);
|
domain = (char*)XMALLOC(ASN_NAME_MAX, heap, DYNAMIC_TYPE_STRING);
|
||||||
if (domain == NULL) {
|
if (domain == NULL) {
|
||||||
XFREE(store, heap, DYNAMIC_TYPE_X509);
|
XFREE(store, heap, DYNAMIC_TYPE_X509_STORE);
|
||||||
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
||||||
XFREE(x509, heap, DYNAMIC_TYPE_X509);
|
XFREE(x509, heap, DYNAMIC_TYPE_X509);
|
||||||
#endif
|
#endif
|
||||||
|
8
src/pk.c
8
src/pk.c
@ -1565,7 +1565,7 @@ int wolfSSL_PEM_write_mem_RSAPrivateKey(RSA* rsa, const EVP_CIPHER* cipher,
|
|||||||
DYNAMIC_TYPE_TMP_BUFFER);
|
DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
if (tmpBuf == NULL) {
|
if (tmpBuf == NULL) {
|
||||||
WOLFSSL_MSG("Extending DER buffer failed");
|
WOLFSSL_MSG("Extending DER buffer failed");
|
||||||
XFREE(derBuf, NULL, DYNAMIC_TYPE_DER);
|
XFREE(derBuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1616,7 +1616,7 @@ int wolfSSL_PEM_write_mem_RSAPrivateKey(RSA* rsa, const EVP_CIPHER* cipher,
|
|||||||
|
|
||||||
XFREE(tmp, NULL, DYNAMIC_TYPE_KEY);
|
XFREE(tmp, NULL, DYNAMIC_TYPE_KEY);
|
||||||
XFREE(cipherInfo, NULL, DYNAMIC_TYPE_STRING);
|
XFREE(cipherInfo, NULL, DYNAMIC_TYPE_STRING);
|
||||||
XFREE(derBuf, rsa->heap, DYNAMIC_TYPE_DER);
|
XFREE(derBuf, rsa->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5151,7 +5151,7 @@ int wolfSSL_PEM_write_bio_DSAPrivateKey(WOLFSSL_BIO* bio, WOLFSSL_DSA* dsa,
|
|||||||
derSz = wc_DsaKeyToDer((DsaKey*)dsa->internal, derBuf, der_max_len);
|
derSz = wc_DsaKeyToDer((DsaKey*)dsa->internal, derBuf, der_max_len);
|
||||||
if (derSz < 0) {
|
if (derSz < 0) {
|
||||||
WOLFSSL_MSG("wc_DsaKeyToDer failed");
|
WOLFSSL_MSG("wc_DsaKeyToDer failed");
|
||||||
XFREE(derBuf, NULL, DYNAMIC_TYPE_DER);
|
XFREE(derBuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
wolfSSL_EVP_PKEY_free(pkey);
|
wolfSSL_EVP_PKEY_free(pkey);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -10765,7 +10765,7 @@ int wolfSSL_PEM_write_bio_ECPrivateKey(WOLFSSL_BIO* bio, WOLFSSL_EC_KEY* ec,
|
|||||||
derSz = wc_EccKeyToDer((ecc_key*)ec->internal, derBuf, der_max_len);
|
derSz = wc_EccKeyToDer((ecc_key*)ec->internal, derBuf, der_max_len);
|
||||||
if (derSz < 0) {
|
if (derSz < 0) {
|
||||||
WOLFSSL_MSG("wc_EccKeyToDer failed");
|
WOLFSSL_MSG("wc_EccKeyToDer failed");
|
||||||
XFREE(derBuf, NULL, DYNAMIC_TYPE_DER);
|
XFREE(derBuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
wolfSSL_EVP_PKEY_free(pkey);
|
wolfSSL_EVP_PKEY_free(pkey);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -19512,7 +19512,7 @@ WOLFSSL_SESSION* wolfSSL_NewSession(void* heap)
|
|||||||
if (wolfSSL_SESSION_set_ex_data(ret, 0, (void *)(-1))
|
if (wolfSSL_SESSION_set_ex_data(ret, 0, (void *)(-1))
|
||||||
!= WOLFSSL_SUCCESS) {
|
!= WOLFSSL_SUCCESS) {
|
||||||
WOLFSSL_MSG("Error setting up ex data for stunnel");
|
WOLFSSL_MSG("Error setting up ex data for stunnel");
|
||||||
XFREE(ret, NULL, DYNAMIC_TYPE_OPENSSL);
|
XFREE(ret, NULL, DYNAMIC_TYPE_SESSION);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -35512,7 +35512,7 @@ char *wolfSSL_BN_bn2dec(const WOLFSSL_BIGNUM *bn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mp_todecimal((mp_int*)bn->internal, buf) != MP_OKAY) {
|
if (mp_todecimal((mp_int*)bn->internal, buf) != MP_OKAY) {
|
||||||
XFREE(buf, NULL, DYNAMIC_TYPE_ECC);
|
XFREE(buf, NULL, DYNAMIC_TYPE_OPENSSL);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1071,7 +1071,7 @@ WOLFSSL_API int wolfSSL_X509_STORE_load_locations(WOLFSSL_X509_STORE *str,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WOLFSSL_SMALL_STACK
|
#ifdef WOLFSSL_SMALL_STACK
|
||||||
XFREE(readCtx, ctx->heap, DYNAMIC_TYPE_DIRCTX);
|
XFREE(readCtx, ctx->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user