* tar xzf utvpn-src-unix-v101-7101-public-2010.06.27.tar.gz
[lab.git] / utvpn / utvpn-unix-v101-7101-public / src / Mayaqua / openssl / objects.h
1 /* crypto/objects/objects.h */\r
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\r
3  * All rights reserved.\r
4  *\r
5  * This package is an SSL implementation written\r
6  * by Eric Young (eay@cryptsoft.com).\r
7  * The implementation was written so as to conform with Netscapes SSL.\r
8  * \r
9  * This library is free for commercial and non-commercial use as long as\r
10  * the following conditions are aheared to.  The following conditions\r
11  * apply to all code found in this distribution, be it the RC4, RSA,\r
12  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\r
13  * included with this distribution is covered by the same copyright terms\r
14  * except that the holder is Tim Hudson (tjh@cryptsoft.com).\r
15  * \r
16  * Copyright remains Eric Young's, and as such any Copyright notices in\r
17  * the code are not to be removed.\r
18  * If this package is used in a product, Eric Young should be given attribution\r
19  * as the author of the parts of the library used.\r
20  * This can be in the form of a textual message at program startup or\r
21  * in documentation (online or textual) provided with the package.\r
22  * \r
23  * Redistribution and use in source and binary forms, with or without\r
24  * modification, are permitted provided that the following conditions\r
25  * are met:\r
26  * 1. Redistributions of source code must retain the copyright\r
27  *    notice, this list of conditions and the following disclaimer.\r
28  * 2. Redistributions in binary form must reproduce the above copyright\r
29  *    notice, this list of conditions and the following disclaimer in the\r
30  *    documentation and/or other materials provided with the distribution.\r
31  * 3. All advertising materials mentioning features or use of this software\r
32  *    must display the following acknowledgement:\r
33  *    "This product includes cryptographic software written by\r
34  *     Eric Young (eay@cryptsoft.com)"\r
35  *    The word 'cryptographic' can be left out if the rouines from the library\r
36  *    being used are not cryptographic related :-).\r
37  * 4. If you include any Windows specific code (or a derivative thereof) from \r
38  *    the apps directory (application code) you must include an acknowledgement:\r
39  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"\r
40  * \r
41  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\r
42  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
43  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
44  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\r
45  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
46  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
47  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
48  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
49  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
50  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
51  * SUCH DAMAGE.\r
52  * \r
53  * The licence and distribution terms for any publically available version or\r
54  * derivative of this code cannot be changed.  i.e. this code cannot simply be\r
55  * copied and put under another distribution licence\r
56  * [including the GNU Public Licence.]\r
57  */\r
58 \r
59 #ifndef HEADER_OBJECTS_H\r
60 #define HEADER_OBJECTS_H\r
61 \r
62 #define USE_OBJ_MAC\r
63 \r
64 #ifdef USE_OBJ_MAC\r
65 #include <openssl/obj_mac.h>\r
66 #else\r
67 #define SN_undef                        "UNDEF"\r
68 #define LN_undef                        "undefined"\r
69 #define NID_undef                       0\r
70 #define OBJ_undef                       0L\r
71 \r
72 #define SN_Algorithm                    "Algorithm"\r
73 #define LN_algorithm                    "algorithm"\r
74 #define NID_algorithm                   38\r
75 #define OBJ_algorithm                   1L,3L,14L,3L,2L\r
76 \r
77 #define LN_rsadsi                       "rsadsi"\r
78 #define NID_rsadsi                      1\r
79 #define OBJ_rsadsi                      1L,2L,840L,113549L\r
80 \r
81 #define LN_pkcs                         "pkcs"\r
82 #define NID_pkcs                        2\r
83 #define OBJ_pkcs                        OBJ_rsadsi,1L\r
84 \r
85 #define SN_md2                          "MD2"\r
86 #define LN_md2                          "md2"\r
87 #define NID_md2                         3\r
88 #define OBJ_md2                         OBJ_rsadsi,2L,2L\r
89 \r
90 #define SN_md5                          "MD5"\r
91 #define LN_md5                          "md5"\r
92 #define NID_md5                         4\r
93 #define OBJ_md5                         OBJ_rsadsi,2L,5L\r
94 \r
95 #define SN_rc4                          "RC4"\r
96 #define LN_rc4                          "rc4"\r
97 #define NID_rc4                         5\r
98 #define OBJ_rc4                         OBJ_rsadsi,3L,4L\r
99 \r
100 #define LN_rsaEncryption                "rsaEncryption"\r
101 #define NID_rsaEncryption               6\r
102 #define OBJ_rsaEncryption               OBJ_pkcs,1L,1L\r
103 \r
104 #define SN_md2WithRSAEncryption         "RSA-MD2"\r
105 #define LN_md2WithRSAEncryption         "md2WithRSAEncryption"\r
106 #define NID_md2WithRSAEncryption        7\r
107 #define OBJ_md2WithRSAEncryption        OBJ_pkcs,1L,2L\r
108 \r
109 #define SN_md5WithRSAEncryption         "RSA-MD5"\r
110 #define LN_md5WithRSAEncryption         "md5WithRSAEncryption"\r
111 #define NID_md5WithRSAEncryption        8\r
112 #define OBJ_md5WithRSAEncryption        OBJ_pkcs,1L,4L\r
113 \r
114 #define SN_pbeWithMD2AndDES_CBC         "PBE-MD2-DES"\r
115 #define LN_pbeWithMD2AndDES_CBC         "pbeWithMD2AndDES-CBC"\r
116 #define NID_pbeWithMD2AndDES_CBC        9\r
117 #define OBJ_pbeWithMD2AndDES_CBC        OBJ_pkcs,5L,1L\r
118 \r
119 #define SN_pbeWithMD5AndDES_CBC         "PBE-MD5-DES"\r
120 #define LN_pbeWithMD5AndDES_CBC         "pbeWithMD5AndDES-CBC"\r
121 #define NID_pbeWithMD5AndDES_CBC        10\r
122 #define OBJ_pbeWithMD5AndDES_CBC        OBJ_pkcs,5L,3L\r
123 \r
124 #define LN_X500                         "X500"\r
125 #define NID_X500                        11\r
126 #define OBJ_X500                        2L,5L\r
127 \r
128 #define LN_X509                         "X509"\r
129 #define NID_X509                        12\r
130 #define OBJ_X509                        OBJ_X500,4L\r
131 \r
132 #define SN_commonName                   "CN"\r
133 #define LN_commonName                   "commonName"\r
134 #define NID_commonName                  13\r
135 #define OBJ_commonName                  OBJ_X509,3L\r
136 \r
137 #define SN_countryName                  "C"\r
138 #define LN_countryName                  "countryName"\r
139 #define NID_countryName                 14\r
140 #define OBJ_countryName                 OBJ_X509,6L\r
141 \r
142 #define SN_localityName                 "L"\r
143 #define LN_localityName                 "localityName"\r
144 #define NID_localityName                15\r
145 #define OBJ_localityName                OBJ_X509,7L\r
146 \r
147 /* Postal Address? PA */\r
148 \r
149 /* should be "ST" (rfc1327) but MS uses 'S' */\r
150 #define SN_stateOrProvinceName          "ST"\r
151 #define LN_stateOrProvinceName          "stateOrProvinceName"\r
152 #define NID_stateOrProvinceName         16\r
153 #define OBJ_stateOrProvinceName         OBJ_X509,8L\r
154 \r
155 #define SN_organizationName             "O"\r
156 #define LN_organizationName             "organizationName"\r
157 #define NID_organizationName            17\r
158 #define OBJ_organizationName            OBJ_X509,10L\r
159 \r
160 #define SN_organizationalUnitName       "OU"\r
161 #define LN_organizationalUnitName       "organizationalUnitName"\r
162 #define NID_organizationalUnitName      18\r
163 #define OBJ_organizationalUnitName      OBJ_X509,11L\r
164 \r
165 #define SN_rsa                          "RSA"\r
166 #define LN_rsa                          "rsa"\r
167 #define NID_rsa                         19\r
168 #define OBJ_rsa                         OBJ_X500,8L,1L,1L\r
169 \r
170 #define LN_pkcs7                        "pkcs7"\r
171 #define NID_pkcs7                       20\r
172 #define OBJ_pkcs7                       OBJ_pkcs,7L\r
173 \r
174 #define LN_pkcs7_data                   "pkcs7-data"\r
175 #define NID_pkcs7_data                  21\r
176 #define OBJ_pkcs7_data                  OBJ_pkcs7,1L\r
177 \r
178 #define LN_pkcs7_signed                 "pkcs7-signedData"\r
179 #define NID_pkcs7_signed                22\r
180 #define OBJ_pkcs7_signed                OBJ_pkcs7,2L\r
181 \r
182 #define LN_pkcs7_enveloped              "pkcs7-envelopedData"\r
183 #define NID_pkcs7_enveloped             23\r
184 #define OBJ_pkcs7_enveloped             OBJ_pkcs7,3L\r
185 \r
186 #define LN_pkcs7_signedAndEnveloped     "pkcs7-signedAndEnvelopedData"\r
187 #define NID_pkcs7_signedAndEnveloped    24\r
188 #define OBJ_pkcs7_signedAndEnveloped    OBJ_pkcs7,4L\r
189 \r
190 #define LN_pkcs7_digest                 "pkcs7-digestData"\r
191 #define NID_pkcs7_digest                25\r
192 #define OBJ_pkcs7_digest                OBJ_pkcs7,5L\r
193 \r
194 #define LN_pkcs7_encrypted              "pkcs7-encryptedData"\r
195 #define NID_pkcs7_encrypted             26\r
196 #define OBJ_pkcs7_encrypted             OBJ_pkcs7,6L\r
197 \r
198 #define LN_pkcs3                        "pkcs3"\r
199 #define NID_pkcs3                       27\r
200 #define OBJ_pkcs3                       OBJ_pkcs,3L\r
201 \r
202 #define LN_dhKeyAgreement               "dhKeyAgreement"\r
203 #define NID_dhKeyAgreement              28\r
204 #define OBJ_dhKeyAgreement              OBJ_pkcs3,1L\r
205 \r
206 #define SN_des_ecb                      "DES-ECB"\r
207 #define LN_des_ecb                      "des-ecb"\r
208 #define NID_des_ecb                     29\r
209 #define OBJ_des_ecb                     OBJ_algorithm,6L\r
210 \r
211 #define SN_des_cfb64                    "DES-CFB"\r
212 #define LN_des_cfb64                    "des-cfb"\r
213 #define NID_des_cfb64                   30\r
214 /* IV + num */\r
215 #define OBJ_des_cfb64                   OBJ_algorithm,9L\r
216 \r
217 #define SN_des_cbc                      "DES-CBC"\r
218 #define LN_des_cbc                      "des-cbc"\r
219 #define NID_des_cbc                     31\r
220 /* IV */\r
221 #define OBJ_des_cbc                     OBJ_algorithm,7L\r
222 \r
223 #define SN_des_ede                      "DES-EDE"\r
224 #define LN_des_ede                      "des-ede"\r
225 #define NID_des_ede                     32\r
226 /* ?? */\r
227 #define OBJ_des_ede                     OBJ_algorithm,17L\r
228 \r
229 #define SN_des_ede3                     "DES-EDE3"\r
230 #define LN_des_ede3                     "des-ede3"\r
231 #define NID_des_ede3                    33\r
232 \r
233 #define SN_idea_cbc                     "IDEA-CBC"\r
234 #define LN_idea_cbc                     "idea-cbc"\r
235 #define NID_idea_cbc                    34\r
236 #define OBJ_idea_cbc                    1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L\r
237 \r
238 #define SN_idea_cfb64                   "IDEA-CFB"\r
239 #define LN_idea_cfb64                   "idea-cfb"\r
240 #define NID_idea_cfb64                  35\r
241 \r
242 #define SN_idea_ecb                     "IDEA-ECB"\r
243 #define LN_idea_ecb                     "idea-ecb"\r
244 #define NID_idea_ecb                    36\r
245 \r
246 #define SN_rc2_cbc                      "RC2-CBC"\r
247 #define LN_rc2_cbc                      "rc2-cbc"\r
248 #define NID_rc2_cbc                     37\r
249 #define OBJ_rc2_cbc                     OBJ_rsadsi,3L,2L\r
250 \r
251 #define SN_rc2_ecb                      "RC2-ECB"\r
252 #define LN_rc2_ecb                      "rc2-ecb"\r
253 #define NID_rc2_ecb                     38\r
254 \r
255 #define SN_rc2_cfb64                    "RC2-CFB"\r
256 #define LN_rc2_cfb64                    "rc2-cfb"\r
257 #define NID_rc2_cfb64                   39\r
258 \r
259 #define SN_rc2_ofb64                    "RC2-OFB"\r
260 #define LN_rc2_ofb64                    "rc2-ofb"\r
261 #define NID_rc2_ofb64                   40\r
262 \r
263 #define SN_sha                          "SHA"\r
264 #define LN_sha                          "sha"\r
265 #define NID_sha                         41\r
266 #define OBJ_sha                         OBJ_algorithm,18L\r
267 \r
268 #define SN_shaWithRSAEncryption         "RSA-SHA"\r
269 #define LN_shaWithRSAEncryption         "shaWithRSAEncryption"\r
270 #define NID_shaWithRSAEncryption        42\r
271 #define OBJ_shaWithRSAEncryption        OBJ_algorithm,15L\r
272 \r
273 #define SN_des_ede_cbc                  "DES-EDE-CBC"\r
274 #define LN_des_ede_cbc                  "des-ede-cbc"\r
275 #define NID_des_ede_cbc                 43\r
276 \r
277 #define SN_des_ede3_cbc                 "DES-EDE3-CBC"\r
278 #define LN_des_ede3_cbc                 "des-ede3-cbc"\r
279 #define NID_des_ede3_cbc                44\r
280 #define OBJ_des_ede3_cbc                OBJ_rsadsi,3L,7L\r
281 \r
282 #define SN_des_ofb64                    "DES-OFB"\r
283 #define LN_des_ofb64                    "des-ofb"\r
284 #define NID_des_ofb64                   45\r
285 #define OBJ_des_ofb64                   OBJ_algorithm,8L\r
286 \r
287 #define SN_idea_ofb64                   "IDEA-OFB"\r
288 #define LN_idea_ofb64                   "idea-ofb"\r
289 #define NID_idea_ofb64                  46\r
290 \r
291 #define LN_pkcs9                        "pkcs9"\r
292 #define NID_pkcs9                       47\r
293 #define OBJ_pkcs9                       OBJ_pkcs,9L\r
294 \r
295 #define SN_pkcs9_emailAddress           "Email"\r
296 #define LN_pkcs9_emailAddress           "emailAddress"\r
297 #define NID_pkcs9_emailAddress          48\r
298 #define OBJ_pkcs9_emailAddress          OBJ_pkcs9,1L\r
299 \r
300 #define LN_pkcs9_unstructuredName       "unstructuredName"\r
301 #define NID_pkcs9_unstructuredName      49\r
302 #define OBJ_pkcs9_unstructuredName      OBJ_pkcs9,2L\r
303 \r
304 #define LN_pkcs9_contentType            "contentType"\r
305 #define NID_pkcs9_contentType           50\r
306 #define OBJ_pkcs9_contentType           OBJ_pkcs9,3L\r
307 \r
308 #define LN_pkcs9_messageDigest          "messageDigest"\r
309 #define NID_pkcs9_messageDigest         51\r
310 #define OBJ_pkcs9_messageDigest         OBJ_pkcs9,4L\r
311 \r
312 #define LN_pkcs9_signingTime            "signingTime"\r
313 #define NID_pkcs9_signingTime           52\r
314 #define OBJ_pkcs9_signingTime           OBJ_pkcs9,5L\r
315 \r
316 #define LN_pkcs9_countersignature       "countersignature"\r
317 #define NID_pkcs9_countersignature      53\r
318 #define OBJ_pkcs9_countersignature      OBJ_pkcs9,6L\r
319 \r
320 #define LN_pkcs9_challengePassword      "challengePassword"\r
321 #define NID_pkcs9_challengePassword     54\r
322 #define OBJ_pkcs9_challengePassword     OBJ_pkcs9,7L\r
323 \r
324 #define LN_pkcs9_unstructuredAddress    "unstructuredAddress"\r
325 #define NID_pkcs9_unstructuredAddress   55\r
326 #define OBJ_pkcs9_unstructuredAddress   OBJ_pkcs9,8L\r
327 \r
328 #define LN_pkcs9_extCertAttributes      "extendedCertificateAttributes"\r
329 #define NID_pkcs9_extCertAttributes     56\r
330 #define OBJ_pkcs9_extCertAttributes     OBJ_pkcs9,9L\r
331 \r
332 #define SN_netscape                     "Netscape"\r
333 #define LN_netscape                     "Netscape Communications Corp."\r
334 #define NID_netscape                    57\r
335 #define OBJ_netscape                    2L,16L,840L,1L,113730L\r
336 \r
337 #define SN_netscape_cert_extension      "nsCertExt"\r
338 #define LN_netscape_cert_extension      "Netscape Certificate Extension"\r
339 #define NID_netscape_cert_extension     58\r
340 #define OBJ_netscape_cert_extension     OBJ_netscape,1L\r
341 \r
342 #define SN_netscape_data_type           "nsDataType"\r
343 #define LN_netscape_data_type           "Netscape Data Type"\r
344 #define NID_netscape_data_type          59\r
345 #define OBJ_netscape_data_type          OBJ_netscape,2L\r
346 \r
347 #define SN_des_ede_cfb64                "DES-EDE-CFB"\r
348 #define LN_des_ede_cfb64                "des-ede-cfb"\r
349 #define NID_des_ede_cfb64               60\r
350 \r
351 #define SN_des_ede3_cfb64               "DES-EDE3-CFB"\r
352 #define LN_des_ede3_cfb64               "des-ede3-cfb"\r
353 #define NID_des_ede3_cfb64              61\r
354 \r
355 #define SN_des_ede_ofb64                "DES-EDE-OFB"\r
356 #define LN_des_ede_ofb64                "des-ede-ofb"\r
357 #define NID_des_ede_ofb64               62\r
358 \r
359 #define SN_des_ede3_ofb64               "DES-EDE3-OFB"\r
360 #define LN_des_ede3_ofb64               "des-ede3-ofb"\r
361 #define NID_des_ede3_ofb64              63\r
362 \r
363 /* I'm not sure about the object ID */\r
364 #define SN_sha1                         "SHA1"\r
365 #define LN_sha1                         "sha1"\r
366 #define NID_sha1                        64\r
367 #define OBJ_sha1                        OBJ_algorithm,26L\r
368 /* 28 Jun 1996 - eay */\r
369 /* #define OBJ_sha1                     1L,3L,14L,2L,26L,05L <- wrong */\r
370 \r
371 #define SN_sha1WithRSAEncryption        "RSA-SHA1"\r
372 #define LN_sha1WithRSAEncryption        "sha1WithRSAEncryption"\r
373 #define NID_sha1WithRSAEncryption       65\r
374 #define OBJ_sha1WithRSAEncryption       OBJ_pkcs,1L,5L\r
375 \r
376 #define SN_dsaWithSHA                   "DSA-SHA"\r
377 #define LN_dsaWithSHA                   "dsaWithSHA"\r
378 #define NID_dsaWithSHA                  66\r
379 #define OBJ_dsaWithSHA                  OBJ_algorithm,13L\r
380 \r
381 #define SN_dsa_2                        "DSA-old"\r
382 #define LN_dsa_2                        "dsaEncryption-old"\r
383 #define NID_dsa_2                       67\r
384 #define OBJ_dsa_2                       OBJ_algorithm,12L\r
385 \r
386 /* proposed by microsoft to RSA */\r
387 #define SN_pbeWithSHA1AndRC2_CBC        "PBE-SHA1-RC2-64"\r
388 #define LN_pbeWithSHA1AndRC2_CBC        "pbeWithSHA1AndRC2-CBC"\r
389 #define NID_pbeWithSHA1AndRC2_CBC       68\r
390 #define OBJ_pbeWithSHA1AndRC2_CBC       OBJ_pkcs,5L,11L \r
391 \r
392 /* proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now\r
393  * defined explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something\r
394  * completely different.\r
395  */\r
396 #define LN_id_pbkdf2                    "PBKDF2"\r
397 #define NID_id_pbkdf2                   69\r
398 #define OBJ_id_pbkdf2                   OBJ_pkcs,5L,12L \r
399 \r
400 #define SN_dsaWithSHA1_2                "DSA-SHA1-old"\r
401 #define LN_dsaWithSHA1_2                "dsaWithSHA1-old"\r
402 #define NID_dsaWithSHA1_2               70\r
403 /* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */\r
404 #define OBJ_dsaWithSHA1_2               OBJ_algorithm,27L\r
405 \r
406 #define SN_netscape_cert_type           "nsCertType"\r
407 #define LN_netscape_cert_type           "Netscape Cert Type"\r
408 #define NID_netscape_cert_type          71\r
409 #define OBJ_netscape_cert_type          OBJ_netscape_cert_extension,1L\r
410 \r
411 #define SN_netscape_base_url            "nsBaseUrl"\r
412 #define LN_netscape_base_url            "Netscape Base Url"\r
413 #define NID_netscape_base_url           72\r
414 #define OBJ_netscape_base_url           OBJ_netscape_cert_extension,2L\r
415 \r
416 #define SN_netscape_revocation_url      "nsRevocationUrl"\r
417 #define LN_netscape_revocation_url      "Netscape Revocation Url"\r
418 #define NID_netscape_revocation_url     73\r
419 #define OBJ_netscape_revocation_url     OBJ_netscape_cert_extension,3L\r
420 \r
421 #define SN_netscape_ca_revocation_url   "nsCaRevocationUrl"\r
422 #define LN_netscape_ca_revocation_url   "Netscape CA Revocation Url"\r
423 #define NID_netscape_ca_revocation_url  74\r
424 #define OBJ_netscape_ca_revocation_url  OBJ_netscape_cert_extension,4L\r
425 \r
426 #define SN_netscape_renewal_url         "nsRenewalUrl"\r
427 #define LN_netscape_renewal_url         "Netscape Renewal Url"\r
428 #define NID_netscape_renewal_url        75\r
429 #define OBJ_netscape_renewal_url        OBJ_netscape_cert_extension,7L\r
430 \r
431 #define SN_netscape_ca_policy_url       "nsCaPolicyUrl"\r
432 #define LN_netscape_ca_policy_url       "Netscape CA Policy Url"\r
433 #define NID_netscape_ca_policy_url      76\r
434 #define OBJ_netscape_ca_policy_url      OBJ_netscape_cert_extension,8L\r
435 \r
436 #define SN_netscape_ssl_server_name     "nsSslServerName"\r
437 #define LN_netscape_ssl_server_name     "Netscape SSL Server Name"\r
438 #define NID_netscape_ssl_server_name    77\r
439 #define OBJ_netscape_ssl_server_name    OBJ_netscape_cert_extension,12L\r
440 \r
441 #define SN_netscape_comment             "nsComment"\r
442 #define LN_netscape_comment             "Netscape Comment"\r
443 #define NID_netscape_comment            78\r
444 #define OBJ_netscape_comment            OBJ_netscape_cert_extension,13L\r
445 \r
446 #define SN_netscape_cert_sequence       "nsCertSequence"\r
447 #define LN_netscape_cert_sequence       "Netscape Certificate Sequence"\r
448 #define NID_netscape_cert_sequence      79\r
449 #define OBJ_netscape_cert_sequence      OBJ_netscape_data_type,5L\r
450 \r
451 #define SN_desx_cbc                     "DESX-CBC"\r
452 #define LN_desx_cbc                     "desx-cbc"\r
453 #define NID_desx_cbc                    80\r
454 \r
455 #define SN_id_ce                        "id-ce"\r
456 #define NID_id_ce                       81\r
457 #define OBJ_id_ce                       2L,5L,29L\r
458 \r
459 #define SN_subject_key_identifier       "subjectKeyIdentifier"\r
460 #define LN_subject_key_identifier       "X509v3 Subject Key Identifier"\r
461 #define NID_subject_key_identifier      82\r
462 #define OBJ_subject_key_identifier      OBJ_id_ce,14L\r
463 \r
464 #define SN_key_usage                    "keyUsage"\r
465 #define LN_key_usage                    "X509v3 Key Usage"\r
466 #define NID_key_usage                   83\r
467 #define OBJ_key_usage                   OBJ_id_ce,15L\r
468 \r
469 #define SN_private_key_usage_period     "privateKeyUsagePeriod"\r
470 #define LN_private_key_usage_period     "X509v3 Private Key Usage Period"\r
471 #define NID_private_key_usage_period    84\r
472 #define OBJ_private_key_usage_period    OBJ_id_ce,16L\r
473 \r
474 #define SN_subject_alt_name             "subjectAltName"\r
475 #define LN_subject_alt_name             "X509v3 Subject Alternative Name"\r
476 #define NID_subject_alt_name            85\r
477 #define OBJ_subject_alt_name            OBJ_id_ce,17L\r
478 \r
479 #define SN_issuer_alt_name              "issuerAltName"\r
480 #define LN_issuer_alt_name              "X509v3 Issuer Alternative Name"\r
481 #define NID_issuer_alt_name             86\r
482 #define OBJ_issuer_alt_name             OBJ_id_ce,18L\r
483 \r
484 #define SN_basic_constraints            "basicConstraints"\r
485 #define LN_basic_constraints            "X509v3 Basic Constraints"\r
486 #define NID_basic_constraints           87\r
487 #define OBJ_basic_constraints           OBJ_id_ce,19L\r
488 \r
489 #define SN_crl_number                   "crlNumber"\r
490 #define LN_crl_number                   "X509v3 CRL Number"\r
491 #define NID_crl_number                  88\r
492 #define OBJ_crl_number                  OBJ_id_ce,20L\r
493 \r
494 #define SN_certificate_policies         "certificatePolicies"\r
495 #define LN_certificate_policies         "X509v3 Certificate Policies"\r
496 #define NID_certificate_policies        89\r
497 #define OBJ_certificate_policies        OBJ_id_ce,32L\r
498 \r
499 #define SN_authority_key_identifier     "authorityKeyIdentifier"\r
500 #define LN_authority_key_identifier     "X509v3 Authority Key Identifier"\r
501 #define NID_authority_key_identifier    90\r
502 #define OBJ_authority_key_identifier    OBJ_id_ce,35L\r
503 \r
504 #define SN_bf_cbc                       "BF-CBC"\r
505 #define LN_bf_cbc                       "bf-cbc"\r
506 #define NID_bf_cbc                      91\r
507 #define OBJ_bf_cbc                      1L,3L,6L,1L,4L,1L,3029L,1L,2L\r
508 \r
509 #define SN_bf_ecb                       "BF-ECB"\r
510 #define LN_bf_ecb                       "bf-ecb"\r
511 #define NID_bf_ecb                      92\r
512 \r
513 #define SN_bf_cfb64                     "BF-CFB"\r
514 #define LN_bf_cfb64                     "bf-cfb"\r
515 #define NID_bf_cfb64                    93\r
516 \r
517 #define SN_bf_ofb64                     "BF-OFB"\r
518 #define LN_bf_ofb64                     "bf-ofb"\r
519 #define NID_bf_ofb64                    94\r
520 \r
521 #define SN_mdc2                         "MDC2"\r
522 #define LN_mdc2                         "mdc2"\r
523 #define NID_mdc2                        95\r
524 #define OBJ_mdc2                        2L,5L,8L,3L,101L\r
525 /* An alternative?                      1L,3L,14L,3L,2L,19L */\r
526 \r
527 #define SN_mdc2WithRSA                  "RSA-MDC2"\r
528 #define LN_mdc2WithRSA                  "mdc2withRSA"\r
529 #define NID_mdc2WithRSA                 96\r
530 #define OBJ_mdc2WithRSA                 2L,5L,8L,3L,100L\r
531 \r
532 #define SN_rc4_40                       "RC4-40"\r
533 #define LN_rc4_40                       "rc4-40"\r
534 #define NID_rc4_40                      97\r
535 \r
536 #define SN_rc2_40_cbc                   "RC2-40-CBC"\r
537 #define LN_rc2_40_cbc                   "rc2-40-cbc"\r
538 #define NID_rc2_40_cbc                  98\r
539 \r
540 #define SN_givenName                    "G"\r
541 #define LN_givenName                    "givenName"\r
542 #define NID_givenName                   99\r
543 #define OBJ_givenName                   OBJ_X509,42L\r
544 \r
545 #define SN_surname                      "S"\r
546 #define LN_surname                      "surname"\r
547 #define NID_surname                     100\r
548 #define OBJ_surname                     OBJ_X509,4L\r
549 \r
550 #define SN_initials                     "I"\r
551 #define LN_initials                     "initials"\r
552 #define NID_initials                    101\r
553 #define OBJ_initials                    OBJ_X509,43L\r
554 \r
555 #define SN_uniqueIdentifier             "UID"\r
556 #define LN_uniqueIdentifier             "uniqueIdentifier"\r
557 #define NID_uniqueIdentifier            102\r
558 #define OBJ_uniqueIdentifier            OBJ_X509,45L\r
559 \r
560 #define SN_crl_distribution_points      "crlDistributionPoints"\r
561 #define LN_crl_distribution_points      "X509v3 CRL Distribution Points"\r
562 #define NID_crl_distribution_points     103\r
563 #define OBJ_crl_distribution_points     OBJ_id_ce,31L\r
564 \r
565 #define SN_md5WithRSA                   "RSA-NP-MD5"\r
566 #define LN_md5WithRSA                   "md5WithRSA"\r
567 #define NID_md5WithRSA                  104\r
568 #define OBJ_md5WithRSA                  OBJ_algorithm,3L\r
569 \r
570 #define SN_serialNumber                 "SN"\r
571 #define LN_serialNumber                 "serialNumber"\r
572 #define NID_serialNumber                105\r
573 #define OBJ_serialNumber                OBJ_X509,5L\r
574 \r
575 #define SN_title                        "T"\r
576 #define LN_title                        "title"\r
577 #define NID_title                       106\r
578 #define OBJ_title                       OBJ_X509,12L\r
579 \r
580 #define SN_description                  "D"\r
581 #define LN_description                  "description"\r
582 #define NID_description                 107\r
583 #define OBJ_description                 OBJ_X509,13L\r
584 \r
585 /* CAST5 is CAST-128, I'm just sticking with the documentation */\r
586 #define SN_cast5_cbc                    "CAST5-CBC"\r
587 #define LN_cast5_cbc                    "cast5-cbc"\r
588 #define NID_cast5_cbc                   108\r
589 #define OBJ_cast5_cbc                   1L,2L,840L,113533L,7L,66L,10L\r
590 \r
591 #define SN_cast5_ecb                    "CAST5-ECB"\r
592 #define LN_cast5_ecb                    "cast5-ecb"\r
593 #define NID_cast5_ecb                   109\r
594 \r
595 #define SN_cast5_cfb64                  "CAST5-CFB"\r
596 #define LN_cast5_cfb64                  "cast5-cfb"\r
597 #define NID_cast5_cfb64                 110\r
598 \r
599 #define SN_cast5_ofb64                  "CAST5-OFB"\r
600 #define LN_cast5_ofb64                  "cast5-ofb"\r
601 #define NID_cast5_ofb64                 111\r
602 \r
603 #define LN_pbeWithMD5AndCast5_CBC       "pbeWithMD5AndCast5CBC"\r
604 #define NID_pbeWithMD5AndCast5_CBC      112\r
605 #define OBJ_pbeWithMD5AndCast5_CBC      1L,2L,840L,113533L,7L,66L,12L\r
606 \r
607 /* This is one sun will soon be using :-(\r
608  * id-dsa-with-sha1 ID  ::= {\r
609  *   iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 }\r
610  */\r
611 #define SN_dsaWithSHA1                  "DSA-SHA1"\r
612 #define LN_dsaWithSHA1                  "dsaWithSHA1"\r
613 #define NID_dsaWithSHA1                 113\r
614 #define OBJ_dsaWithSHA1                 1L,2L,840L,10040L,4L,3L\r
615 \r
616 #define NID_md5_sha1                    114\r
617 #define SN_md5_sha1                     "MD5-SHA1"\r
618 #define LN_md5_sha1                     "md5-sha1"\r
619 \r
620 #define SN_sha1WithRSA                  "RSA-SHA1-2"\r
621 #define LN_sha1WithRSA                  "sha1WithRSA"\r
622 #define NID_sha1WithRSA                 115\r
623 #define OBJ_sha1WithRSA                 OBJ_algorithm,29L\r
624 \r
625 #define SN_dsa                          "DSA"\r
626 #define LN_dsa                          "dsaEncryption"\r
627 #define NID_dsa                         116\r
628 #define OBJ_dsa                         1L,2L,840L,10040L,4L,1L\r
629 \r
630 #define SN_ripemd160                    "RIPEMD160"\r
631 #define LN_ripemd160                    "ripemd160"\r
632 #define NID_ripemd160                   117\r
633 #define OBJ_ripemd160                   1L,3L,36L,3L,2L,1L\r
634 \r
635 /* The name should actually be rsaSignatureWithripemd160, but I'm going\r
636  * to continue using the convention I'm using with the other ciphers */\r
637 #define SN_ripemd160WithRSA             "RSA-RIPEMD160"\r
638 #define LN_ripemd160WithRSA             "ripemd160WithRSA"\r
639 #define NID_ripemd160WithRSA            119\r
640 #define OBJ_ripemd160WithRSA            1L,3L,36L,3L,3L,1L,2L\r
641 \r
642 /* Taken from rfc2040\r
643  *  RC5_CBC_Parameters ::= SEQUENCE {\r
644  *      version           INTEGER (v1_0(16)),\r
645  *      rounds            INTEGER (8..127),\r
646  *      blockSizeInBits   INTEGER (64, 128),\r
647  *      iv                OCTET STRING OPTIONAL\r
648  *      }\r
649  */\r
650 #define SN_rc5_cbc                      "RC5-CBC"\r
651 #define LN_rc5_cbc                      "rc5-cbc"\r
652 #define NID_rc5_cbc                     120\r
653 #define OBJ_rc5_cbc                     OBJ_rsadsi,3L,8L\r
654 \r
655 #define SN_rc5_ecb                      "RC5-ECB"\r
656 #define LN_rc5_ecb                      "rc5-ecb"\r
657 #define NID_rc5_ecb                     121\r
658 \r
659 #define SN_rc5_cfb64                    "RC5-CFB"\r
660 #define LN_rc5_cfb64                    "rc5-cfb"\r
661 #define NID_rc5_cfb64                   122\r
662 \r
663 #define SN_rc5_ofb64                    "RC5-OFB"\r
664 #define LN_rc5_ofb64                    "rc5-ofb"\r
665 #define NID_rc5_ofb64                   123\r
666 \r
667 #define SN_rle_compression              "RLE"\r
668 #define LN_rle_compression              "run length compression"\r
669 #define NID_rle_compression             124\r
670 #define OBJ_rle_compression             1L,1L,1L,1L,666L,1L\r
671 \r
672 #define SN_zlib_compression             "ZLIB"\r
673 #define LN_zlib_compression             "zlib compression"\r
674 #define NID_zlib_compression            125\r
675 #define OBJ_zlib_compression            1L,1L,1L,1L,666L,2L\r
676 \r
677 #define SN_ext_key_usage                "extendedKeyUsage"\r
678 #define LN_ext_key_usage                "X509v3 Extended Key Usage"\r
679 #define NID_ext_key_usage               126\r
680 #define OBJ_ext_key_usage               OBJ_id_ce,37\r
681 \r
682 #define SN_id_pkix                      "PKIX"\r
683 #define NID_id_pkix                     127\r
684 #define OBJ_id_pkix                     1L,3L,6L,1L,5L,5L,7L\r
685 \r
686 #define SN_id_kp                        "id-kp"\r
687 #define NID_id_kp                       128\r
688 #define OBJ_id_kp                       OBJ_id_pkix,3L\r
689 \r
690 /* PKIX extended key usage OIDs */\r
691 \r
692 #define SN_server_auth                  "serverAuth"\r
693 #define LN_server_auth                  "TLS Web Server Authentication"\r
694 #define NID_server_auth                 129\r
695 #define OBJ_server_auth                 OBJ_id_kp,1L\r
696 \r
697 #define SN_client_auth                  "clientAuth"\r
698 #define LN_client_auth                  "TLS Web Client Authentication"\r
699 #define NID_client_auth                 130\r
700 #define OBJ_client_auth                 OBJ_id_kp,2L\r
701 \r
702 #define SN_code_sign                    "codeSigning"\r
703 #define LN_code_sign                    "Code Signing"\r
704 #define NID_code_sign                   131\r
705 #define OBJ_code_sign                   OBJ_id_kp,3L\r
706 \r
707 #define SN_email_protect                "emailProtection"\r
708 #define LN_email_protect                "E-mail Protection"\r
709 #define NID_email_protect               132\r
710 #define OBJ_email_protect               OBJ_id_kp,4L\r
711 \r
712 #define SN_time_stamp                   "timeStamping"\r
713 #define LN_time_stamp                   "Time Stamping"\r
714 #define NID_time_stamp                  133\r
715 #define OBJ_time_stamp                  OBJ_id_kp,8L\r
716 \r
717 /* Additional extended key usage OIDs: Microsoft */\r
718 \r
719 #define SN_ms_code_ind                  "msCodeInd"\r
720 #define LN_ms_code_ind                  "Microsoft Individual Code Signing"\r
721 #define NID_ms_code_ind                 134\r
722 #define OBJ_ms_code_ind                 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L\r
723 \r
724 #define SN_ms_code_com                  "msCodeCom"\r
725 #define LN_ms_code_com                  "Microsoft Commercial Code Signing"\r
726 #define NID_ms_code_com                 135\r
727 #define OBJ_ms_code_com                 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L\r
728 \r
729 #define SN_ms_ctl_sign                  "msCTLSign"\r
730 #define LN_ms_ctl_sign                  "Microsoft Trust List Signing"\r
731 #define NID_ms_ctl_sign                 136\r
732 #define OBJ_ms_ctl_sign                 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L\r
733 \r
734 #define SN_ms_sgc                       "msSGC"\r
735 #define LN_ms_sgc                       "Microsoft Server Gated Crypto"\r
736 #define NID_ms_sgc                      137\r
737 #define OBJ_ms_sgc                      1L,3L,6L,1L,4L,1L,311L,10L,3L,3L\r
738 \r
739 #define SN_ms_efs                       "msEFS"\r
740 #define LN_ms_efs                       "Microsoft Encrypted File System"\r
741 #define NID_ms_efs                      138\r
742 #define OBJ_ms_efs                      1L,3L,6L,1L,4L,1L,311L,10L,3L,4L\r
743 \r
744 /* Additional usage: Netscape */\r
745 \r
746 #define SN_ns_sgc                       "nsSGC"\r
747 #define LN_ns_sgc                       "Netscape Server Gated Crypto"\r
748 #define NID_ns_sgc                      139\r
749 #define OBJ_ns_sgc                      OBJ_netscape,4L,1L\r
750 \r
751 #define SN_delta_crl                    "deltaCRL"\r
752 #define LN_delta_crl                    "X509v3 Delta CRL Indicator"\r
753 #define NID_delta_crl                   140\r
754 #define OBJ_delta_crl                   OBJ_id_ce,27L\r
755 \r
756 #define SN_crl_reason                   "CRLReason"\r
757 #define LN_crl_reason                   "CRL Reason Code"\r
758 #define NID_crl_reason                  141\r
759 #define OBJ_crl_reason                  OBJ_id_ce,21L\r
760 \r
761 #define SN_invalidity_date              "invalidityDate"\r
762 #define LN_invalidity_date              "Invalidity Date"\r
763 #define NID_invalidity_date             142\r
764 #define OBJ_invalidity_date             OBJ_id_ce,24L\r
765 \r
766 #define SN_sxnet                        "SXNetID"\r
767 #define LN_sxnet                        "Strong Extranet ID"\r
768 #define NID_sxnet                       143\r
769 #define OBJ_sxnet                       1L,3L,101L,1L,4L,1L\r
770 \r
771 /* PKCS12 and related OBJECT IDENTIFIERS */\r
772 \r
773 #define OBJ_pkcs12                      OBJ_pkcs,12L\r
774 #define OBJ_pkcs12_pbeids               OBJ_pkcs12, 1\r
775 \r
776 #define SN_pbe_WithSHA1And128BitRC4     "PBE-SHA1-RC4-128"\r
777 #define LN_pbe_WithSHA1And128BitRC4     "pbeWithSHA1And128BitRC4"\r
778 #define NID_pbe_WithSHA1And128BitRC4    144\r
779 #define OBJ_pbe_WithSHA1And128BitRC4    OBJ_pkcs12_pbeids, 1L\r
780 \r
781 #define SN_pbe_WithSHA1And40BitRC4      "PBE-SHA1-RC4-40"\r
782 #define LN_pbe_WithSHA1And40BitRC4      "pbeWithSHA1And40BitRC4"\r
783 #define NID_pbe_WithSHA1And40BitRC4     145\r
784 #define OBJ_pbe_WithSHA1And40BitRC4     OBJ_pkcs12_pbeids, 2L\r
785 \r
786 #define SN_pbe_WithSHA1And3_Key_TripleDES_CBC   "PBE-SHA1-3DES"\r
787 #define LN_pbe_WithSHA1And3_Key_TripleDES_CBC   "pbeWithSHA1And3-KeyTripleDES-CBC"\r
788 #define NID_pbe_WithSHA1And3_Key_TripleDES_CBC  146\r
789 #define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC  OBJ_pkcs12_pbeids, 3L\r
790 \r
791 #define SN_pbe_WithSHA1And2_Key_TripleDES_CBC   "PBE-SHA1-2DES"\r
792 #define LN_pbe_WithSHA1And2_Key_TripleDES_CBC   "pbeWithSHA1And2-KeyTripleDES-CBC"\r
793 #define NID_pbe_WithSHA1And2_Key_TripleDES_CBC  147\r
794 #define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC  OBJ_pkcs12_pbeids, 4L\r
795 \r
796 #define SN_pbe_WithSHA1And128BitRC2_CBC         "PBE-SHA1-RC2-128"\r
797 #define LN_pbe_WithSHA1And128BitRC2_CBC         "pbeWithSHA1And128BitRC2-CBC"\r
798 #define NID_pbe_WithSHA1And128BitRC2_CBC        148\r
799 #define OBJ_pbe_WithSHA1And128BitRC2_CBC        OBJ_pkcs12_pbeids, 5L\r
800 \r
801 #define SN_pbe_WithSHA1And40BitRC2_CBC  "PBE-SHA1-RC2-40"\r
802 #define LN_pbe_WithSHA1And40BitRC2_CBC  "pbeWithSHA1And40BitRC2-CBC"\r
803 #define NID_pbe_WithSHA1And40BitRC2_CBC 149\r
804 #define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids, 6L\r
805 \r
806 #define OBJ_pkcs12_Version1     OBJ_pkcs12, 10L\r
807 \r
808 #define OBJ_pkcs12_BagIds       OBJ_pkcs12_Version1, 1L\r
809 \r
810 #define LN_keyBag               "keyBag"\r
811 #define NID_keyBag              150\r
812 #define OBJ_keyBag              OBJ_pkcs12_BagIds, 1L\r
813 \r
814 #define LN_pkcs8ShroudedKeyBag  "pkcs8ShroudedKeyBag"\r
815 #define NID_pkcs8ShroudedKeyBag 151\r
816 #define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds, 2L\r
817 \r
818 #define LN_certBag              "certBag"\r
819 #define NID_certBag             152\r
820 #define OBJ_certBag             OBJ_pkcs12_BagIds, 3L\r
821 \r
822 #define LN_crlBag               "crlBag"\r
823 #define NID_crlBag              153\r
824 #define OBJ_crlBag              OBJ_pkcs12_BagIds, 4L\r
825 \r
826 #define LN_secretBag            "secretBag"\r
827 #define NID_secretBag           154\r
828 #define OBJ_secretBag           OBJ_pkcs12_BagIds, 5L\r
829 \r
830 #define LN_safeContentsBag      "safeContentsBag"\r
831 #define NID_safeContentsBag     155\r
832 #define OBJ_safeContentsBag     OBJ_pkcs12_BagIds, 6L\r
833 \r
834 #define LN_friendlyName         "friendlyName"\r
835 #define NID_friendlyName        156\r
836 #define OBJ_friendlyName        OBJ_pkcs9, 20L\r
837 \r
838 #define LN_localKeyID           "localKeyID"\r
839 #define NID_localKeyID          157\r
840 #define OBJ_localKeyID          OBJ_pkcs9, 21L\r
841 \r
842 #define OBJ_certTypes           OBJ_pkcs9, 22L\r
843 \r
844 #define LN_x509Certificate      "x509Certificate"\r
845 #define NID_x509Certificate     158\r
846 #define OBJ_x509Certificate     OBJ_certTypes, 1L\r
847 \r
848 #define LN_sdsiCertificate      "sdsiCertificate"\r
849 #define NID_sdsiCertificate     159\r
850 #define OBJ_sdsiCertificate     OBJ_certTypes, 2L\r
851 \r
852 #define OBJ_crlTypes            OBJ_pkcs9, 23L\r
853 \r
854 #define LN_x509Crl              "x509Crl"\r
855 #define NID_x509Crl             160\r
856 #define OBJ_x509Crl             OBJ_crlTypes, 1L\r
857 \r
858 /* PKCS#5 v2 OIDs */\r
859 \r
860 #define LN_pbes2                "PBES2"\r
861 #define NID_pbes2               161\r
862 #define OBJ_pbes2               OBJ_pkcs,5L,13L\r
863 \r
864 #define LN_pbmac1               "PBMAC1"\r
865 #define NID_pbmac1              162\r
866 #define OBJ_pbmac1              OBJ_pkcs,5L,14L\r
867 \r
868 #define LN_hmacWithSHA1         "hmacWithSHA1"\r
869 #define NID_hmacWithSHA1        163\r
870 #define OBJ_hmacWithSHA1        OBJ_rsadsi,2L,7L\r
871 \r
872 /* Policy Qualifier Ids */\r
873 \r
874 #define LN_id_qt_cps            "Policy Qualifier CPS"\r
875 #define SN_id_qt_cps            "id-qt-cps"\r
876 #define NID_id_qt_cps           164\r
877 #define OBJ_id_qt_cps           OBJ_id_pkix,2L,1L\r
878 \r
879 #define LN_id_qt_unotice        "Policy Qualifier User Notice"\r
880 #define SN_id_qt_unotice        "id-qt-unotice"\r
881 #define NID_id_qt_unotice       165\r
882 #define OBJ_id_qt_unotice       OBJ_id_pkix,2L,2L\r
883 \r
884 #define SN_rc2_64_cbc                   "RC2-64-CBC"\r
885 #define LN_rc2_64_cbc                   "rc2-64-cbc"\r
886 #define NID_rc2_64_cbc                  166\r
887 \r
888 #define SN_SMIMECapabilities            "SMIME-CAPS"\r
889 #define LN_SMIMECapabilities            "S/MIME Capabilities"\r
890 #define NID_SMIMECapabilities           167\r
891 #define OBJ_SMIMECapabilities           OBJ_pkcs9,15L\r
892 \r
893 #define SN_pbeWithMD2AndRC2_CBC         "PBE-MD2-RC2-64"\r
894 #define LN_pbeWithMD2AndRC2_CBC         "pbeWithMD2AndRC2-CBC"\r
895 #define NID_pbeWithMD2AndRC2_CBC        168\r
896 #define OBJ_pbeWithMD2AndRC2_CBC        OBJ_pkcs,5L,4L\r
897 \r
898 #define SN_pbeWithMD5AndRC2_CBC         "PBE-MD5-RC2-64"\r
899 #define LN_pbeWithMD5AndRC2_CBC         "pbeWithMD5AndRC2-CBC"\r
900 #define NID_pbeWithMD5AndRC2_CBC        169\r
901 #define OBJ_pbeWithMD5AndRC2_CBC        OBJ_pkcs,5L,6L\r
902 \r
903 #define SN_pbeWithSHA1AndDES_CBC        "PBE-SHA1-DES"\r
904 #define LN_pbeWithSHA1AndDES_CBC        "pbeWithSHA1AndDES-CBC"\r
905 #define NID_pbeWithSHA1AndDES_CBC       170\r
906 #define OBJ_pbeWithSHA1AndDES_CBC       OBJ_pkcs,5L,10L\r
907 \r
908 /* Extension request OIDs */\r
909 \r
910 #define LN_ms_ext_req                   "Microsoft Extension Request"\r
911 #define SN_ms_ext_req                   "msExtReq"\r
912 #define NID_ms_ext_req                  171\r
913 #define OBJ_ms_ext_req                  1L,3L,6L,1L,4L,1L,311L,2L,1L,14L\r
914 \r
915 #define LN_ext_req                      "Extension Request"\r
916 #define SN_ext_req                      "extReq"\r
917 #define NID_ext_req                     172\r
918 #define OBJ_ext_req                     OBJ_pkcs9,14L\r
919 \r
920 #define SN_name                         "name"\r
921 #define LN_name                         "name"\r
922 #define NID_name                        173\r
923 #define OBJ_name                        OBJ_X509,41L\r
924 \r
925 #define SN_dnQualifier                  "dnQualifier"\r
926 #define LN_dnQualifier                  "dnQualifier"\r
927 #define NID_dnQualifier                 174\r
928 #define OBJ_dnQualifier                 OBJ_X509,46L\r
929 \r
930 #define SN_id_pe                        "id-pe"\r
931 #define NID_id_pe                       175\r
932 #define OBJ_id_pe                       OBJ_id_pkix,1L\r
933 \r
934 #define SN_id_ad                        "id-ad"\r
935 #define NID_id_ad                       176\r
936 #define OBJ_id_ad                       OBJ_id_pkix,48L\r
937 \r
938 #define SN_info_access                  "authorityInfoAccess"\r
939 #define LN_info_access                  "Authority Information Access"\r
940 #define NID_info_access                 177\r
941 #define OBJ_info_access                 OBJ_id_pe,1L\r
942 \r
943 #define SN_ad_OCSP                      "OCSP"\r
944 #define LN_ad_OCSP                      "OCSP"\r
945 #define NID_ad_OCSP                     178\r
946 #define OBJ_ad_OCSP                     OBJ_id_ad,1L\r
947 \r
948 #define SN_ad_ca_issuers                "caIssuers"\r
949 #define LN_ad_ca_issuers                "CA Issuers"\r
950 #define NID_ad_ca_issuers               179\r
951 #define OBJ_ad_ca_issuers               OBJ_id_ad,2L\r
952 \r
953 #define SN_OCSP_sign                    "OCSPSigning"\r
954 #define LN_OCSP_sign                    "OCSP Signing"\r
955 #define NID_OCSP_sign                   180\r
956 #define OBJ_OCSP_sign                   OBJ_id_kp,9L\r
957 #endif /* USE_OBJ_MAC */\r
958 \r
959 #include <openssl/bio.h>\r
960 #include <openssl/asn1.h>\r
961 \r
962 #define OBJ_NAME_TYPE_UNDEF             0x00\r
963 #define OBJ_NAME_TYPE_MD_METH           0x01\r
964 #define OBJ_NAME_TYPE_CIPHER_METH       0x02\r
965 #define OBJ_NAME_TYPE_PKEY_METH         0x03\r
966 #define OBJ_NAME_TYPE_COMP_METH         0x04\r
967 #define OBJ_NAME_TYPE_NUM               0x05\r
968 \r
969 #define OBJ_NAME_ALIAS                  0x8000\r
970 \r
971 #define OBJ_BSEARCH_VALUE_ON_NOMATCH            0x01\r
972 #define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH        0x02\r
973 \r
974 \r
975 #ifdef  __cplusplus\r
976 extern "C" {\r
977 #endif\r
978 \r
979 typedef struct obj_name_st\r
980         {\r
981         int type;\r
982         int alias;\r
983         const char *name;\r
984         const char *data;\r
985         } OBJ_NAME;\r
986 \r
987 #define         OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c)\r
988 \r
989 \r
990 int OBJ_NAME_init(void);\r
991 int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),\r
992                        int (*cmp_func)(const char *, const char *),\r
993                        void (*free_func)(const char *, int, const char *));\r
994 const char *OBJ_NAME_get(const char *name,int type);\r
995 int OBJ_NAME_add(const char *name,int type,const char *data);\r
996 int OBJ_NAME_remove(const char *name,int type);\r
997 void OBJ_NAME_cleanup(int type); /* -1 for everything */\r
998 void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg),\r
999                      void *arg);\r
1000 void OBJ_NAME_do_all_sorted(int type,void (*fn)(const OBJ_NAME *,void *arg),\r
1001                             void *arg);\r
1002 \r
1003 ASN1_OBJECT *   OBJ_dup(const ASN1_OBJECT *o);\r
1004 ASN1_OBJECT *   OBJ_nid2obj(int n);\r
1005 const char *    OBJ_nid2ln(int n);\r
1006 const char *    OBJ_nid2sn(int n);\r
1007 int             OBJ_obj2nid(const ASN1_OBJECT *o);\r
1008 ASN1_OBJECT *   OBJ_txt2obj(const char *s, int no_name);\r
1009 int     OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);\r
1010 int             OBJ_txt2nid(const char *s);\r
1011 int             OBJ_ln2nid(const char *s);\r
1012 int             OBJ_sn2nid(const char *s);\r
1013 int             OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b);\r
1014 const char *    OBJ_bsearch(const char *key,const char *base,int num,int size,\r
1015         int (*cmp)(const void *, const void *));\r
1016 const char *    OBJ_bsearch_ex(const char *key,const char *base,int num,\r
1017         int size, int (*cmp)(const void *, const void *), int flags);\r
1018 \r
1019 int             OBJ_new_nid(int num);\r
1020 int             OBJ_add_object(const ASN1_OBJECT *obj);\r
1021 int             OBJ_create(const char *oid,const char *sn,const char *ln);\r
1022 void            OBJ_cleanup(void );\r
1023 int             OBJ_create_objects(BIO *in);\r
1024 \r
1025 /* BEGIN ERROR CODES */\r
1026 /* The following lines are auto generated by the script mkerr.pl. Any changes\r
1027  * made after this point may be overwritten when the script is next run.\r
1028  */\r
1029 void ERR_load_OBJ_strings(void);\r
1030 \r
1031 /* Error codes for the OBJ functions. */\r
1032 \r
1033 /* Function codes. */\r
1034 #define OBJ_F_OBJ_ADD_OBJECT                             105\r
1035 #define OBJ_F_OBJ_CREATE                                 100\r
1036 #define OBJ_F_OBJ_DUP                                    101\r
1037 #define OBJ_F_OBJ_NAME_NEW_INDEX                         106\r
1038 #define OBJ_F_OBJ_NID2LN                                 102\r
1039 #define OBJ_F_OBJ_NID2OBJ                                103\r
1040 #define OBJ_F_OBJ_NID2SN                                 104\r
1041 \r
1042 /* Reason codes. */\r
1043 #define OBJ_R_MALLOC_FAILURE                             100\r
1044 #define OBJ_R_UNKNOWN_NID                                101\r
1045 \r
1046 #ifdef  __cplusplus\r
1047 }\r
1048 #endif\r
1049 #endif\r