X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fx509%2Fx509_v3.c;h=4e9c8f540780d2b3a8ce32750c4cb01dd00a4acc;hb=ac38115c1a4fb61c66c2a8cd2a9800751828d328;hp=4a03445a64d24da4f741e0c593ef0852c8a8f5cb;hpb=0f113f3ee4d629ef9a4a30911b22b224772085e5;p=oweals%2Fopenssl.git diff --git a/crypto/x509/x509_v3.c b/crypto/x509/x509_v3.c index 4a03445a64..4e9c8f5407 100644 --- a/crypto/x509/x509_v3.c +++ b/crypto/x509/x509_v3.c @@ -58,12 +58,13 @@ #include #include -#include "cryptlib.h" +#include "internal/cryptlib.h" #include #include #include #include #include +#include "x509_lcl.h" int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x) { @@ -175,10 +176,8 @@ STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x, err: X509err(X509_F_X509V3_ADD_EXT, ERR_R_MALLOC_FAILURE); err2: - if (new_ex != NULL) - X509_EXTENSION_free(new_ex); - if (sk != NULL) - sk_X509_EXTENSION_free(sk); + X509_EXTENSION_free(new_ex); + sk_X509_EXTENSION_free(sk); return (NULL); } @@ -254,7 +253,7 @@ int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data) if (ex == NULL) return (0); - i = M_ASN1_OCTET_STRING_set(ex->value, data->data, data->length); + i = ASN1_OCTET_STRING_set(ex->value, data->data, data->length); if (!i) return (0); return (1);