X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fx509v3%2Fv3_skey.c;h=cf3521304d73468ec72fd98edd57e22b4357b89c;hb=bd30091c9725bdad1c82bce10839f33ceaa5623b;hp=705d86cb52befe4845be22cc5767310bd7772041;hpb=f422a51486a3ab415153eccdc3c3746c53da01f4;p=oweals%2Fopenssl.git diff --git a/crypto/x509v3/v3_skey.c b/crypto/x509v3/v3_skey.c index 705d86cb52..cf3521304d 100644 --- a/crypto/x509v3/v3_skey.c +++ b/crypto/x509v3/v3_skey.c @@ -58,8 +58,10 @@ */ #include -#include "cryptlib.h" +#include "internal/cryptlib.h" #include +#include "internal/x509_int.h" +#include "ext_dat.h" static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); @@ -83,12 +85,12 @@ ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *oct; long length; - if (!(oct = ASN1_OCTET_STRING_new())) { + if ((oct = ASN1_OCTET_STRING_new()) == NULL) { X509V3err(X509V3_F_S2I_ASN1_OCTET_STRING, ERR_R_MALLOC_FAILURE); return NULL; } - if (!(oct->data = string_to_hex(str, &length))) { + if ((oct->data = string_to_hex(str, &length)) == NULL) { ASN1_OCTET_STRING_free(oct); return NULL; } @@ -110,7 +112,7 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, if (strcmp(str, "hash")) return s2i_ASN1_OCTET_STRING(method, ctx, str); - if (!(oct = ASN1_OCTET_STRING_new())) { + if ((oct = ASN1_OCTET_STRING_new()) == NULL) { X509V3err(X509V3_F_S2I_SKEY_ID, ERR_R_MALLOC_FAILURE); return NULL; } @@ -124,9 +126,9 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, } if (ctx->subject_req) - pk = ctx->subject_req->req_info->pubkey->public_key; + pk = ctx->subject_req->req_info.pubkey->public_key; else - pk = ctx->subject_cert->cert_info->key->public_key; + pk = ctx->subject_cert->cert_info.key->public_key; if (!pk) { X509V3err(X509V3_F_S2I_SKEY_ID, X509V3_R_NO_PUBLIC_KEY);