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