]>
Commit | Line | Data |
---|---|---|
d02b48c6 | 1 | /* crypto/objects/objects.h */ |
58964a49 | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
d02b48c6 RE |
3 | * All rights reserved. |
4 | * | |
5 | * This package is an SSL implementation written | |
6 | * by Eric Young (eay@cryptsoft.com). | |
7 | * The implementation was written so as to conform with Netscapes SSL. | |
8 | * | |
9 | * This library is free for commercial and non-commercial use as long as | |
10 | * the following conditions are aheared to. The following conditions | |
11 | * apply to all code found in this distribution, be it the RC4, RSA, | |
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | |
13 | * included with this distribution is covered by the same copyright terms | |
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | |
15 | * | |
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | |
17 | * the code are not to be removed. | |
18 | * If this package is used in a product, Eric Young should be given attribution | |
19 | * as the author of the parts of the library used. | |
20 | * This can be in the form of a textual message at program startup or | |
21 | * in documentation (online or textual) provided with the package. | |
22 | * | |
23 | * Redistribution and use in source and binary forms, with or without | |
24 | * modification, are permitted provided that the following conditions | |
25 | * are met: | |
26 | * 1. Redistributions of source code must retain the copyright | |
27 | * notice, this list of conditions and the following disclaimer. | |
28 | * 2. Redistributions in binary form must reproduce the above copyright | |
29 | * notice, this list of conditions and the following disclaimer in the | |
30 | * documentation and/or other materials provided with the distribution. | |
31 | * 3. All advertising materials mentioning features or use of this software | |
32 | * must display the following acknowledgement: | |
33 | * "This product includes cryptographic software written by | |
34 | * Eric Young (eay@cryptsoft.com)" | |
35 | * The word 'cryptographic' can be left out if the rouines from the library | |
36 | * being used are not cryptographic related :-). | |
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | |
38 | * the apps directory (application code) you must include an acknowledgement: | |
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | |
40 | * | |
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | |
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
51 | * SUCH DAMAGE. | |
52 | * | |
53 | * The licence and distribution terms for any publically available version or | |
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | |
55 | * copied and put under another distribution licence | |
56 | * [including the GNU Public Licence.] | |
57 | */ | |
58 | ||
59 | #ifndef HEADER_OBJECTS_H | |
60 | #define HEADER_OBJECTS_H | |
61 | ||
62 | #ifdef __cplusplus | |
63 | extern "C" { | |
64 | #endif | |
65 | ||
66 | #define SN_undef "UNDEF" | |
67 | #define LN_undef "undefined" | |
68 | #define NID_undef 0 | |
69 | ||
70 | #define SN_Algorithm "Algorithm" | |
71 | #define LN_algorithm "algorithm" | |
72 | #define NID_algorithm 38 | |
73 | #define OBJ_algorithm 1L,3L,14L,3L,2L | |
74 | ||
75 | #define LN_rsadsi "rsadsi" | |
76 | #define NID_rsadsi 1 | |
77 | #define OBJ_rsadsi 1L,2L,840L,113549L | |
78 | ||
79 | #define LN_pkcs "pkcs" | |
80 | #define NID_pkcs 2 | |
81 | #define OBJ_pkcs OBJ_rsadsi,1L | |
82 | ||
83 | #define SN_md2 "MD2" | |
84 | #define LN_md2 "md2" | |
85 | #define NID_md2 3 | |
86 | #define OBJ_md2 OBJ_rsadsi,2L,2L | |
87 | ||
88 | #define SN_md5 "MD5" | |
89 | #define LN_md5 "md5" | |
90 | #define NID_md5 4 | |
91 | #define OBJ_md5 OBJ_rsadsi,2L,5L | |
92 | ||
93 | #define SN_rc4 "RC4" | |
94 | #define LN_rc4 "rc4" | |
95 | #define NID_rc4 5 | |
96 | #define OBJ_rc4 OBJ_rsadsi,3L,4L | |
97 | ||
98 | #define LN_rsaEncryption "rsaEncryption" | |
99 | #define NID_rsaEncryption 6 | |
100 | #define OBJ_rsaEncryption OBJ_pkcs,1L,1L | |
101 | ||
102 | #define SN_md2WithRSAEncryption "RSA-MD2" | |
103 | #define LN_md2WithRSAEncryption "md2WithRSAEncryption" | |
104 | #define NID_md2WithRSAEncryption 7 | |
105 | #define OBJ_md2WithRSAEncryption OBJ_pkcs,1L,2L | |
106 | ||
107 | #define SN_md5WithRSAEncryption "RSA-MD5" | |
108 | #define LN_md5WithRSAEncryption "md5WithRSAEncryption" | |
109 | #define NID_md5WithRSAEncryption 8 | |
110 | #define OBJ_md5WithRSAEncryption OBJ_pkcs,1L,4L | |
111 | ||
112 | #define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" | |
113 | #define NID_pbeWithMD2AndDES_CBC 9 | |
114 | #define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs,5L,1L | |
115 | ||
116 | #define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" | |
117 | #define NID_pbeWithMD5AndDES_CBC 10 | |
118 | #define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs,5L,3L | |
119 | ||
120 | #define LN_X500 "X500" | |
121 | #define NID_X500 11 | |
122 | #define OBJ_X500 2L,5L | |
123 | ||
124 | #define LN_X509 "X509" | |
125 | #define NID_X509 12 | |
126 | #define OBJ_X509 OBJ_X500,4L | |
127 | ||
128 | #define SN_commonName "CN" | |
129 | #define LN_commonName "commonName" | |
130 | #define NID_commonName 13 | |
131 | #define OBJ_commonName OBJ_X509,3L | |
132 | ||
133 | #define SN_countryName "C" | |
134 | #define LN_countryName "countryName" | |
135 | #define NID_countryName 14 | |
136 | #define OBJ_countryName OBJ_X509,6L | |
137 | ||
138 | #define SN_localityName "L" | |
139 | #define LN_localityName "localityName" | |
140 | #define NID_localityName 15 | |
141 | #define OBJ_localityName OBJ_X509,7L | |
142 | ||
143 | /* Postal Address? PA */ | |
144 | ||
145 | /* should be "ST" (rfc1327) but MS uses 'S' */ | |
146 | #define SN_stateOrProvinceName "ST" | |
147 | #define LN_stateOrProvinceName "stateOrProvinceName" | |
148 | #define NID_stateOrProvinceName 16 | |
149 | #define OBJ_stateOrProvinceName OBJ_X509,8L | |
150 | ||
151 | #define SN_organizationName "O" | |
152 | #define LN_organizationName "organizationName" | |
153 | #define NID_organizationName 17 | |
154 | #define OBJ_organizationName OBJ_X509,10L | |
155 | ||
156 | #define SN_organizationalUnitName "OU" | |
157 | #define LN_organizationalUnitName "organizationalUnitName" | |
158 | #define NID_organizationalUnitName 18 | |
159 | #define OBJ_organizationalUnitName OBJ_X509,11L | |
160 | ||
161 | #define SN_rsa "RSA" | |
162 | #define LN_rsa "rsa" | |
163 | #define NID_rsa 19 | |
164 | #define OBJ_rsa OBJ_X500,8L,1L,1L | |
165 | ||
166 | #define LN_pkcs7 "pkcs7" | |
167 | #define NID_pkcs7 20 | |
168 | #define OBJ_pkcs7 OBJ_pkcs,7L | |
169 | ||
170 | #define LN_pkcs7_data "pkcs7-data" | |
171 | #define NID_pkcs7_data 21 | |
172 | #define OBJ_pkcs7_data OBJ_pkcs7,1L | |
173 | ||
174 | #define LN_pkcs7_signed "pkcs7-signedData" | |
175 | #define NID_pkcs7_signed 22 | |
176 | #define OBJ_pkcs7_signed OBJ_pkcs7,2L | |
177 | ||
178 | #define LN_pkcs7_enveloped "pkcs7-envelopedData" | |
179 | #define NID_pkcs7_enveloped 23 | |
180 | #define OBJ_pkcs7_enveloped OBJ_pkcs7,3L | |
181 | ||
182 | #define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" | |
183 | #define NID_pkcs7_signedAndEnveloped 24 | |
184 | #define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L | |
185 | ||
186 | #define LN_pkcs7_digest "pkcs7-digestData" | |
187 | #define NID_pkcs7_digest 25 | |
188 | #define OBJ_pkcs7_digest OBJ_pkcs7,5L | |
189 | ||
190 | #define LN_pkcs7_encrypted "pkcs7-encryptedData" | |
191 | #define NID_pkcs7_encrypted 26 | |
192 | #define OBJ_pkcs7_encrypted OBJ_pkcs7,6L | |
193 | ||
194 | #define LN_pkcs3 "pkcs3" | |
195 | #define NID_pkcs3 27 | |
196 | #define OBJ_pkcs3 OBJ_pkcs,3L | |
197 | ||
198 | #define LN_dhKeyAgreement "dhKeyAgreement" | |
199 | #define NID_dhKeyAgreement 28 | |
200 | #define OBJ_dhKeyAgreement OBJ_pkcs3,1L | |
201 | ||
202 | #define SN_des_ecb "DES-ECB" | |
203 | #define LN_des_ecb "des-ecb" | |
204 | #define NID_des_ecb 29 | |
205 | #define OBJ_des_ecb OBJ_algorithm,6L | |
206 | ||
207 | #define SN_des_cfb64 "DES-CFB" | |
208 | #define LN_des_cfb64 "des-cfb" | |
209 | #define NID_des_cfb64 30 | |
210 | /* IV + num */ | |
211 | #define OBJ_des_cfb64 OBJ_algorithm,9L | |
212 | ||
213 | #define SN_des_cbc "DES-CBC" | |
214 | #define LN_des_cbc "des-cbc" | |
215 | #define NID_des_cbc 31 | |
216 | /* IV */ | |
217 | #define OBJ_des_cbc OBJ_algorithm,7L | |
218 | ||
219 | #define SN_des_ede "DES-EDE" | |
220 | #define LN_des_ede "des-ede" | |
221 | #define NID_des_ede 32 | |
222 | /* ?? */ | |
223 | #define OBJ_des_ede OBJ_algorithm,17L | |
224 | ||
225 | #define SN_des_ede3 "DES-EDE3" | |
226 | #define LN_des_ede3 "des-ede3" | |
227 | #define NID_des_ede3 33 | |
228 | ||
229 | #define SN_idea_cbc "IDEA-CBC" | |
230 | #define LN_idea_cbc "idea-cbc" | |
231 | #define NID_idea_cbc 34 | |
232 | ||
233 | #define SN_idea_cfb64 "IDEA-CFB" | |
234 | #define LN_idea_cfb64 "idea-cfb" | |
235 | #define NID_idea_cfb64 35 | |
236 | ||
237 | #define SN_idea_ecb "IDEA-ECB" | |
238 | #define LN_idea_ecb "idea-ecb" | |
239 | #define NID_idea_ecb 36 | |
240 | ||
241 | #define SN_rc2_cbc "RC2-CBC" | |
242 | #define LN_rc2_cbc "rc2-cbc" | |
243 | #define NID_rc2_cbc 37 | |
244 | #define OBJ_rc2_cbc OBJ_rsadsi,3L,2L | |
245 | ||
246 | #define SN_rc2_ecb "RC2-ECB" | |
247 | #define LN_rc2_ecb "rc2-ecb" | |
248 | #define NID_rc2_ecb 38 | |
249 | ||
250 | #define SN_rc2_cfb64 "RC2-CFB" | |
251 | #define LN_rc2_cfb64 "rc2-cfb" | |
252 | #define NID_rc2_cfb64 39 | |
253 | ||
254 | #define SN_rc2_ofb64 "RC2-OFB" | |
255 | #define LN_rc2_ofb64 "rc2-ofb" | |
256 | #define NID_rc2_ofb64 40 | |
257 | ||
258 | #define SN_sha "SHA" | |
259 | #define LN_sha "sha" | |
260 | #define NID_sha 41 | |
261 | #define OBJ_sha OBJ_algorithm,18L | |
262 | ||
263 | #define SN_shaWithRSAEncryption "RSA-SHA" | |
264 | #define LN_shaWithRSAEncryption "shaWithRSAEncryption" | |
265 | #define NID_shaWithRSAEncryption 42 | |
266 | #define OBJ_shaWithRSAEncryption OBJ_algorithm,15L | |
267 | ||
268 | #define SN_des_ede_cbc "DES-EDE-CBC" | |
269 | #define LN_des_ede_cbc "des-ede-cbc" | |
270 | #define NID_des_ede_cbc 43 | |
271 | ||
272 | #define SN_des_ede3_cbc "DES-EDE3-CBC" | |
273 | #define LN_des_ede3_cbc "des-ede3-cbc" | |
274 | #define NID_des_ede3_cbc 44 | |
275 | #define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L | |
276 | ||
277 | #define SN_des_ofb64 "DES-OFB" | |
278 | #define LN_des_ofb64 "des-ofb" | |
279 | #define NID_des_ofb64 45 | |
280 | #define OBJ_des_ofb64 OBJ_algorithm,8L | |
281 | ||
282 | #define SN_idea_ofb64 "IDEA-OFB" | |
283 | #define LN_idea_ofb64 "idea-ofb" | |
284 | #define NID_idea_ofb64 46 | |
285 | ||
286 | #define LN_pkcs9 "pkcs9" | |
287 | #define NID_pkcs9 47 | |
288 | #define OBJ_pkcs9 OBJ_pkcs,9L | |
289 | ||
290 | #define SN_pkcs9_emailAddress "Email" | |
291 | #define LN_pkcs9_emailAddress "emailAddress" | |
292 | #define NID_pkcs9_emailAddress 48 | |
293 | #define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L | |
294 | ||
295 | #define LN_pkcs9_unstructuredName "unstructuredName" | |
296 | #define NID_pkcs9_unstructuredName 49 | |
297 | #define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L | |
298 | ||
299 | #define LN_pkcs9_contentType "contentType" | |
300 | #define NID_pkcs9_contentType 50 | |
301 | #define OBJ_pkcs9_contentType OBJ_pkcs9,3L | |
302 | ||
303 | #define LN_pkcs9_messageDigest "messageDigest" | |
304 | #define NID_pkcs9_messageDigest 51 | |
305 | #define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L | |
306 | ||
307 | #define LN_pkcs9_signingTime "signingTime" | |
308 | #define NID_pkcs9_signingTime 52 | |
309 | #define OBJ_pkcs9_signingTime OBJ_pkcs9,5L | |
310 | ||
311 | #define LN_pkcs9_countersignature "countersignature" | |
312 | #define NID_pkcs9_countersignature 53 | |
313 | #define OBJ_pkcs9_countersignature OBJ_pkcs9,6L | |
314 | ||
315 | #define LN_pkcs9_challengePassword "challengePassword" | |
316 | #define NID_pkcs9_challengePassword 54 | |
317 | #define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L | |
318 | ||
319 | #define LN_pkcs9_unstructuredAddress "unstructuredAddress" | |
320 | #define NID_pkcs9_unstructuredAddress 55 | |
321 | #define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L | |
322 | ||
323 | #define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" | |
324 | #define NID_pkcs9_extCertAttributes 56 | |
325 | #define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L | |
326 | ||
327 | #define SN_netscape "Netscape" | |
328 | #define LN_netscape "Netscape Communications Corp." | |
329 | #define NID_netscape 57 | |
330 | #define OBJ_netscape 2L,16L,840L,1L,113730L | |
331 | ||
332 | #define SN_netscape_cert_extension "nsCertExt" | |
333 | #define LN_netscape_cert_extension "Netscape Certificate Extension" | |
334 | #define NID_netscape_cert_extension 58 | |
335 | #define OBJ_netscape_cert_extension OBJ_netscape,1L | |
336 | ||
337 | #define SN_netscape_data_type "nsDataType" | |
338 | #define LN_netscape_data_type "Netscape Data Type" | |
339 | #define NID_netscape_data_type 59 | |
340 | #define OBJ_netscape_data_type OBJ_netscape,2L | |
341 | ||
342 | #define SN_des_ede_cfb64 "DES-EDE-CFB" | |
343 | #define LN_des_ede_cfb64 "des-ede-cfb" | |
344 | #define NID_des_ede_cfb64 60 | |
345 | ||
346 | #define SN_des_ede3_cfb64 "DES-EDE3-CFB" | |
347 | #define LN_des_ede3_cfb64 "des-ede3-cfb" | |
348 | #define NID_des_ede3_cfb64 61 | |
349 | ||
350 | #define SN_des_ede_ofb64 "DES-EDE-OFB" | |
351 | #define LN_des_ede_ofb64 "des-ede-ofb" | |
352 | #define NID_des_ede_ofb64 62 | |
353 | ||
354 | #define SN_des_ede3_ofb64 "DES-EDE3-OFB" | |
355 | #define LN_des_ede3_ofb64 "des-ede3-ofb" | |
356 | #define NID_des_ede3_ofb64 63 | |
357 | ||
358 | /* I'm not sure about the object ID */ | |
359 | #define SN_sha1 "SHA1" | |
360 | #define LN_sha1 "sha1" | |
361 | #define NID_sha1 64 | |
362 | #define OBJ_sha1 OBJ_algorithm,26L | |
363 | /* 28 Jun 1996 - eay */ | |
364 | /* #define OBJ_sha1 1L,3L,14L,2L,26L,05L <- wrong */ | |
365 | ||
366 | #define SN_sha1WithRSAEncryption "RSA-SHA1" | |
367 | #define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" | |
368 | #define NID_sha1WithRSAEncryption 65 | |
369 | #define OBJ_sha1WithRSAEncryption OBJ_pkcs,1L,5L | |
370 | ||
371 | #define SN_dsaWithSHA "DSA-SHA" | |
372 | #define LN_dsaWithSHA "dsaWithSHA" | |
373 | #define NID_dsaWithSHA 66 | |
374 | #define OBJ_dsaWithSHA OBJ_algorithm,13L | |
375 | ||
58964a49 RE |
376 | #define SN_dsa_2 "DSA-old" |
377 | #define LN_dsa_2 "dsaEncryption-old" | |
378 | #define NID_dsa_2 67 | |
379 | #define OBJ_dsa_2 OBJ_algorithm,12L | |
d02b48c6 RE |
380 | |
381 | /* proposed by microsoft to RSA */ | |
382 | #define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" | |
383 | #define NID_pbeWithSHA1AndRC2_CBC 68 | |
384 | #define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L | |
385 | ||
386 | /* proposed by microsoft to RSA */ | |
387 | #define LN_pbeWithSHA1AndRC4 "pbeWithSHA1AndRC4" | |
388 | #define NID_pbeWithSHA1AndRC4 69 | |
389 | #define OBJ_pbeWithSHA1AndRC4 OBJ_pkcs,5L,12L | |
390 | ||
58964a49 RE |
391 | #define SN_dsaWithSHA1_2 "DSA-SHA1-old" |
392 | #define LN_dsaWithSHA1_2 "dsaWithSHA1" | |
393 | #define NID_dsaWithSHA1_2 70 | |
d02b48c6 | 394 | /* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */ |
58964a49 | 395 | #define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L |
d02b48c6 RE |
396 | |
397 | #define SN_netscape_cert_type "nsCertType" | |
398 | #define LN_netscape_cert_type "Netscape Cert Type" | |
399 | #define NID_netscape_cert_type 71 | |
400 | #define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L | |
401 | ||
402 | #define SN_netscape_base_url "nsBaseUrl" | |
403 | #define LN_netscape_base_url "Netscape Base Url" | |
404 | #define NID_netscape_base_url 72 | |
405 | #define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L | |
406 | ||
407 | #define SN_netscape_revocation_url "nsRevocationUrl" | |
408 | #define LN_netscape_revocation_url "Netscape Revocation Url" | |
409 | #define NID_netscape_revocation_url 73 | |
410 | #define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L | |
411 | ||
412 | #define SN_netscape_ca_revocation_url "nsCaRevocationUrl" | |
413 | #define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" | |
414 | #define NID_netscape_ca_revocation_url 74 | |
415 | #define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L | |
416 | ||
417 | #define SN_netscape_renewal_url "nsRenewalUrl" | |
418 | #define LN_netscape_renewal_url "Netscape Renewal Url" | |
419 | #define NID_netscape_renewal_url 75 | |
420 | #define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L | |
421 | ||
422 | #define SN_netscape_ca_policy_url "nsCaPolicyUrl" | |
423 | #define LN_netscape_ca_policy_url "Netscape CA Policy Url" | |
424 | #define NID_netscape_ca_policy_url 76 | |
425 | #define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L | |
426 | ||
427 | #define SN_netscape_ssl_server_name "nsSslServerName" | |
428 | #define LN_netscape_ssl_server_name "Netscape SSL Server Name" | |
429 | #define NID_netscape_ssl_server_name 77 | |
430 | #define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L | |
431 | ||
432 | #define SN_netscape_comment "nsComment" | |
433 | #define LN_netscape_comment "Netscape Comment" | |
434 | #define NID_netscape_comment 78 | |
435 | #define OBJ_netscape_comment OBJ_netscape_cert_extension,13L | |
436 | ||
437 | #define SN_netscape_cert_sequence "nsCertSequence" | |
438 | #define LN_netscape_cert_sequence "Netscape Certificate Sequence" | |
439 | #define NID_netscape_cert_sequence 79 | |
440 | #define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L | |
441 | ||
442 | #define SN_desx_cbc "DESX-CBC" | |
443 | #define LN_desx_cbc "desx-cbc" | |
444 | #define NID_desx_cbc 80 | |
445 | ||
446 | #define SN_ld_ce "ld-ce" | |
447 | #define NID_ld_ce 81 | |
448 | #define OBJ_ld_ce 2L,5L,29L | |
449 | ||
450 | #define SN_subject_key_identifier "subjectKeyIdentifier" | |
451 | #define LN_subject_key_identifier "X509v3 Subject Key Identifier" | |
452 | #define NID_subject_key_identifier 82 | |
453 | #define OBJ_subject_key_identifier OBJ_ld_ce,14L | |
454 | ||
455 | #define SN_key_usage "keyUsage" | |
456 | #define LN_key_usage "X509v3 Key Usage" | |
457 | #define NID_key_usage 83 | |
458 | #define OBJ_key_usage OBJ_ld_ce,15L | |
459 | ||
460 | #define SN_private_key_usage_period "privateKeyUsagePeriod" | |
461 | #define LN_private_key_usage_period "X509v3 Private Key Usage Period" | |
462 | #define NID_private_key_usage_period 84 | |
463 | #define OBJ_private_key_usage_period OBJ_ld_ce,16L | |
464 | ||
465 | #define SN_subject_alt_name "subjectAltName" | |
466 | #define LN_subject_alt_name "X509v3 Subject Alternative Name" | |
467 | #define NID_subject_alt_name 85 | |
468 | #define OBJ_subject_alt_name OBJ_ld_ce,17L | |
469 | ||
470 | #define SN_issuer_alt_name "issuerAltName" | |
471 | #define LN_issuer_alt_name "X509v3 Issuer Alternative Name" | |
472 | #define NID_issuer_alt_name 86 | |
473 | #define OBJ_issuer_alt_name OBJ_ld_ce,18L | |
474 | ||
475 | #define SN_basic_constraints "basicConstraints" | |
476 | #define LN_basic_constraints "X509v3 Basic Constraints" | |
477 | #define NID_basic_constraints 87 | |
478 | #define OBJ_basic_constraints OBJ_ld_ce,19L | |
479 | ||
480 | #define SN_crl_number "crlNumber" | |
481 | #define LN_crl_number "X509v3 CRL Number" | |
482 | #define NID_crl_number 88 | |
483 | #define OBJ_crl_number OBJ_ld_ce,20L | |
484 | ||
485 | #define SN_certificate_policies "certificatePolicies" | |
486 | #define LN_certificate_policies "X509v3 Certificate Policies" | |
487 | #define NID_certificate_policies 89 | |
488 | #define OBJ_certificate_policies OBJ_ld_ce,32L | |
489 | ||
490 | #define SN_authority_key_identifier "authorityKeyIdentifier" | |
491 | #define LN_authority_key_identifier "X509v3 Authority Key Identifier" | |
492 | #define NID_authority_key_identifier 90 | |
493 | #define OBJ_authority_key_identifier OBJ_ld_ce,35L | |
494 | ||
495 | #define SN_bf_cbc "BF-CBC" | |
496 | #define LN_bf_cbc "bf-cbc" | |
497 | #define NID_bf_cbc 91 | |
498 | ||
499 | #define SN_bf_ecb "BF-ECB" | |
500 | #define LN_bf_ecb "bf-ecb" | |
501 | #define NID_bf_ecb 92 | |
502 | ||
503 | #define SN_bf_cfb64 "BF-CFB" | |
504 | #define LN_bf_cfb64 "bf-cfb" | |
505 | #define NID_bf_cfb64 93 | |
506 | ||
507 | #define SN_bf_ofb64 "BF-OFB" | |
508 | #define LN_bf_ofb64 "bf-ofb" | |
509 | #define NID_bf_ofb64 94 | |
510 | ||
511 | #define SN_mdc2 "MDC2" | |
512 | #define LN_mdc2 "mdc2" | |
513 | #define NID_mdc2 95 | |
514 | #define OBJ_mdc2 2L,5L,8L,3L,101L | |
58964a49 | 515 | /* An alternative? 1L,3L,14L,3L,2L,19L */ |
d02b48c6 RE |
516 | |
517 | #define SN_mdc2WithRSA "RSA-MDC2" | |
518 | #define LN_mdc2WithRSA "mdc2withRSA" | |
519 | #define NID_mdc2WithRSA 96 | |
520 | #define OBJ_mdc2WithRSA 2L,5L,8L,3L,100L | |
521 | ||
58964a49 RE |
522 | #define SN_rc4_40 "RC4-40" |
523 | #define LN_rc4_40 "rc4-40" | |
524 | #define NID_rc4_40 97 | |
525 | ||
526 | #define SN_rc2_40_cbc "RC2-40-CBC" | |
527 | #define LN_rc2_40_cbc "rc2-40-cbc" | |
528 | #define NID_rc2_40_cbc 98 | |
529 | ||
530 | #define SN_givenName "G" | |
531 | #define LN_givenName "givenName" | |
532 | #define NID_givenName 99 | |
533 | #define OBJ_givenName OBJ_X509,42L | |
534 | ||
535 | #define SN_surname "S" | |
536 | #define LN_surname "surname" | |
537 | #define NID_surname 100 | |
538 | #define OBJ_surname OBJ_X509,4L | |
539 | ||
540 | #define SN_initials "I" | |
541 | #define LN_initials "initials" | |
542 | #define NID_initials 101 | |
543 | #define OBJ_initials OBJ_X509,43L | |
544 | ||
545 | #define SN_uniqueIdentifier "UID" | |
546 | #define LN_uniqueIdentifier "uniqueIdentifier" | |
547 | #define NID_uniqueIdentifier 102 | |
548 | #define OBJ_uniqueIdentifier OBJ_X509,45L | |
549 | ||
550 | #define SN_crl_distribution_points "crlDistributionPoints" | |
551 | #define LN_crl_distribution_points "X509v3 CRL Distribution Points" | |
552 | #define NID_crl_distribution_points 103 | |
553 | #define OBJ_crl_distribution_points OBJ_ld_ce,31L | |
554 | ||
555 | #define SN_md5WithRSA "RSA-NP-MD5" | |
556 | #define LN_md5WithRSA "md5WithRSA" | |
557 | #define NID_md5WithRSA 104 | |
558 | #define OBJ_md5WithRSA OBJ_algorithm,3L | |
559 | ||
560 | #define SN_serialNumber "SN" | |
561 | #define LN_serialNumber "serialNumber" | |
562 | #define NID_serialNumber 105 | |
563 | #define OBJ_serialNumber OBJ_X509,5L | |
564 | ||
565 | #define SN_title "T" | |
566 | #define LN_title "title" | |
567 | #define NID_title 106 | |
568 | #define OBJ_title OBJ_X509,12L | |
569 | ||
570 | #define SN_description "D" | |
571 | #define LN_description "description" | |
572 | #define NID_description 107 | |
573 | #define OBJ_description OBJ_X509,13L | |
574 | ||
575 | /* CAST5 is CAST-128, I'm just sticking with the documentation */ | |
576 | #define SN_cast5_cbc "CAST5-CBC" | |
577 | #define LN_cast5_cbc "cast5-cbc" | |
578 | #define NID_cast5_cbc 108 | |
579 | #define OBJ_cast5_cbc 1L,2L,840L,113533L,7L,66L,10L | |
580 | ||
581 | #define SN_cast5_ecb "CAST5-ECB" | |
582 | #define LN_cast5_ecb "cast5-ecb" | |
583 | #define NID_cast5_ecb 109 | |
584 | ||
585 | #define SN_cast5_cfb64 "CAST5-CFB" | |
586 | #define LN_cast5_cfb64 "cast5-cfb" | |
587 | #define NID_cast5_cfb64 110 | |
588 | ||
589 | #define SN_cast5_ofb64 "CAST5-OFB" | |
590 | #define LN_cast5_ofb64 "cast5-ofb" | |
591 | #define NID_cast5_ofb64 111 | |
592 | ||
593 | #define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" | |
594 | #define NID_pbeWithMD5AndCast5_CBC 112 | |
595 | #define OBJ_pbeWithMD5AndCast5_CBC 1L,2L,840L,113533L,7L,66L,12L | |
596 | ||
597 | /* This is one sun will soon be using :-( | |
598 | * id-dsa-with-sha1 ID ::= { | |
599 | * iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 } | |
600 | */ | |
601 | #define SN_dsaWithSHA1 "DSA-SHA1" | |
602 | #define LN_dsaWithSHA1 "dsaWithSHA1" | |
603 | #define NID_dsaWithSHA1 113 | |
604 | #define OBJ_dsaWithSHA1 1L,2L,840L,10040L,4L,3L | |
605 | ||
606 | #define NID_md5_sha1 114 | |
607 | #define SN_md5_sha1 "MD5-SHA1" | |
608 | #define LN_md5_sha1 "md5-sha1" | |
609 | ||
610 | #define SN_sha1WithRSA "RSA-SHA1-2" | |
611 | #define LN_sha1WithRSA "sha1WithRSA" | |
612 | #define NID_sha1WithRSA 115 | |
613 | #define OBJ_sha1WithRSA OBJ_algorithm,29L | |
614 | ||
615 | #define SN_dsa "DSA" | |
616 | #define LN_dsa "dsaEncryption" | |
617 | #define NID_dsa 116 | |
618 | #define OBJ_dsa 1L,2L,840L,10040L,4L,1L | |
619 | ||
620 | #define SN_ripemd160 "RIPEMD160" | |
621 | #define LN_ripemd160 "ripemd160" | |
622 | #define NID_ripemd160 117 | |
623 | #define OBJ_ripemd160 1L,3L,36L,3L,2L,1L | |
624 | ||
625 | /* The name should actually be rsaSignatureWithripemd160, but I'm going | |
626 | * to contiune using the convention I'm using with the other ciphers */ | |
627 | #define SN_ripemd160WithRSA "RSA-RIPEMD160" | |
628 | #define LN_ripemd160WithRSA "ripemd160WithRSA" | |
629 | #define NID_ripemd160WithRSA 119 | |
630 | #define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L | |
631 | ||
632 | /* Taken from rfc2040 | |
633 | * RC5_CBC_Parameters ::= SEQUENCE { | |
634 | * version INTEGER (v1_0(16)), | |
635 | * rounds INTEGER (8..127), | |
636 | * blockSizeInBits INTEGER (64, 128), | |
637 | * iv OCTET STRING OPTIONAL | |
638 | * } | |
639 | */ | |
640 | #define SN_rc5_cbc "RC5-CBC" | |
641 | #define LN_rc5_cbc "rc5-cbc" | |
642 | #define NID_rc5_cbc 120 | |
643 | #define OBJ_rc5_cbc OBJ_rsadsi,3L,8L | |
644 | ||
645 | #define SN_rc5_ecb "RC5-ECB" | |
646 | #define LN_rc5_ecb "rc5-ecb" | |
647 | #define NID_rc5_ecb 121 | |
648 | ||
649 | #define SN_rc5_cfb64 "RC5-CFB" | |
650 | #define LN_rc5_cfb64 "rc5-cfb" | |
651 | #define NID_rc5_cfb64 122 | |
652 | ||
653 | #define SN_rc5_ofb64 "RC5-OFB" | |
654 | #define LN_rc5_ofb64 "rc5-ofb" | |
655 | #define NID_rc5_ofb64 123 | |
656 | ||
657 | #include "bio.h" | |
d02b48c6 RE |
658 | #include "asn1.h" |
659 | ||
58964a49 RE |
660 | #define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) |
661 | ||
d02b48c6 RE |
662 | #ifndef NOPROTO |
663 | ||
664 | ASN1_OBJECT * OBJ_dup(ASN1_OBJECT *o); | |
665 | ASN1_OBJECT * OBJ_nid2obj(int n); | |
666 | char * OBJ_nid2ln(int n); | |
667 | char * OBJ_nid2sn(int n); | |
668 | int OBJ_obj2nid(ASN1_OBJECT *o); | |
669 | int OBJ_txt2nid(char *s); | |
670 | int OBJ_ln2nid(char *s); | |
671 | int OBJ_sn2nid(char *s); | |
672 | int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b); | |
673 | char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)()); | |
674 | ||
675 | void ERR_load_OBJ_strings(void ); | |
676 | ||
677 | int OBJ_new_nid(int num); | |
678 | int OBJ_add_object(ASN1_OBJECT *obj); | |
58964a49 | 679 | int OBJ_create(char *oid,char *sn,char *ln); |
d02b48c6 | 680 | void OBJ_cleanup(void ); |
58964a49 | 681 | int OBJ_create_objects(BIO *in); |
d02b48c6 RE |
682 | |
683 | #else | |
684 | ||
685 | ASN1_OBJECT * OBJ_dup(); | |
686 | ASN1_OBJECT * OBJ_nid2obj(); | |
687 | char * OBJ_nid2ln(); | |
688 | char * OBJ_nid2sn(); | |
689 | int OBJ_obj2nid(); | |
690 | int OBJ_txt2nid(); | |
691 | int OBJ_ln2nid(); | |
692 | int OBJ_sn2nid(); | |
693 | int OBJ_cmp(); | |
694 | char * OBJ_bsearch(); | |
695 | ||
696 | void ERR_load_OBJ_strings(); | |
697 | ||
698 | int OBJ_new_nid(); | |
699 | int OBJ_add_object(); | |
58964a49 | 700 | int OBJ_create(); |
d02b48c6 | 701 | void OBJ_cleanup(); |
58964a49 | 702 | int OBJ_create_objects(); |
d02b48c6 RE |
703 | |
704 | #endif | |
705 | ||
706 | /* BEGIN ERROR CODES */ | |
707 | /* Error codes for the OBJ functions. */ | |
708 | ||
709 | /* Function codes. */ | |
58964a49 | 710 | #define OBJ_F_OBJ_CREATE 100 |
d02b48c6 RE |
711 | #define OBJ_F_OBJ_DUP 101 |
712 | #define OBJ_F_OBJ_NID2LN 102 | |
713 | #define OBJ_F_OBJ_NID2OBJ 103 | |
714 | #define OBJ_F_OBJ_NID2SN 104 | |
715 | ||
716 | /* Reason codes. */ | |
717 | #define OBJ_R_MALLOC_FAILURE 100 | |
718 | #define OBJ_R_UNKNOWN_NID 101 | |
719 | ||
720 | #ifdef __cplusplus | |
721 | } | |
722 | #endif | |
723 | #endif | |
724 |