summaryrefslogtreecommitdiff
path: root/lib/libcrypto/asn1/x_exten.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-02-09 15:06:00 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-02-09 15:06:00 +0000
commitd566de171fae9cff9702bb783eefe844380a4f04 (patch)
treed2ccacf1cb7e266cc34e20e8bcba10bf02dfc3fe /lib/libcrypto/asn1/x_exten.c
parent95251fcce2725cc6008aa90d6a9b57745574ff1a (diff)
Expand the IMPLEMENT_ASN1_FUNCTIONS macro so that the code is visible and
functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
Diffstat (limited to 'lib/libcrypto/asn1/x_exten.c')
-rw-r--r--lib/libcrypto/asn1/x_exten.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/lib/libcrypto/asn1/x_exten.c b/lib/libcrypto/asn1/x_exten.c
index a3fa88498b1..40c521ec800 100644
--- a/lib/libcrypto/asn1/x_exten.c
+++ b/lib/libcrypto/asn1/x_exten.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_exten.c,v 1.9 2014/06/12 15:49:27 deraadt Exp $ */
+/* $OpenBSD: x_exten.c,v 1.10 2015/02/09 15:05:59 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -71,6 +71,30 @@ ASN1_ITEM_TEMPLATE(X509_EXTENSIONS) =
ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, Extension, X509_EXTENSION)
ASN1_ITEM_TEMPLATE_END(X509_EXTENSIONS)
-IMPLEMENT_ASN1_FUNCTIONS(X509_EXTENSION)
+
+X509_EXTENSION *
+d2i_X509_EXTENSION(X509_EXTENSION **a, const unsigned char **in, long len)
+{
+ return (X509_EXTENSION *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &X509_EXTENSION_it);
+}
+
+int
+i2d_X509_EXTENSION(X509_EXTENSION *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_EXTENSION_it);
+}
+
+X509_EXTENSION *
+X509_EXTENSION_new(void)
+{
+ return (X509_EXTENSION *)ASN1_item_new(&X509_EXTENSION_it);
+}
+
+void
+X509_EXTENSION_free(X509_EXTENSION *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &X509_EXTENSION_it);
+}
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS)
IMPLEMENT_ASN1_DUP_FUNCTION(X509_EXTENSION)