diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-10-11 21:44:07 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-10-15 16:36:58 +0200 |
commit | 4392479c08392feb4be2ecb9d1b5decc50e32df0 (patch) | |
tree | f872bd67dad233951dddcbf80d81e4041bb684c0 /crypto | |
parent | add CHANGES entry for embed (diff) | |
download | openssl-4392479c08392feb4be2ecb9d1b5decc50e32df0.tar.xz openssl-4392479c08392feb4be2ecb9d1b5decc50e32df0.zip |
embed value field of X509_EXTENSION
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/x509/x509_lcl.h | 2 | ||||
-rw-r--r-- | crypto/x509/x509_v3.c | 4 | ||||
-rw-r--r-- | crypto/x509/x_exten.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/crypto/x509/x509_lcl.h b/crypto/x509/x509_lcl.h index 71c8a2af6b..af043417c3 100644 --- a/crypto/x509/x509_lcl.h +++ b/crypto/x509/x509_lcl.h @@ -98,7 +98,7 @@ struct x509_attributes_st { struct X509_extension_st { ASN1_OBJECT *object; ASN1_BOOLEAN critical; - ASN1_OCTET_STRING *value; + ASN1_OCTET_STRING value; }; /* diff --git a/crypto/x509/x509_v3.c b/crypto/x509/x509_v3.c index 4e9c8f5407..f192979842 100644 --- a/crypto/x509/x509_v3.c +++ b/crypto/x509/x509_v3.c @@ -253,7 +253,7 @@ int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data) if (ex == NULL) return (0); - i = 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); @@ -270,7 +270,7 @@ ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ex) { if (ex == NULL) return (NULL); - return (ex->value); + return &ex->value; } int X509_EXTENSION_get_critical(X509_EXTENSION *ex) diff --git a/crypto/x509/x_exten.c b/crypto/x509/x_exten.c index c0d4c96287..c5b391f948 100644 --- a/crypto/x509/x_exten.c +++ b/crypto/x509/x_exten.c @@ -66,7 +66,7 @@ ASN1_SEQUENCE(X509_EXTENSION) = { ASN1_SIMPLE(X509_EXTENSION, object, ASN1_OBJECT), ASN1_OPT(X509_EXTENSION, critical, ASN1_BOOLEAN), - ASN1_SIMPLE(X509_EXTENSION, value, ASN1_OCTET_STRING) + ASN1_EMBED(X509_EXTENSION, value, ASN1_OCTET_STRING) } ASN1_SEQUENCE_END(X509_EXTENSION) ASN1_ITEM_TEMPLATE(X509_EXTENSIONS) = |