summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_ocsp.c
diff options
context:
space:
mode:
authorjsing <>2015-07-29 16:13:49 +0000
committerjsing <>2015-07-29 16:13:49 +0000
commit6a72ca90e8e4257c1656bef69f6deeeac4ac3cb6 (patch)
treeaf66362d049ee3d67f52261defee582a9529f2d0 /src/lib/libcrypto/x509v3/v3_ocsp.c
parent4b2596fb0f28cb59c8918b16cdae591454312175 (diff)
downloadopenbsd-6a72ca90e8e4257c1656bef69f6deeeac4ac3cb6.tar.gz
openbsd-6a72ca90e8e4257c1656bef69f6deeeac4ac3cb6.tar.bz2
openbsd-6a72ca90e8e4257c1656bef69f6deeeac4ac3cb6.zip
Use named initialisers for X509V3_EXT_METHOD structs (for the usual
reasons) - only change in generated assembly is due to line numbering.
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_ocsp.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_ocsp.c145
1 files changed, 99 insertions, 46 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_ocsp.c b/src/lib/libcrypto/x509v3/v3_ocsp.c
index 1d9c8a8513..9d1390a520 100644
--- a/src/lib/libcrypto/x509v3/v3_ocsp.c
+++ b/src/lib/libcrypto/x509v3/v3_ocsp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_ocsp.c,v 1.11 2015/02/15 08:45:27 miod Exp $ */ 1/* $OpenBSD: v3_ocsp.c,v 1.12 2015/07/29 16:13:49 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 */
@@ -94,69 +94,122 @@ static int i2r_ocsp_serviceloc(const X509V3_EXT_METHOD *method, void *in,
94 BIO *bp, int ind); 94 BIO *bp, int ind);
95 95
96const X509V3_EXT_METHOD v3_ocsp_crlid = { 96const X509V3_EXT_METHOD v3_ocsp_crlid = {
97 NID_id_pkix_OCSP_CrlID, 0, ASN1_ITEM_ref(OCSP_CRLID), 97 .ext_nid = NID_id_pkix_OCSP_CrlID,
98 0, 0, 0, 0, 98 .ext_flags = 0,
99 0, 0, 99 .it = ASN1_ITEM_ref(OCSP_CRLID),
100 0, 0, 100 .ext_new = NULL,
101 i2r_ocsp_crlid, 0, 101 .ext_free = NULL,
102 NULL 102 .d2i = NULL,
103 .i2d = NULL,
104 .i2s = NULL,
105 .s2i = NULL,
106 .i2v = NULL,
107 .v2i = NULL,
108 .i2r = i2r_ocsp_crlid,
109 .r2i = NULL,
110 .usr_data = NULL,
103}; 111};
104 112
105const X509V3_EXT_METHOD v3_ocsp_acutoff = { 113const X509V3_EXT_METHOD v3_ocsp_acutoff = {
106 NID_id_pkix_OCSP_archiveCutoff, 0, ASN1_ITEM_ref(ASN1_GENERALIZEDTIME), 114 .ext_nid = NID_id_pkix_OCSP_archiveCutoff,
107 0, 0, 0, 0, 115 .ext_flags = 0,
108 0, 0, 116 .it = ASN1_ITEM_ref(ASN1_GENERALIZEDTIME),
109 0, 0, 117 .ext_new = NULL,
110 i2r_ocsp_acutoff, 0, 118 .ext_free = NULL,
111 NULL 119 .d2i = NULL,
120 .i2d = NULL,
121 .i2s = NULL,
122 .s2i = NULL,
123 .i2v = NULL,
124 .v2i = NULL,
125 .i2r = i2r_ocsp_acutoff,
126 .r2i = NULL,
127 .usr_data = NULL,
112}; 128};
113 129
114const X509V3_EXT_METHOD v3_crl_invdate = { 130const X509V3_EXT_METHOD v3_crl_invdate = {
115 NID_invalidity_date, 0, ASN1_ITEM_ref(ASN1_GENERALIZEDTIME), 131 .ext_nid = NID_invalidity_date,
116 0, 0, 0, 0, 132 .ext_flags = 0,
117 0, 0, 133 .it = ASN1_ITEM_ref(ASN1_GENERALIZEDTIME),
118 0, 0, 134 .ext_new = NULL,
119 i2r_ocsp_acutoff, 0, 135 .ext_free = NULL,
120 NULL 136 .d2i = NULL,
137 .i2d = NULL,
138 .i2s = NULL,
139 .s2i = NULL,
140 .i2v = NULL,
141 .v2i = NULL,
142 .i2r = i2r_ocsp_acutoff,
143 .r2i = NULL,
144 .usr_data = NULL,
121}; 145};
122 146
123const X509V3_EXT_METHOD v3_crl_hold = { 147const X509V3_EXT_METHOD v3_crl_hold = {
124 NID_hold_instruction_code, 0, ASN1_ITEM_ref(ASN1_OBJECT), 148 .ext_nid = NID_hold_instruction_code,
125 0, 0, 0, 0, 149 .ext_flags = 0,
126 0, 0, 150 .it = ASN1_ITEM_ref(ASN1_OBJECT),
127 0, 0, 151 .ext_new = NULL,
128 i2r_object, 0, 152 .ext_free = NULL,
129 NULL 153 .d2i = NULL,
154 .i2d = NULL,
155 .i2s = NULL,
156 .s2i = NULL,
157 .i2v = NULL,
158 .v2i = NULL,
159 .i2r = i2r_object,
160 .r2i = NULL,
161 .usr_data = NULL,
130}; 162};
131 163
132const X509V3_EXT_METHOD v3_ocsp_nonce = { 164const X509V3_EXT_METHOD v3_ocsp_nonce = {
133 NID_id_pkix_OCSP_Nonce, 0, NULL, 165 .ext_nid = NID_id_pkix_OCSP_Nonce,
134 ocsp_nonce_new, 166 .ext_flags = 0,
135 ocsp_nonce_free, 167 .it = NULL,
136 d2i_ocsp_nonce, 168 .ext_new = ocsp_nonce_new,
137 i2d_ocsp_nonce, 169 .ext_free = ocsp_nonce_free,
138 0, 0, 170 .d2i = d2i_ocsp_nonce,
139 0, 0, 171 .i2d = i2d_ocsp_nonce,
140 i2r_ocsp_nonce, 0, 172 .i2s = NULL,
141 NULL 173 .s2i = NULL,
174 .i2v = NULL,
175 .v2i = NULL,
176 .i2r = i2r_ocsp_nonce,
177 .r2i = NULL,
178 .usr_data = NULL,
142}; 179};
143 180
144const X509V3_EXT_METHOD v3_ocsp_nocheck = { 181const X509V3_EXT_METHOD v3_ocsp_nocheck = {
145 NID_id_pkix_OCSP_noCheck, 0, ASN1_ITEM_ref(ASN1_NULL), 182 .ext_nid = NID_id_pkix_OCSP_noCheck,
146 0, 0, 0, 0, 183 .ext_flags = 0,
147 0, s2i_ocsp_nocheck, 184 .it = ASN1_ITEM_ref(ASN1_NULL),
148 0, 0, 185 .ext_new = NULL,
149 i2r_ocsp_nocheck, 0, 186 .ext_free = NULL,
150 NULL 187 .d2i = NULL,
188 .i2d = NULL,
189 .i2s = NULL,
190 .s2i = s2i_ocsp_nocheck,
191 .i2v = NULL,
192 .v2i = NULL,
193 .i2r = i2r_ocsp_nocheck,
194 .r2i = NULL,
195 .usr_data = NULL,
151}; 196};
152 197
153const X509V3_EXT_METHOD v3_ocsp_serviceloc = { 198const X509V3_EXT_METHOD v3_ocsp_serviceloc = {
154 NID_id_pkix_OCSP_serviceLocator, 0, ASN1_ITEM_ref(OCSP_SERVICELOC), 199 .ext_nid = NID_id_pkix_OCSP_serviceLocator,
155 0, 0, 0, 0, 200 .ext_flags = 0,
156 0, 0, 201 .it = ASN1_ITEM_ref(OCSP_SERVICELOC),
157 0, 0, 202 .ext_new = NULL,
158 i2r_ocsp_serviceloc, 0, 203 .ext_free = NULL,
159 NULL 204 .d2i = NULL,
205 .i2d = NULL,
206 .i2s = NULL,
207 .s2i = NULL,
208 .i2v = NULL,
209 .v2i = NULL,
210 .i2r = i2r_ocsp_serviceloc,
211 .r2i = NULL,
212 .usr_data = NULL,
160}; 213};
161 214
162static int 215static int