summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-02-10 06:37:39 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-02-10 06:37:39 +0000
commitb375519f0b9cb750862dfe22d6c0f31245e69e51 (patch)
treecfed3ba5f716e814db9248cfac368a7fde15d630 /lib
parent66d55433d7dd06cc03a4a1747c77efeef373704f (diff)
Expand IMPLEMENT_ASN1_NDEF_FUNCTION and IMPLEMENT_ASN1_PRINT_FUNCTION
macros so that the code is visible and functions can be readily located. Change has been scripted and there is no change to the generated assembly. Discussed with beck@ miod@ tedu@
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/pkcs7/pk7_asn1.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/libcrypto/pkcs7/pk7_asn1.c b/lib/libcrypto/pkcs7/pk7_asn1.c
index 6a1046bcb89..2699ace9881 100644
--- a/lib/libcrypto/pkcs7/pk7_asn1.c
+++ b/lib/libcrypto/pkcs7/pk7_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk7_asn1.c,v 1.10 2015/02/10 05:25:45 jsing Exp $ */
+/* $OpenBSD: pk7_asn1.c,v 1.11 2015/02/10 06:37:38 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -141,7 +141,12 @@ PKCS7_free(PKCS7 *a)
{
ASN1_item_free((ASN1_VALUE *)a, &PKCS7_it);
}
-IMPLEMENT_ASN1_NDEF_FUNCTION(PKCS7)
+
+int
+i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out)
+{
+ return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, &PKCS7_it);
+}
PKCS7 *
PKCS7_dup(PKCS7 *x)
@@ -498,4 +503,10 @@ ASN1_ITEM_TEMPLATE(PKCS7_ATTR_VERIFY) =
ASN1_TFLG_UNIVERSAL, V_ASN1_SET, PKCS7_ATTRIBUTES, X509_ATTRIBUTE)
ASN1_ITEM_TEMPLATE_END(PKCS7_ATTR_VERIFY)
-IMPLEMENT_ASN1_PRINT_FUNCTION(PKCS7)
+
+int
+PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx)
+{
+ return ASN1_item_print(out, (ASN1_VALUE *)x, indent,
+ &PKCS7_it, pctx);
+}