-/* v3_skey.c */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
* 1999.
*/
#include <stdio.h>
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
#include <openssl/x509v3.h>
+#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);
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;
}
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;
}
}
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);