X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fx509%2Fx509_cmp.c;h=9308249570060955954bfd4e898b2cb2d840689a;hb=ac38115c1a4fb61c66c2a8cd2a9800751828d328;hp=eb46a677a490d377b1f6ab16c877d95c962aff0d;hpb=f422a51486a3ab415153eccdc3c3746c53da01f4;p=oweals%2Fopenssl.git diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index eb46a677a4..9308249570 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -58,11 +58,12 @@ #include #include -#include "cryptlib.h" +#include "internal/cryptlib.h" #include #include #include #include +#include "internal/x509_int.h" int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b) { @@ -341,8 +342,7 @@ int X509_check_private_key(X509 *x, EVP_PKEY *k) case -2: X509err(X509_F_X509_CHECK_PRIVATE_KEY, X509_R_UNKNOWN_KEY_TYPE); } - if (xk) - EVP_PKEY_free(xk); + EVP_PKEY_free(xk); if (ret > 0) return 1; return 0; @@ -435,8 +435,7 @@ int X509_chain_check_suiteb(int *perror_depth, X509 *x, STACK_OF(X509) *chain, /* Final check: root CA signature */ rv = check_suite_b(pk, X509_get_signature_nid(x), &tflags); end: - if (pk) - EVP_PKEY_free(pk); + EVP_PKEY_free(pk); if (rv != X509_V_OK) { /* Invalid signature or LOS errors are for previous cert */ if ((rv == X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM