diff options
author | jsing <> | 2015-02-10 04:01:26 +0000 |
---|---|---|
committer | jsing <> | 2015-02-10 04:01:26 +0000 |
commit | 0e4218e3e293b3085109f78bed8948a0bf9f1511 (patch) | |
tree | 86b03f16387ab89c274a564f80963cad767070f8 /src/lib/libcrypto/asn1/n_pkey.c | |
parent | ef9e1f7eec0659c49a61db86c7a58ea19e13d6b1 (diff) | |
download | openbsd-0e4218e3e293b3085109f78bed8948a0bf9f1511.tar.gz openbsd-0e4218e3e293b3085109f78bed8948a0bf9f1511.tar.bz2 openbsd-0e4218e3e293b3085109f78bed8948a0bf9f1511.zip |
Expand the IMPLEMENT_ASN1_FUNCTIONS_{const,fname,name} macros 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/asn1/n_pkey.c')
-rw-r--r-- | src/lib/libcrypto/asn1/n_pkey.c | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c index 42431b6e24..198ca97c09 100644 --- a/src/lib/libcrypto/asn1/n_pkey.c +++ b/src/lib/libcrypto/asn1/n_pkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: n_pkey.c,v 1.22 2014/07/12 22:26:01 miod Exp $ */ | 1 | /* $OpenBSD: n_pkey.c,v 1.23 2015/02/10 04:01:26 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -94,7 +94,31 @@ ASN1_BROKEN_SEQUENCE(NETSCAPE_ENCRYPTED_PKEY) = { | |||
94 | 94 | ||
95 | DECLARE_ASN1_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY) | 95 | DECLARE_ASN1_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY) |
96 | DECLARE_ASN1_ENCODE_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY, NETSCAPE_ENCRYPTED_PKEY) | 96 | DECLARE_ASN1_ENCODE_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY, NETSCAPE_ENCRYPTED_PKEY) |
97 | IMPLEMENT_ASN1_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY) | 97 | |
98 | NETSCAPE_ENCRYPTED_PKEY * | ||
99 | d2i_NETSCAPE_ENCRYPTED_PKEY(NETSCAPE_ENCRYPTED_PKEY **a, const unsigned char **in, long len) | ||
100 | { | ||
101 | return (NETSCAPE_ENCRYPTED_PKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
102 | &NETSCAPE_ENCRYPTED_PKEY_it); | ||
103 | } | ||
104 | |||
105 | int | ||
106 | i2d_NETSCAPE_ENCRYPTED_PKEY(const NETSCAPE_ENCRYPTED_PKEY *a, unsigned char **out) | ||
107 | { | ||
108 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &NETSCAPE_ENCRYPTED_PKEY_it); | ||
109 | } | ||
110 | |||
111 | NETSCAPE_ENCRYPTED_PKEY * | ||
112 | NETSCAPE_ENCRYPTED_PKEY_new(void) | ||
113 | { | ||
114 | return (NETSCAPE_ENCRYPTED_PKEY *)ASN1_item_new(&NETSCAPE_ENCRYPTED_PKEY_it); | ||
115 | } | ||
116 | |||
117 | void | ||
118 | NETSCAPE_ENCRYPTED_PKEY_free(NETSCAPE_ENCRYPTED_PKEY *a) | ||
119 | { | ||
120 | ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_ENCRYPTED_PKEY_it); | ||
121 | } | ||
98 | 122 | ||
99 | ASN1_SEQUENCE(NETSCAPE_PKEY) = { | 123 | ASN1_SEQUENCE(NETSCAPE_PKEY) = { |
100 | ASN1_SIMPLE(NETSCAPE_PKEY, version, LONG), | 124 | ASN1_SIMPLE(NETSCAPE_PKEY, version, LONG), |
@@ -104,7 +128,31 @@ ASN1_SEQUENCE(NETSCAPE_PKEY) = { | |||
104 | 128 | ||
105 | DECLARE_ASN1_FUNCTIONS_const(NETSCAPE_PKEY) | 129 | DECLARE_ASN1_FUNCTIONS_const(NETSCAPE_PKEY) |
106 | DECLARE_ASN1_ENCODE_FUNCTIONS_const(NETSCAPE_PKEY, NETSCAPE_PKEY) | 130 | DECLARE_ASN1_ENCODE_FUNCTIONS_const(NETSCAPE_PKEY, NETSCAPE_PKEY) |
107 | IMPLEMENT_ASN1_FUNCTIONS_const(NETSCAPE_PKEY) | 131 | |
132 | NETSCAPE_PKEY * | ||
133 | d2i_NETSCAPE_PKEY(NETSCAPE_PKEY **a, const unsigned char **in, long len) | ||
134 | { | ||
135 | return (NETSCAPE_PKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
136 | &NETSCAPE_PKEY_it); | ||
137 | } | ||
138 | |||
139 | int | ||
140 | i2d_NETSCAPE_PKEY(const NETSCAPE_PKEY *a, unsigned char **out) | ||
141 | { | ||
142 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &NETSCAPE_PKEY_it); | ||
143 | } | ||
144 | |||
145 | NETSCAPE_PKEY * | ||
146 | NETSCAPE_PKEY_new(void) | ||
147 | { | ||
148 | return (NETSCAPE_PKEY *)ASN1_item_new(&NETSCAPE_PKEY_it); | ||
149 | } | ||
150 | |||
151 | void | ||
152 | NETSCAPE_PKEY_free(NETSCAPE_PKEY *a) | ||
153 | { | ||
154 | ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_PKEY_it); | ||
155 | } | ||
108 | 156 | ||
109 | static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os, | 157 | static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os, |
110 | int (*cb)(char *buf, int len, const char *prompt, int verify), int sgckey); | 158 | int (*cb)(char *buf, int len, const char *prompt, int verify), int sgckey); |