forked from wolfSSL/wolfssl
Removed dead code from wolfSSL_d2i_X509_fp_ex.
This commit is contained in:
15
src/ssl.c
15
src/ssl.c
@ -19376,20 +19376,11 @@ static void *wolfSSL_d2i_X509_fp_ex(XFILE file, void **x509, int type)
|
|||||||
goto _exit;
|
goto _exit;
|
||||||
|
|
||||||
err_exit:
|
err_exit:
|
||||||
if(newx509 != NULL){
|
|
||||||
if(type == CERT_TYPE)
|
|
||||||
wolfSSL_X509_free((WOLFSSL_X509*)newx509);
|
|
||||||
#ifdef HAVE_CRL
|
|
||||||
else if(type == CRL_TYPE) {
|
|
||||||
wolfSSL_X509_CRL_free((WOLFSSL_X509_CRL*)newx509);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if !defined(NO_ASN) && !defined(NO_PWDBASED)
|
#if !defined(NO_ASN) && !defined(NO_PWDBASED)
|
||||||
else if(type == PKCS12_TYPE) {
|
if((newx509 != NULL) && (type == PKCS12_TYPE)) {
|
||||||
wc_PKCS12_free((WC_PKCS12*)newx509);
|
wc_PKCS12_free((WC_PKCS12*)newx509);
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
_exit:
|
_exit:
|
||||||
if(fileBuffer != NULL)
|
if(fileBuffer != NULL)
|
||||||
XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE);
|
XFREE(fileBuffer, NULL, DYNAMIC_TYPE_FILE);
|
||||||
|
Reference in New Issue
Block a user