aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-09-16 18:40:26 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-09-16 22:33:25 +0100
commit5cf6abd805b9f15127f9f343a6e3b662565f93d5 (patch)
treec2200abe313b593158feb34a2a3c6f5ec8498dbc /crypto/asn1
parent7aef39a72a2d3a7a2b0e222137a45e1b1406668d (diff)
downloadopenssl-5cf6abd805b9f15127f9f343a6e3b662565f93d5.tar.gz
Embed X509_CINF
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/t_x509.c10
-rw-r--r--crypto/asn1/x_x509.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c
index 12a9ed4940..cebf441363 100644
--- a/crypto/asn1/t_x509.c
+++ b/crypto/asn1/t_x509.c
@@ -122,7 +122,7 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
if (nmflags == X509_FLAG_COMPAT)
nmindent = 16;
- ci = x->cert_info;
+ ci = &x->cert_info;
if (!(cflag & X509_FLAG_NO_HEADER)) {
if (BIO_write(bp, "Certificate:\n", 13) <= 0)
goto err;
@@ -272,10 +272,10 @@ int X509_ocspid_print(BIO *bp, X509 *x)
*/
if (BIO_printf(bp, " Subject OCSP hash: ") <= 0)
goto err;
- derlen = i2d_X509_NAME(x->cert_info->subject, NULL);
+ derlen = i2d_X509_NAME(x->cert_info.subject, NULL);
if ((der = dertmp = OPENSSL_malloc(derlen)) == NULL)
goto err;
- i2d_X509_NAME(x->cert_info->subject, &dertmp);
+ i2d_X509_NAME(x->cert_info.subject, &dertmp);
if (!EVP_Digest(der, derlen, SHA1md, NULL, EVP_sha1(), NULL))
goto err;
@@ -292,8 +292,8 @@ int X509_ocspid_print(BIO *bp, X509 *x)
if (BIO_printf(bp, "\n Public key OCSP hash: ") <= 0)
goto err;
- if (!EVP_Digest(x->cert_info->key->public_key->data,
- x->cert_info->key->public_key->length,
+ if (!EVP_Digest(x->cert_info.key->public_key->data,
+ x->cert_info.key->public_key->length,
SHA1md, NULL, EVP_sha1(), NULL))
goto err;
for (i = 0; i < SHA_DIGEST_LENGTH; i++) {
diff --git a/crypto/asn1/x_x509.c b/crypto/asn1/x_x509.c
index c276874e69..76dfa35796 100644
--- a/crypto/asn1/x_x509.c
+++ b/crypto/asn1/x_x509.c
@@ -106,7 +106,7 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
case ASN1_OP_D2I_POST:
OPENSSL_free(ret->name);
- ret->name = X509_NAME_oneline(ret->cert_info->subject, NULL, 0);
+ ret->name = X509_NAME_oneline(ret->cert_info.subject, NULL, 0);
break;
case ASN1_OP_FREE_POST:
@@ -132,7 +132,7 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
}
ASN1_SEQUENCE_ref(X509, x509_cb, CRYPTO_LOCK_X509) = {
- ASN1_SIMPLE(X509, cert_info, X509_CINF),
+ ASN1_EMBED(X509, cert_info, X509_CINF),
ASN1_SIMPLE(X509, sig_alg, X509_ALGOR),
ASN1_SIMPLE(X509, signature, ASN1_BIT_STRING)
} ASN1_SEQUENCE_END_ref(X509, X509)
@@ -209,8 +209,8 @@ int i2d_X509_AUX(X509 *a, unsigned char **pp)
int i2d_re_X509_tbs(X509 *x, unsigned char **pp)
{
- x->cert_info->enc.modified = 1;
- return i2d_X509_CINF(x->cert_info, pp);
+ x->cert_info.enc.modified = 1;
+ return i2d_X509_CINF(&x->cert_info, pp);
}
void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,