summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_sxnet.c
diff options
context:
space:
mode:
authorjsing <>2015-02-09 16:03:11 +0000
committerjsing <>2015-02-09 16:03:11 +0000
commitc67b08b466720c73bce5f5a0ee6d8ccf43683ae6 (patch)
tree450aac9231a21230a1a136407055b6264089d1b8 /src/lib/libcrypto/x509v3/v3_sxnet.c
parent16f790d01f7a6fc6c94e2a033a67b80c8ec5291c (diff)
downloadopenbsd-c67b08b466720c73bce5f5a0ee6d8ccf43683ae6.tar.gz
openbsd-c67b08b466720c73bce5f5a0ee6d8ccf43683ae6.tar.bz2
openbsd-c67b08b466720c73bce5f5a0ee6d8ccf43683ae6.zip
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 'src/lib/libcrypto/x509v3/v3_sxnet.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_sxnet.c54
1 files changed, 51 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_sxnet.c b/src/lib/libcrypto/x509v3/v3_sxnet.c
index 81e8ab67dd..dc8ee379c7 100644
--- a/src/lib/libcrypto/x509v3/v3_sxnet.c
+++ b/src/lib/libcrypto/x509v3/v3_sxnet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_sxnet.c,v 1.11 2014/07/11 08:44:49 jsing Exp $ */ 1/* $OpenBSD: v3_sxnet.c,v 1.12 2015/02/09 16:03:11 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -95,14 +95,62 @@ ASN1_SEQUENCE(SXNETID) = {
95 ASN1_SIMPLE(SXNETID, user, ASN1_OCTET_STRING) 95 ASN1_SIMPLE(SXNETID, user, ASN1_OCTET_STRING)
96} ASN1_SEQUENCE_END(SXNETID) 96} ASN1_SEQUENCE_END(SXNETID)
97 97
98IMPLEMENT_ASN1_FUNCTIONS(SXNETID) 98
99SXNETID *
100d2i_SXNETID(SXNETID **a, const unsigned char **in, long len)
101{
102 return (SXNETID *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
103 &SXNETID_it);
104}
105
106int
107i2d_SXNETID(SXNETID *a, unsigned char **out)
108{
109 return ASN1_item_i2d((ASN1_VALUE *)a, out, &SXNETID_it);
110}
111
112SXNETID *
113SXNETID_new(void)
114{
115 return (SXNETID *)ASN1_item_new(&SXNETID_it);
116}
117
118void
119SXNETID_free(SXNETID *a)
120{
121 ASN1_item_free((ASN1_VALUE *)a, &SXNETID_it);
122}
99 123
100ASN1_SEQUENCE(SXNET) = { 124ASN1_SEQUENCE(SXNET) = {
101 ASN1_SIMPLE(SXNET, version, ASN1_INTEGER), 125 ASN1_SIMPLE(SXNET, version, ASN1_INTEGER),
102 ASN1_SEQUENCE_OF(SXNET, ids, SXNETID) 126 ASN1_SEQUENCE_OF(SXNET, ids, SXNETID)
103} ASN1_SEQUENCE_END(SXNET) 127} ASN1_SEQUENCE_END(SXNET)
104 128
105IMPLEMENT_ASN1_FUNCTIONS(SXNET) 129
130SXNET *
131d2i_SXNET(SXNET **a, const unsigned char **in, long len)
132{
133 return (SXNET *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
134 &SXNET_it);
135}
136
137int
138i2d_SXNET(SXNET *a, unsigned char **out)
139{
140 return ASN1_item_i2d((ASN1_VALUE *)a, out, &SXNET_it);
141}
142
143SXNET *
144SXNET_new(void)
145{
146 return (SXNET *)ASN1_item_new(&SXNET_it);
147}
148
149void
150SXNET_free(SXNET *a)
151{
152 ASN1_item_free((ASN1_VALUE *)a, &SXNET_it);
153}
106 154
107static int 155static int
108sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, int indent) 156sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, int indent)