diff options
Diffstat (limited to 'src/lib/libcrypto/objects')
-rw-r--r-- | src/lib/libcrypto/objects/o_names.c | 266 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 657 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.pl | 302 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_err.c | 99 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_lib.c | 126 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_mac.num | 392 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/objects.README | 44 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/objects.h | 1038 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/objects.pl | 224 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/objects.txt | 593 |
10 files changed, 0 insertions, 3741 deletions
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c deleted file mode 100644 index dca988230e..0000000000 --- a/src/lib/libcrypto/objects/o_names.c +++ /dev/null | |||
@@ -1,266 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <string.h> | ||
4 | |||
5 | #include <openssl/lhash.h> | ||
6 | #include <openssl/objects.h> | ||
7 | #include <openssl/safestack.h> | ||
8 | |||
9 | /* I use the ex_data stuff to manage the identifiers for the obj_name_types | ||
10 | * that applications may define. I only really use the free function field. | ||
11 | */ | ||
12 | static LHASH *names_lh=NULL; | ||
13 | static int names_type_num=OBJ_NAME_TYPE_NUM; | ||
14 | |||
15 | typedef struct name_funcs_st | ||
16 | { | ||
17 | unsigned long (*hash_func)(); | ||
18 | int (*cmp_func)(); | ||
19 | void (*free_func)(); | ||
20 | } NAME_FUNCS; | ||
21 | |||
22 | DECLARE_STACK_OF(NAME_FUNCS) | ||
23 | IMPLEMENT_STACK_OF(NAME_FUNCS) | ||
24 | |||
25 | static STACK_OF(NAME_FUNCS) *name_funcs_stack; | ||
26 | |||
27 | static unsigned long obj_name_hash(OBJ_NAME *a); | ||
28 | static int obj_name_cmp(OBJ_NAME *a,OBJ_NAME *b); | ||
29 | |||
30 | int OBJ_NAME_init(void) | ||
31 | { | ||
32 | if (names_lh != NULL) return(1); | ||
33 | MemCheck_off(); | ||
34 | names_lh=lh_new(obj_name_hash,obj_name_cmp); | ||
35 | MemCheck_on(); | ||
36 | return(names_lh != NULL); | ||
37 | } | ||
38 | |||
39 | int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), | ||
40 | int (*cmp_func)(const void *, const void *), | ||
41 | void (*free_func)(const char *, int, const char *)) | ||
42 | { | ||
43 | int ret; | ||
44 | int i; | ||
45 | NAME_FUNCS *name_funcs; | ||
46 | |||
47 | if (name_funcs_stack == NULL) | ||
48 | { | ||
49 | MemCheck_off(); | ||
50 | name_funcs_stack=sk_NAME_FUNCS_new_null(); | ||
51 | MemCheck_on(); | ||
52 | } | ||
53 | if ((name_funcs_stack == NULL)) | ||
54 | { | ||
55 | /* ERROR */ | ||
56 | return(0); | ||
57 | } | ||
58 | ret=names_type_num; | ||
59 | names_type_num++; | ||
60 | for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++) | ||
61 | { | ||
62 | MemCheck_off(); | ||
63 | name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); | ||
64 | name_funcs->hash_func = lh_strhash; | ||
65 | name_funcs->cmp_func = (int (*)())strcmp; | ||
66 | name_funcs->free_func = 0; /* NULL is often declared to | ||
67 | * ((void *)0), which according | ||
68 | * to Compaq C is not really | ||
69 | * compatible with a function | ||
70 | * pointer. -- Richard Levitte*/ | ||
71 | sk_NAME_FUNCS_push(name_funcs_stack,name_funcs); | ||
72 | MemCheck_on(); | ||
73 | } | ||
74 | name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret); | ||
75 | if (hash_func != NULL) | ||
76 | name_funcs->hash_func = hash_func; | ||
77 | if (cmp_func != NULL) | ||
78 | name_funcs->cmp_func = cmp_func; | ||
79 | if (free_func != NULL) | ||
80 | name_funcs->free_func = free_func; | ||
81 | return(ret); | ||
82 | } | ||
83 | |||
84 | static int obj_name_cmp(OBJ_NAME *a, OBJ_NAME *b) | ||
85 | { | ||
86 | int ret; | ||
87 | |||
88 | ret=a->type-b->type; | ||
89 | if (ret == 0) | ||
90 | { | ||
91 | if ((name_funcs_stack != NULL) | ||
92 | && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) | ||
93 | { | ||
94 | ret=sk_NAME_FUNCS_value(name_funcs_stack,a->type) | ||
95 | ->cmp_func(a->name,b->name); | ||
96 | } | ||
97 | else | ||
98 | ret=strcmp(a->name,b->name); | ||
99 | } | ||
100 | return(ret); | ||
101 | } | ||
102 | |||
103 | static unsigned long obj_name_hash(OBJ_NAME *a) | ||
104 | { | ||
105 | unsigned long ret; | ||
106 | |||
107 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) | ||
108 | { | ||
109 | ret=sk_NAME_FUNCS_value(name_funcs_stack,a->type) | ||
110 | ->hash_func(a->name); | ||
111 | } | ||
112 | else | ||
113 | { | ||
114 | ret=lh_strhash(a->name); | ||
115 | } | ||
116 | ret^=a->type; | ||
117 | return(ret); | ||
118 | } | ||
119 | |||
120 | const char *OBJ_NAME_get(const char *name, int type) | ||
121 | { | ||
122 | OBJ_NAME on,*ret; | ||
123 | int num=0,alias; | ||
124 | |||
125 | if (name == NULL) return(NULL); | ||
126 | if ((names_lh == NULL) && !OBJ_NAME_init()) return(NULL); | ||
127 | |||
128 | alias=type&OBJ_NAME_ALIAS; | ||
129 | type&= ~OBJ_NAME_ALIAS; | ||
130 | |||
131 | on.name=name; | ||
132 | on.type=type; | ||
133 | |||
134 | for (;;) | ||
135 | { | ||
136 | ret=(OBJ_NAME *)lh_retrieve(names_lh,&on); | ||
137 | if (ret == NULL) return(NULL); | ||
138 | if ((ret->alias) && !alias) | ||
139 | { | ||
140 | if (++num > 10) return(NULL); | ||
141 | on.name=ret->data; | ||
142 | } | ||
143 | else | ||
144 | { | ||
145 | return(ret->data); | ||
146 | } | ||
147 | } | ||
148 | } | ||
149 | |||
150 | int OBJ_NAME_add(const char *name, int type, const char *data) | ||
151 | { | ||
152 | OBJ_NAME *onp,*ret; | ||
153 | int alias; | ||
154 | |||
155 | if ((names_lh == NULL) && !OBJ_NAME_init()) return(0); | ||
156 | |||
157 | alias=type&OBJ_NAME_ALIAS; | ||
158 | type&= ~OBJ_NAME_ALIAS; | ||
159 | |||
160 | onp=(OBJ_NAME *)OPENSSL_malloc(sizeof(OBJ_NAME)); | ||
161 | if (onp == NULL) | ||
162 | { | ||
163 | /* ERROR */ | ||
164 | return(0); | ||
165 | } | ||
166 | |||
167 | onp->name=name; | ||
168 | onp->alias=alias; | ||
169 | onp->type=type; | ||
170 | onp->data=data; | ||
171 | |||
172 | ret=(OBJ_NAME *)lh_insert(names_lh,onp); | ||
173 | if (ret != NULL) | ||
174 | { | ||
175 | /* free things */ | ||
176 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) | ||
177 | { | ||
178 | /* XXX: I'm not sure I understand why the free | ||
179 | * function should get three arguments... | ||
180 | * -- Richard Levitte | ||
181 | */ | ||
182 | sk_NAME_FUNCS_value(name_funcs_stack,ret->type) | ||
183 | ->free_func(ret->name,ret->type,ret->data); | ||
184 | } | ||
185 | OPENSSL_free(ret); | ||
186 | } | ||
187 | else | ||
188 | { | ||
189 | if (lh_error(names_lh)) | ||
190 | { | ||
191 | /* ERROR */ | ||
192 | return(0); | ||
193 | } | ||
194 | } | ||
195 | return(1); | ||
196 | } | ||
197 | |||
198 | int OBJ_NAME_remove(const char *name, int type) | ||
199 | { | ||
200 | OBJ_NAME on,*ret; | ||
201 | |||
202 | if (names_lh == NULL) return(0); | ||
203 | |||
204 | type&= ~OBJ_NAME_ALIAS; | ||
205 | on.name=name; | ||
206 | on.type=type; | ||
207 | ret=(OBJ_NAME *)lh_delete(names_lh,&on); | ||
208 | if (ret != NULL) | ||
209 | { | ||
210 | /* free things */ | ||
211 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) | ||
212 | { | ||
213 | /* XXX: I'm not sure I understand why the free | ||
214 | * function should get three arguments... | ||
215 | * -- Richard Levitte | ||
216 | */ | ||
217 | sk_NAME_FUNCS_value(name_funcs_stack,ret->type) | ||
218 | ->free_func(ret->name,ret->type,ret->data); | ||
219 | } | ||
220 | OPENSSL_free(ret); | ||
221 | return(1); | ||
222 | } | ||
223 | else | ||
224 | return(0); | ||
225 | } | ||
226 | |||
227 | static int free_type; | ||
228 | |||
229 | static void names_lh_free(OBJ_NAME *onp, int type) | ||
230 | { | ||
231 | if(onp == NULL) | ||
232 | return; | ||
233 | |||
234 | if ((free_type < 0) || (free_type == onp->type)) | ||
235 | { | ||
236 | OBJ_NAME_remove(onp->name,onp->type); | ||
237 | } | ||
238 | } | ||
239 | |||
240 | static void name_funcs_free(NAME_FUNCS *ptr) | ||
241 | { | ||
242 | OPENSSL_free(ptr); | ||
243 | } | ||
244 | |||
245 | void OBJ_NAME_cleanup(int type) | ||
246 | { | ||
247 | unsigned long down_load; | ||
248 | |||
249 | if (names_lh == NULL) return; | ||
250 | |||
251 | free_type=type; | ||
252 | down_load=names_lh->down_load; | ||
253 | names_lh->down_load=0; | ||
254 | |||
255 | lh_doall(names_lh,names_lh_free); | ||
256 | if (type < 0) | ||
257 | { | ||
258 | lh_free(names_lh); | ||
259 | sk_NAME_FUNCS_pop_free(name_funcs_stack,name_funcs_free); | ||
260 | names_lh=NULL; | ||
261 | name_funcs_stack = NULL; | ||
262 | } | ||
263 | else | ||
264 | names_lh->down_load=down_load; | ||
265 | } | ||
266 | |||
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c deleted file mode 100644 index 4b1bb9583a..0000000000 --- a/src/lib/libcrypto/objects/obj_dat.c +++ /dev/null | |||
@@ -1,657 +0,0 @@ | |||
1 | /* crypto/objects/obj_dat.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
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 | #include <stdio.h> | ||
60 | #include <ctype.h> | ||
61 | #include "cryptlib.h" | ||
62 | #include <openssl/lhash.h> | ||
63 | #include <openssl/asn1.h> | ||
64 | #include <openssl/objects.h> | ||
65 | |||
66 | /* obj_dat.h is generated from objects.h by obj_dat.pl */ | ||
67 | #ifndef NO_OBJECT | ||
68 | #include "obj_dat.h" | ||
69 | #else | ||
70 | /* You will have to load all the objects needed manually in the application */ | ||
71 | #define NUM_NID 0 | ||
72 | #define NUM_SN 0 | ||
73 | #define NUM_LN 0 | ||
74 | #define NUM_OBJ 0 | ||
75 | static unsigned char lvalues[1]; | ||
76 | static ASN1_OBJECT nid_objs[1]; | ||
77 | static ASN1_OBJECT *sn_objs[1]; | ||
78 | static ASN1_OBJECT *ln_objs[1]; | ||
79 | static ASN1_OBJECT *obj_objs[1]; | ||
80 | #endif | ||
81 | |||
82 | static int sn_cmp(const void *a, const void *b); | ||
83 | static int ln_cmp(const void *a, const void *b); | ||
84 | static int obj_cmp(const void *a, const void *b); | ||
85 | #define ADDED_DATA 0 | ||
86 | #define ADDED_SNAME 1 | ||
87 | #define ADDED_LNAME 2 | ||
88 | #define ADDED_NID 3 | ||
89 | |||
90 | typedef struct added_obj_st | ||
91 | { | ||
92 | int type; | ||
93 | ASN1_OBJECT *obj; | ||
94 | } ADDED_OBJ; | ||
95 | |||
96 | static int new_nid=NUM_NID; | ||
97 | static LHASH *added=NULL; | ||
98 | |||
99 | static int sn_cmp(const void *a, const void *b) | ||
100 | { | ||
101 | const ASN1_OBJECT * const *ap = a, * const *bp = b; | ||
102 | return(strcmp((*ap)->sn,(*bp)->sn)); | ||
103 | } | ||
104 | |||
105 | static int ln_cmp(const void *a, const void *b) | ||
106 | { | ||
107 | const ASN1_OBJECT * const *ap = a, * const *bp = b; | ||
108 | return(strcmp((*ap)->ln,(*bp)->ln)); | ||
109 | } | ||
110 | |||
111 | static unsigned long add_hash(ADDED_OBJ *ca) | ||
112 | { | ||
113 | ASN1_OBJECT *a; | ||
114 | int i; | ||
115 | unsigned long ret=0; | ||
116 | unsigned char *p; | ||
117 | |||
118 | a=ca->obj; | ||
119 | switch (ca->type) | ||
120 | { | ||
121 | case ADDED_DATA: | ||
122 | ret=a->length<<20L; | ||
123 | p=(unsigned char *)a->data; | ||
124 | for (i=0; i<a->length; i++) | ||
125 | ret^=p[i]<<((i*3)%24); | ||
126 | break; | ||
127 | case ADDED_SNAME: | ||
128 | ret=lh_strhash(a->sn); | ||
129 | break; | ||
130 | case ADDED_LNAME: | ||
131 | ret=lh_strhash(a->ln); | ||
132 | break; | ||
133 | case ADDED_NID: | ||
134 | ret=a->nid; | ||
135 | break; | ||
136 | default: | ||
137 | /* abort(); */ | ||
138 | return 0; | ||
139 | } | ||
140 | ret&=0x3fffffffL; | ||
141 | ret|=ca->type<<30L; | ||
142 | return(ret); | ||
143 | } | ||
144 | |||
145 | static int add_cmp(ADDED_OBJ *ca, ADDED_OBJ *cb) | ||
146 | { | ||
147 | ASN1_OBJECT *a,*b; | ||
148 | int i; | ||
149 | |||
150 | i=ca->type-cb->type; | ||
151 | if (i) return(i); | ||
152 | a=ca->obj; | ||
153 | b=cb->obj; | ||
154 | switch (ca->type) | ||
155 | { | ||
156 | case ADDED_DATA: | ||
157 | i=(a->length - b->length); | ||
158 | if (i) return(i); | ||
159 | return(memcmp(a->data,b->data,a->length)); | ||
160 | case ADDED_SNAME: | ||
161 | if (a->sn == NULL) return(-1); | ||
162 | else if (b->sn == NULL) return(1); | ||
163 | else return(strcmp(a->sn,b->sn)); | ||
164 | case ADDED_LNAME: | ||
165 | if (a->ln == NULL) return(-1); | ||
166 | else if (b->ln == NULL) return(1); | ||
167 | else return(strcmp(a->ln,b->ln)); | ||
168 | case ADDED_NID: | ||
169 | return(a->nid-b->nid); | ||
170 | default: | ||
171 | /* abort(); */ | ||
172 | return 0; | ||
173 | } | ||
174 | return(1); /* should not get here */ | ||
175 | } | ||
176 | |||
177 | static int init_added(void) | ||
178 | { | ||
179 | if (added != NULL) return(1); | ||
180 | added=lh_new(add_hash,add_cmp); | ||
181 | return(added != NULL); | ||
182 | } | ||
183 | |||
184 | static void cleanup1(ADDED_OBJ *a) | ||
185 | { | ||
186 | a->obj->nid=0; | ||
187 | a->obj->flags|=ASN1_OBJECT_FLAG_DYNAMIC| | ||
188 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS| | ||
189 | ASN1_OBJECT_FLAG_DYNAMIC_DATA; | ||
190 | } | ||
191 | |||
192 | static void cleanup2(ADDED_OBJ *a) | ||
193 | { a->obj->nid++; } | ||
194 | |||
195 | static void cleanup3(ADDED_OBJ *a) | ||
196 | { | ||
197 | if (--a->obj->nid == 0) | ||
198 | ASN1_OBJECT_free(a->obj); | ||
199 | OPENSSL_free(a); | ||
200 | } | ||
201 | |||
202 | void OBJ_cleanup(void) | ||
203 | { | ||
204 | if (added == NULL) return; | ||
205 | added->down_load=0; | ||
206 | lh_doall(added,cleanup1); /* zero counters */ | ||
207 | lh_doall(added,cleanup2); /* set counters */ | ||
208 | lh_doall(added,cleanup3); /* free objects */ | ||
209 | lh_free(added); | ||
210 | added=NULL; | ||
211 | } | ||
212 | |||
213 | int OBJ_new_nid(int num) | ||
214 | { | ||
215 | int i; | ||
216 | |||
217 | i=new_nid; | ||
218 | new_nid+=num; | ||
219 | return(i); | ||
220 | } | ||
221 | |||
222 | int OBJ_add_object(ASN1_OBJECT *obj) | ||
223 | { | ||
224 | ASN1_OBJECT *o; | ||
225 | ADDED_OBJ *ao[4]={NULL,NULL,NULL,NULL},*aop; | ||
226 | int i; | ||
227 | |||
228 | if (added == NULL) | ||
229 | if (!init_added()) return(0); | ||
230 | if ((o=OBJ_dup(obj)) == NULL) goto err; | ||
231 | ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); | ||
232 | if ((o->length != 0) && (obj->data != NULL)) | ||
233 | ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); | ||
234 | if (o->sn != NULL) | ||
235 | ao[ADDED_SNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); | ||
236 | if (o->ln != NULL) | ||
237 | ao[ADDED_LNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); | ||
238 | |||
239 | for (i=ADDED_DATA; i<=ADDED_NID; i++) | ||
240 | { | ||
241 | if (ao[i] != NULL) | ||
242 | { | ||
243 | ao[i]->type=i; | ||
244 | ao[i]->obj=o; | ||
245 | aop=(ADDED_OBJ *)lh_insert(added,ao[i]); | ||
246 | /* memory leak, buit should not normally matter */ | ||
247 | if (aop != NULL) | ||
248 | OPENSSL_free(aop); | ||
249 | } | ||
250 | } | ||
251 | o->flags&= ~(ASN1_OBJECT_FLAG_DYNAMIC|ASN1_OBJECT_FLAG_DYNAMIC_STRINGS| | ||
252 | ASN1_OBJECT_FLAG_DYNAMIC_DATA); | ||
253 | |||
254 | return(o->nid); | ||
255 | err: | ||
256 | for (i=ADDED_DATA; i<=ADDED_NID; i++) | ||
257 | if (ao[i] != NULL) OPENSSL_free(ao[i]); | ||
258 | if (o != NULL) OPENSSL_free(o); | ||
259 | return(NID_undef); | ||
260 | } | ||
261 | |||
262 | ASN1_OBJECT *OBJ_nid2obj(int n) | ||
263 | { | ||
264 | ADDED_OBJ ad,*adp; | ||
265 | ASN1_OBJECT ob; | ||
266 | |||
267 | if ((n >= 0) && (n < NUM_NID)) | ||
268 | { | ||
269 | if ((n != NID_undef) && (nid_objs[n].nid == NID_undef)) | ||
270 | { | ||
271 | OBJerr(OBJ_F_OBJ_NID2OBJ,OBJ_R_UNKNOWN_NID); | ||
272 | return(NULL); | ||
273 | } | ||
274 | return((ASN1_OBJECT *)&(nid_objs[n])); | ||
275 | } | ||
276 | else if (added == NULL) | ||
277 | return(NULL); | ||
278 | else | ||
279 | { | ||
280 | ad.type=ADDED_NID; | ||
281 | ad.obj= &ob; | ||
282 | ob.nid=n; | ||
283 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); | ||
284 | if (adp != NULL) | ||
285 | return(adp->obj); | ||
286 | else | ||
287 | { | ||
288 | OBJerr(OBJ_F_OBJ_NID2OBJ,OBJ_R_UNKNOWN_NID); | ||
289 | return(NULL); | ||
290 | } | ||
291 | } | ||
292 | } | ||
293 | |||
294 | const char *OBJ_nid2sn(int n) | ||
295 | { | ||
296 | ADDED_OBJ ad,*adp; | ||
297 | ASN1_OBJECT ob; | ||
298 | |||
299 | if ((n >= 0) && (n < NUM_NID)) | ||
300 | { | ||
301 | if ((n != NID_undef) && (nid_objs[n].nid == NID_undef)) | ||
302 | { | ||
303 | OBJerr(OBJ_F_OBJ_NID2SN,OBJ_R_UNKNOWN_NID); | ||
304 | return(NULL); | ||
305 | } | ||
306 | return(nid_objs[n].sn); | ||
307 | } | ||
308 | else if (added == NULL) | ||
309 | return(NULL); | ||
310 | else | ||
311 | { | ||
312 | ad.type=ADDED_NID; | ||
313 | ad.obj= &ob; | ||
314 | ob.nid=n; | ||
315 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); | ||
316 | if (adp != NULL) | ||
317 | return(adp->obj->sn); | ||
318 | else | ||
319 | { | ||
320 | OBJerr(OBJ_F_OBJ_NID2SN,OBJ_R_UNKNOWN_NID); | ||
321 | return(NULL); | ||
322 | } | ||
323 | } | ||
324 | } | ||
325 | |||
326 | const char *OBJ_nid2ln(int n) | ||
327 | { | ||
328 | ADDED_OBJ ad,*adp; | ||
329 | ASN1_OBJECT ob; | ||
330 | |||
331 | if ((n >= 0) && (n < NUM_NID)) | ||
332 | { | ||
333 | if ((n != NID_undef) && (nid_objs[n].nid == NID_undef)) | ||
334 | { | ||
335 | OBJerr(OBJ_F_OBJ_NID2LN,OBJ_R_UNKNOWN_NID); | ||
336 | return(NULL); | ||
337 | } | ||
338 | return(nid_objs[n].ln); | ||
339 | } | ||
340 | else if (added == NULL) | ||
341 | return(NULL); | ||
342 | else | ||
343 | { | ||
344 | ad.type=ADDED_NID; | ||
345 | ad.obj= &ob; | ||
346 | ob.nid=n; | ||
347 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); | ||
348 | if (adp != NULL) | ||
349 | return(adp->obj->ln); | ||
350 | else | ||
351 | { | ||
352 | OBJerr(OBJ_F_OBJ_NID2LN,OBJ_R_UNKNOWN_NID); | ||
353 | return(NULL); | ||
354 | } | ||
355 | } | ||
356 | } | ||
357 | |||
358 | int OBJ_obj2nid(ASN1_OBJECT *a) | ||
359 | { | ||
360 | ASN1_OBJECT **op; | ||
361 | ADDED_OBJ ad,*adp; | ||
362 | |||
363 | if (a == NULL) | ||
364 | return(NID_undef); | ||
365 | if (a->nid != 0) | ||
366 | return(a->nid); | ||
367 | |||
368 | if (added != NULL) | ||
369 | { | ||
370 | ad.type=ADDED_DATA; | ||
371 | ad.obj=a; | ||
372 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); | ||
373 | if (adp != NULL) return (adp->obj->nid); | ||
374 | } | ||
375 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&a,(char *)obj_objs,NUM_OBJ, | ||
376 | sizeof(ASN1_OBJECT *),obj_cmp); | ||
377 | if (op == NULL) | ||
378 | return(NID_undef); | ||
379 | return((*op)->nid); | ||
380 | } | ||
381 | |||
382 | /* Convert an object name into an ASN1_OBJECT | ||
383 | * if "noname" is not set then search for short and long names first. | ||
384 | * This will convert the "dotted" form into an object: unlike OBJ_txt2nid | ||
385 | * it can be used with any objects, not just registered ones. | ||
386 | */ | ||
387 | |||
388 | ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) | ||
389 | { | ||
390 | int nid = NID_undef; | ||
391 | ASN1_OBJECT *op=NULL; | ||
392 | unsigned char *buf,*p; | ||
393 | int i, j; | ||
394 | |||
395 | if(!no_name) { | ||
396 | if( ((nid = OBJ_sn2nid(s)) != NID_undef) || | ||
397 | ((nid = OBJ_ln2nid(s)) != NID_undef) ) | ||
398 | return OBJ_nid2obj(nid); | ||
399 | } | ||
400 | |||
401 | /* Work out size of content octets */ | ||
402 | i=a2d_ASN1_OBJECT(NULL,0,s,-1); | ||
403 | if (i <= 0) { | ||
404 | /* Clear the error */ | ||
405 | ERR_get_error(); | ||
406 | return NULL; | ||
407 | } | ||
408 | /* Work out total size */ | ||
409 | j = ASN1_object_size(0,i,V_ASN1_OBJECT); | ||
410 | |||
411 | if((buf=(unsigned char *)OPENSSL_malloc(j)) == NULL) return NULL; | ||
412 | |||
413 | p = buf; | ||
414 | /* Write out tag+length */ | ||
415 | ASN1_put_object(&p,0,i,V_ASN1_OBJECT,V_ASN1_UNIVERSAL); | ||
416 | /* Write out contents */ | ||
417 | a2d_ASN1_OBJECT(p,i,s,-1); | ||
418 | |||
419 | p=buf; | ||
420 | op=d2i_ASN1_OBJECT(NULL,&p,i); | ||
421 | OPENSSL_free(buf); | ||
422 | return op; | ||
423 | } | ||
424 | |||
425 | int OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *a, int no_name) | ||
426 | { | ||
427 | int i,idx=0,n=0,len,nid; | ||
428 | unsigned long l; | ||
429 | unsigned char *p; | ||
430 | const char *s; | ||
431 | char tbuf[32]; | ||
432 | |||
433 | if (buf_len <= 0) return(0); | ||
434 | |||
435 | if ((a == NULL) || (a->data == NULL)) { | ||
436 | buf[0]='\0'; | ||
437 | return(0); | ||
438 | } | ||
439 | |||
440 | nid=OBJ_obj2nid(a); | ||
441 | if ((nid == NID_undef) || no_name) { | ||
442 | len=a->length; | ||
443 | p=a->data; | ||
444 | |||
445 | idx=0; | ||
446 | l=0; | ||
447 | while (idx < a->length) { | ||
448 | l|=(p[idx]&0x7f); | ||
449 | if (!(p[idx] & 0x80)) break; | ||
450 | l<<=7L; | ||
451 | idx++; | ||
452 | } | ||
453 | idx++; | ||
454 | i=(int)(l/40); | ||
455 | if (i > 2) i=2; | ||
456 | l-=(long)(i*40); | ||
457 | |||
458 | sprintf(tbuf,"%d.%lu",i,l); | ||
459 | i=strlen(tbuf); | ||
460 | strncpy(buf,tbuf,buf_len); | ||
461 | buf_len-=i; | ||
462 | buf+=i; | ||
463 | n+=i; | ||
464 | |||
465 | l=0; | ||
466 | for (; idx<len; idx++) { | ||
467 | l|=p[idx]&0x7f; | ||
468 | if (!(p[idx] & 0x80)) { | ||
469 | sprintf(tbuf,".%lu",l); | ||
470 | i=strlen(tbuf); | ||
471 | if (buf_len > 0) | ||
472 | strncpy(buf,tbuf,buf_len); | ||
473 | buf_len-=i; | ||
474 | buf+=i; | ||
475 | n+=i; | ||
476 | l=0; | ||
477 | } | ||
478 | l<<=7L; | ||
479 | } | ||
480 | } else { | ||
481 | s=OBJ_nid2ln(nid); | ||
482 | if (s == NULL) | ||
483 | s=OBJ_nid2sn(nid); | ||
484 | strncpy(buf,s,buf_len); | ||
485 | n=strlen(s); | ||
486 | } | ||
487 | buf[buf_len-1]='\0'; | ||
488 | return(n); | ||
489 | } | ||
490 | |||
491 | int OBJ_txt2nid(char *s) | ||
492 | { | ||
493 | ASN1_OBJECT *obj; | ||
494 | int nid; | ||
495 | obj = OBJ_txt2obj(s, 0); | ||
496 | nid = OBJ_obj2nid(obj); | ||
497 | ASN1_OBJECT_free(obj); | ||
498 | return nid; | ||
499 | } | ||
500 | |||
501 | int OBJ_ln2nid(const char *s) | ||
502 | { | ||
503 | ASN1_OBJECT o,*oo= &o,**op; | ||
504 | ADDED_OBJ ad,*adp; | ||
505 | |||
506 | o.ln=s; | ||
507 | if (added != NULL) | ||
508 | { | ||
509 | ad.type=ADDED_LNAME; | ||
510 | ad.obj= &o; | ||
511 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); | ||
512 | if (adp != NULL) return (adp->obj->nid); | ||
513 | } | ||
514 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)ln_objs,NUM_LN, | ||
515 | sizeof(ASN1_OBJECT *),ln_cmp); | ||
516 | if (op == NULL) return(NID_undef); | ||
517 | return((*op)->nid); | ||
518 | } | ||
519 | |||
520 | int OBJ_sn2nid(const char *s) | ||
521 | { | ||
522 | ASN1_OBJECT o,*oo= &o,**op; | ||
523 | ADDED_OBJ ad,*adp; | ||
524 | |||
525 | o.sn=s; | ||
526 | if (added != NULL) | ||
527 | { | ||
528 | ad.type=ADDED_SNAME; | ||
529 | ad.obj= &o; | ||
530 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); | ||
531 | if (adp != NULL) return (adp->obj->nid); | ||
532 | } | ||
533 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)sn_objs,NUM_SN, | ||
534 | sizeof(ASN1_OBJECT *),sn_cmp); | ||
535 | if (op == NULL) return(NID_undef); | ||
536 | return((*op)->nid); | ||
537 | } | ||
538 | |||
539 | static int obj_cmp(const void *ap, const void *bp) | ||
540 | { | ||
541 | int j; | ||
542 | ASN1_OBJECT *a= *(ASN1_OBJECT **)ap; | ||
543 | ASN1_OBJECT *b= *(ASN1_OBJECT **)bp; | ||
544 | |||
545 | j=(a->length - b->length); | ||
546 | if (j) return(j); | ||
547 | return(memcmp(a->data,b->data,a->length)); | ||
548 | } | ||
549 | |||
550 | char *OBJ_bsearch(char *key, char *base, int num, int size, int (*cmp)(const void *, const void *)) | ||
551 | { | ||
552 | int l,h,i,c; | ||
553 | char *p; | ||
554 | |||
555 | if (num == 0) return(NULL); | ||
556 | l=0; | ||
557 | h=num; | ||
558 | while (l < h) | ||
559 | { | ||
560 | i=(l+h)/2; | ||
561 | p= &(base[i*size]); | ||
562 | c=(*cmp)(key,p); | ||
563 | if (c < 0) | ||
564 | h=i; | ||
565 | else if (c > 0) | ||
566 | l=i+1; | ||
567 | else | ||
568 | return(p); | ||
569 | } | ||
570 | #ifdef CHARSET_EBCDIC | ||
571 | /* THIS IS A KLUDGE - Because the *_obj is sorted in ASCII order, and | ||
572 | * I don't have perl (yet), we revert to a *LINEAR* search | ||
573 | * when the object wasn't found in the binary search. | ||
574 | */ | ||
575 | for (i=0; i<num; ++i) { | ||
576 | p= &(base[i*size]); | ||
577 | if ((*cmp)(key,p) == 0) | ||
578 | return p; | ||
579 | } | ||
580 | #endif | ||
581 | return(NULL); | ||
582 | } | ||
583 | |||
584 | int OBJ_create_objects(BIO *in) | ||
585 | { | ||
586 | MS_STATIC char buf[512]; | ||
587 | int i,num=0; | ||
588 | char *o,*s,*l=NULL; | ||
589 | |||
590 | for (;;) | ||
591 | { | ||
592 | s=o=NULL; | ||
593 | i=BIO_gets(in,buf,512); | ||
594 | if (i <= 0) return(num); | ||
595 | buf[i-1]='\0'; | ||
596 | if (!isalnum((unsigned char)buf[0])) return(num); | ||
597 | o=s=buf; | ||
598 | while (isdigit((unsigned char)*s) || (*s == '.')) | ||
599 | s++; | ||
600 | if (*s != '\0') | ||
601 | { | ||
602 | *(s++)='\0'; | ||
603 | while (isspace((unsigned char)*s)) | ||
604 | s++; | ||
605 | if (*s == '\0') | ||
606 | s=NULL; | ||
607 | else | ||
608 | { | ||
609 | l=s; | ||
610 | while ((*l != '\0') && !isspace((unsigned char)*l)) | ||
611 | l++; | ||
612 | if (*l != '\0') | ||
613 | { | ||
614 | *(l++)='\0'; | ||
615 | while (isspace((unsigned char)*l)) | ||
616 | l++; | ||
617 | if (*l == '\0') l=NULL; | ||
618 | } | ||
619 | else | ||
620 | l=NULL; | ||
621 | } | ||
622 | } | ||
623 | else | ||
624 | s=NULL; | ||
625 | if ((o == NULL) || (*o == '\0')) return(num); | ||
626 | if (!OBJ_create(o,s,l)) return(num); | ||
627 | num++; | ||
628 | } | ||
629 | /* return(num); */ | ||
630 | } | ||
631 | |||
632 | int OBJ_create(char *oid, char *sn, char *ln) | ||
633 | { | ||
634 | int ok=0; | ||
635 | ASN1_OBJECT *op=NULL; | ||
636 | unsigned char *buf; | ||
637 | int i; | ||
638 | |||
639 | i=a2d_ASN1_OBJECT(NULL,0,oid,-1); | ||
640 | if (i <= 0) return(0); | ||
641 | |||
642 | if ((buf=(unsigned char *)OPENSSL_malloc(i)) == NULL) | ||
643 | { | ||
644 | OBJerr(OBJ_F_OBJ_CREATE,OBJ_R_MALLOC_FAILURE); | ||
645 | return(0); | ||
646 | } | ||
647 | i=a2d_ASN1_OBJECT(buf,i,oid,-1); | ||
648 | op=(ASN1_OBJECT *)ASN1_OBJECT_create(OBJ_new_nid(1),buf,i,sn,ln); | ||
649 | if (op == NULL) | ||
650 | goto err; | ||
651 | ok=OBJ_add_object(op); | ||
652 | err: | ||
653 | ASN1_OBJECT_free(op); | ||
654 | OPENSSL_free(buf); | ||
655 | return(ok); | ||
656 | } | ||
657 | |||
diff --git a/src/lib/libcrypto/objects/obj_dat.pl b/src/lib/libcrypto/objects/obj_dat.pl deleted file mode 100644 index 11066df680..0000000000 --- a/src/lib/libcrypto/objects/obj_dat.pl +++ /dev/null | |||
@@ -1,302 +0,0 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | |||
3 | sub obj_cmp | ||
4 | { | ||
5 | local(@a,@b,$_,$r); | ||
6 | |||
7 | $A=$obj_len{$obj{$nid{$a}}}; | ||
8 | $B=$obj_len{$obj{$nid{$b}}}; | ||
9 | |||
10 | $r=($A-$B); | ||
11 | return($r) if $r != 0; | ||
12 | |||
13 | $A=$obj_der{$obj{$nid{$a}}}; | ||
14 | $B=$obj_der{$obj{$nid{$b}}}; | ||
15 | |||
16 | return($A cmp $B); | ||
17 | } | ||
18 | |||
19 | sub expand_obj | ||
20 | { | ||
21 | local(*v)=@_; | ||
22 | local($k,$d); | ||
23 | local($i); | ||
24 | |||
25 | do { | ||
26 | $i=0; | ||
27 | foreach $k (keys %v) | ||
28 | { | ||
29 | if (($v{$k} =~ s/(OBJ_[^,]+),/$v{$1},/)) | ||
30 | { $i++; } | ||
31 | } | ||
32 | } while($i); | ||
33 | foreach $k (keys %v) | ||
34 | { | ||
35 | @a=split(/,/,$v{$k}); | ||
36 | $objn{$k}=$#a+1; | ||
37 | } | ||
38 | return(%objn); | ||
39 | } | ||
40 | |||
41 | open (IN,"$ARGV[0]") || die "Can't open input file $ARGV[0]"; | ||
42 | open (OUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; | ||
43 | |||
44 | while (<IN>) | ||
45 | { | ||
46 | next unless /^\#define\s+(\S+)\s+(.*)$/; | ||
47 | $v=$1; | ||
48 | $d=$2; | ||
49 | $d =~ s/^\"//; | ||
50 | $d =~ s/\"$//; | ||
51 | if ($v =~ /^SN_(.*)$/) | ||
52 | { | ||
53 | if(defined $snames{$d}) | ||
54 | { | ||
55 | print "WARNING: Duplicate short name \"$d\"\n"; | ||
56 | } | ||
57 | else | ||
58 | { $snames{$d} = "X"; } | ||
59 | $sn{$1}=$d; | ||
60 | } | ||
61 | elsif ($v =~ /^LN_(.*)$/) | ||
62 | { | ||
63 | if(defined $lnames{$d}) | ||
64 | { | ||
65 | print "WARNING: Duplicate long name \"$d\"\n"; | ||
66 | } | ||
67 | else | ||
68 | { $lnames{$d} = "X"; } | ||
69 | $ln{$1}=$d; | ||
70 | } | ||
71 | elsif ($v =~ /^NID_(.*)$/) | ||
72 | { $nid{$d}=$1; } | ||
73 | elsif ($v =~ /^OBJ_(.*)$/) | ||
74 | { | ||
75 | $obj{$1}=$v; | ||
76 | $objd{$v}=$d; | ||
77 | } | ||
78 | } | ||
79 | close IN; | ||
80 | |||
81 | %ob=&expand_obj(*objd); | ||
82 | |||
83 | @a=sort { $a <=> $b } keys %nid; | ||
84 | $n=$a[$#a]+1; | ||
85 | |||
86 | @lvalues=(); | ||
87 | $lvalues=0; | ||
88 | |||
89 | for ($i=0; $i<$n; $i++) | ||
90 | { | ||
91 | if (!defined($nid{$i})) | ||
92 | { | ||
93 | push(@out,"{NULL,NULL,NID_undef,0,NULL},\n"); | ||
94 | } | ||
95 | else | ||
96 | { | ||
97 | $sn=defined($sn{$nid{$i}})?"$sn{$nid{$i}}":"NULL"; | ||
98 | $ln=defined($ln{$nid{$i}})?"$ln{$nid{$i}}":"NULL"; | ||
99 | |||
100 | if ($sn eq "NULL") { | ||
101 | $sn=$ln; | ||
102 | $sn{$nid{$i}} = $ln; | ||
103 | } | ||
104 | |||
105 | if ($ln eq "NULL") { | ||
106 | $ln=$sn; | ||
107 | $ln{$nid{$i}} = $sn; | ||
108 | } | ||
109 | |||
110 | $out ="{"; | ||
111 | $out.="\"$sn\""; | ||
112 | $out.=","."\"$ln\""; | ||
113 | $out.=",NID_$nid{$i},"; | ||
114 | if (defined($obj{$nid{$i}})) | ||
115 | { | ||
116 | $v=$objd{$obj{$nid{$i}}}; | ||
117 | $v =~ s/L//g; | ||
118 | $v =~ s/,/ /g; | ||
119 | $r=&der_it($v); | ||
120 | $z=""; | ||
121 | $length=0; | ||
122 | foreach (unpack("C*",$r)) | ||
123 | { | ||
124 | $z.=sprintf("0x%02X,",$_); | ||
125 | $length++; | ||
126 | } | ||
127 | $obj_der{$obj{$nid{$i}}}=$z; | ||
128 | $obj_len{$obj{$nid{$i}}}=$length; | ||
129 | |||
130 | push(@lvalues,sprintf("%-45s/* [%3d] %s */\n", | ||
131 | $z,$lvalues,$obj{$nid{$i}})); | ||
132 | $out.="$length,&(lvalues[$lvalues]),0"; | ||
133 | $lvalues+=$length; | ||
134 | } | ||
135 | else | ||
136 | { | ||
137 | $out.="0,NULL"; | ||
138 | } | ||
139 | $out.="},\n"; | ||
140 | push(@out,$out); | ||
141 | } | ||
142 | } | ||
143 | |||
144 | @a=grep(defined($sn{$nid{$_}}),0 .. $n); | ||
145 | foreach (sort { $sn{$nid{$a}} cmp $sn{$nid{$b}} } @a) | ||
146 | { | ||
147 | push(@sn,sprintf("&(nid_objs[%2d]),/* \"$sn{$nid{$_}}\" */\n",$_)); | ||
148 | } | ||
149 | |||
150 | @a=grep(defined($ln{$nid{$_}}),0 .. $n); | ||
151 | foreach (sort { $ln{$nid{$a}} cmp $ln{$nid{$b}} } @a) | ||
152 | { | ||
153 | push(@ln,sprintf("&(nid_objs[%2d]),/* \"$ln{$nid{$_}}\" */\n",$_)); | ||
154 | } | ||
155 | |||
156 | @a=grep(defined($obj{$nid{$_}}),0 .. $n); | ||
157 | foreach (sort obj_cmp @a) | ||
158 | { | ||
159 | $m=$obj{$nid{$_}}; | ||
160 | $v=$objd{$m}; | ||
161 | $v =~ s/L//g; | ||
162 | $v =~ s/,/ /g; | ||
163 | push(@ob,sprintf("&(nid_objs[%2d]),/* %-32s %s */\n",$_,$m,$v)); | ||
164 | } | ||
165 | |||
166 | print OUT <<'EOF'; | ||
167 | /* lib/obj/obj_dat.h */ | ||
168 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
169 | * All rights reserved. | ||
170 | * | ||
171 | * This package is an SSL implementation written | ||
172 | * by Eric Young (eay@cryptsoft.com). | ||
173 | * The implementation was written so as to conform with Netscapes SSL. | ||
174 | * | ||
175 | * This library is free for commercial and non-commercial use as long as | ||
176 | * the following conditions are aheared to. The following conditions | ||
177 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
178 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
179 | * included with this distribution is covered by the same copyright terms | ||
180 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
181 | * | ||
182 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
183 | * the code are not to be removed. | ||
184 | * If this package is used in a product, Eric Young should be given attribution | ||
185 | * as the author of the parts of the library used. | ||
186 | * This can be in the form of a textual message at program startup or | ||
187 | * in documentation (online or textual) provided with the package. | ||
188 | * | ||
189 | * Redistribution and use in source and binary forms, with or without | ||
190 | * modification, are permitted provided that the following conditions | ||
191 | * are met: | ||
192 | * 1. Redistributions of source code must retain the copyright | ||
193 | * notice, this list of conditions and the following disclaimer. | ||
194 | * 2. Redistributions in binary form must reproduce the above copyright | ||
195 | * notice, this list of conditions and the following disclaimer in the | ||
196 | * documentation and/or other materials provided with the distribution. | ||
197 | * 3. All advertising materials mentioning features or use of this software | ||
198 | * must display the following acknowledgement: | ||
199 | * "This product includes cryptographic software written by | ||
200 | * Eric Young (eay@cryptsoft.com)" | ||
201 | * The word 'cryptographic' can be left out if the rouines from the library | ||
202 | * being used are not cryptographic related :-). | ||
203 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
204 | * the apps directory (application code) you must include an acknowledgement: | ||
205 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
206 | * | ||
207 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
208 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
209 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
210 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
211 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
212 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
213 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
214 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
215 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
216 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
217 | * SUCH DAMAGE. | ||
218 | * | ||
219 | * The licence and distribution terms for any publically available version or | ||
220 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
221 | * copied and put under another distribution licence | ||
222 | * [including the GNU Public Licence.] | ||
223 | */ | ||
224 | |||
225 | /* THIS FILE IS GENERATED FROM Objects.h by obj_dat.pl via the | ||
226 | * following command: | ||
227 | * perl obj_dat.pl objects.h obj_dat.h | ||
228 | */ | ||
229 | |||
230 | EOF | ||
231 | |||
232 | printf OUT "#define NUM_NID %d\n",$n; | ||
233 | printf OUT "#define NUM_SN %d\n",$#sn+1; | ||
234 | printf OUT "#define NUM_LN %d\n",$#ln+1; | ||
235 | printf OUT "#define NUM_OBJ %d\n\n",$#ob+1; | ||
236 | |||
237 | printf OUT "static unsigned char lvalues[%d]={\n",$lvalues+1; | ||
238 | print OUT @lvalues; | ||
239 | print OUT "};\n\n"; | ||
240 | |||
241 | printf OUT "static ASN1_OBJECT nid_objs[NUM_NID]={\n"; | ||
242 | foreach (@out) | ||
243 | { | ||
244 | if (length($_) > 75) | ||
245 | { | ||
246 | $out=""; | ||
247 | foreach (split(/,/)) | ||
248 | { | ||
249 | $t=$out.$_.","; | ||
250 | if (length($t) > 70) | ||
251 | { | ||
252 | print OUT "$out\n"; | ||
253 | $t="\t$_,"; | ||
254 | } | ||
255 | $out=$t; | ||
256 | } | ||
257 | chop $out; | ||
258 | print OUT "$out"; | ||
259 | } | ||
260 | else | ||
261 | { print OUT $_; } | ||
262 | } | ||
263 | print OUT "};\n\n"; | ||
264 | |||
265 | printf OUT "static ASN1_OBJECT *sn_objs[NUM_SN]={\n"; | ||
266 | print OUT @sn; | ||
267 | print OUT "};\n\n"; | ||
268 | |||
269 | printf OUT "static ASN1_OBJECT *ln_objs[NUM_LN]={\n"; | ||
270 | print OUT @ln; | ||
271 | print OUT "};\n\n"; | ||
272 | |||
273 | printf OUT "static ASN1_OBJECT *obj_objs[NUM_OBJ]={\n"; | ||
274 | print OUT @ob; | ||
275 | print OUT "};\n\n"; | ||
276 | |||
277 | close OUT; | ||
278 | |||
279 | sub der_it | ||
280 | { | ||
281 | local($v)=@_; | ||
282 | local(@a,$i,$ret,@r); | ||
283 | |||
284 | @a=split(/\s+/,$v); | ||
285 | $ret.=pack("C*",$a[0]*40+$a[1]); | ||
286 | shift @a; | ||
287 | shift @a; | ||
288 | foreach (@a) | ||
289 | { | ||
290 | @r=(); | ||
291 | $t=0; | ||
292 | while ($_ >= 128) | ||
293 | { | ||
294 | $x=$_%128; | ||
295 | $_/=128; | ||
296 | push(@r,((($t++)?0x80:0)|$x)); | ||
297 | } | ||
298 | push(@r,((($t++)?0x80:0)|$_)); | ||
299 | $ret.=pack("C*",reverse(@r)); | ||
300 | } | ||
301 | return($ret); | ||
302 | } | ||
diff --git a/src/lib/libcrypto/objects/obj_err.c b/src/lib/libcrypto/objects/obj_err.c deleted file mode 100644 index 7aec0ed47a..0000000000 --- a/src/lib/libcrypto/objects/obj_err.c +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* crypto/objects/obj_err.c */ | ||
2 | /* ==================================================================== | ||
3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@OpenSSL.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | * This product includes cryptographic software written by Eric Young | ||
51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
52 | * Hudson (tjh@cryptsoft.com). | ||
53 | * | ||
54 | */ | ||
55 | |||
56 | /* NOTE: this file was auto generated by the mkerr.pl script: any changes | ||
57 | * made to it will be overwritten when the script next updates this file, | ||
58 | * only reason strings will be preserved. | ||
59 | */ | ||
60 | |||
61 | #include <stdio.h> | ||
62 | #include <openssl/err.h> | ||
63 | #include <openssl/objects.h> | ||
64 | |||
65 | /* BEGIN ERROR CODES */ | ||
66 | #ifndef NO_ERR | ||
67 | static ERR_STRING_DATA OBJ_str_functs[]= | ||
68 | { | ||
69 | {ERR_PACK(0,OBJ_F_OBJ_CREATE,0), "OBJ_create"}, | ||
70 | {ERR_PACK(0,OBJ_F_OBJ_DUP,0), "OBJ_dup"}, | ||
71 | {ERR_PACK(0,OBJ_F_OBJ_NID2LN,0), "OBJ_nid2ln"}, | ||
72 | {ERR_PACK(0,OBJ_F_OBJ_NID2OBJ,0), "OBJ_nid2obj"}, | ||
73 | {ERR_PACK(0,OBJ_F_OBJ_NID2SN,0), "OBJ_nid2sn"}, | ||
74 | {0,NULL} | ||
75 | }; | ||
76 | |||
77 | static ERR_STRING_DATA OBJ_str_reasons[]= | ||
78 | { | ||
79 | {OBJ_R_MALLOC_FAILURE ,"malloc failure"}, | ||
80 | {OBJ_R_UNKNOWN_NID ,"unknown nid"}, | ||
81 | {0,NULL} | ||
82 | }; | ||
83 | |||
84 | #endif | ||
85 | |||
86 | void ERR_load_OBJ_strings(void) | ||
87 | { | ||
88 | static int init=1; | ||
89 | |||
90 | if (init) | ||
91 | { | ||
92 | init=0; | ||
93 | #ifndef NO_ERR | ||
94 | ERR_load_strings(ERR_LIB_OBJ,OBJ_str_functs); | ||
95 | ERR_load_strings(ERR_LIB_OBJ,OBJ_str_reasons); | ||
96 | #endif | ||
97 | |||
98 | } | ||
99 | } | ||
diff --git a/src/lib/libcrypto/objects/obj_lib.c b/src/lib/libcrypto/objects/obj_lib.c deleted file mode 100644 index 0c71639eba..0000000000 --- a/src/lib/libcrypto/objects/obj_lib.c +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | /* crypto/objects/obj_lib.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
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 | #include <stdio.h> | ||
60 | #include "cryptlib.h" | ||
61 | #include <openssl/lhash.h> | ||
62 | #include <openssl/objects.h> | ||
63 | #include <openssl/buffer.h> | ||
64 | |||
65 | ASN1_OBJECT *OBJ_dup(ASN1_OBJECT *o) | ||
66 | { | ||
67 | ASN1_OBJECT *r; | ||
68 | int i; | ||
69 | char *ln=NULL; | ||
70 | |||
71 | if (o == NULL) return(NULL); | ||
72 | if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC)) | ||
73 | return(o); | ||
74 | |||
75 | r=ASN1_OBJECT_new(); | ||
76 | if (r == NULL) | ||
77 | { | ||
78 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_ASN1_LIB); | ||
79 | return(NULL); | ||
80 | } | ||
81 | r->data=OPENSSL_malloc(o->length); | ||
82 | if (r->data == NULL) | ||
83 | goto err; | ||
84 | memcpy(r->data,o->data,o->length); | ||
85 | r->length=o->length; | ||
86 | r->nid=o->nid; | ||
87 | r->ln=r->sn=NULL; | ||
88 | if (o->ln != NULL) | ||
89 | { | ||
90 | i=strlen(o->ln)+1; | ||
91 | r->ln=ln=OPENSSL_malloc(i); | ||
92 | if (r->ln == NULL) goto err; | ||
93 | memcpy(ln,o->ln,i); | ||
94 | } | ||
95 | |||
96 | if (o->sn != NULL) | ||
97 | { | ||
98 | char *s; | ||
99 | |||
100 | i=strlen(o->sn)+1; | ||
101 | r->sn=s=OPENSSL_malloc(i); | ||
102 | if (r->sn == NULL) goto err; | ||
103 | memcpy(s,o->sn,i); | ||
104 | } | ||
105 | r->flags=o->flags|(ASN1_OBJECT_FLAG_DYNAMIC| | ||
106 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS|ASN1_OBJECT_FLAG_DYNAMIC_DATA); | ||
107 | return(r); | ||
108 | err: | ||
109 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_MALLOC_FAILURE); | ||
110 | if (r != NULL) | ||
111 | { | ||
112 | if (ln != NULL) OPENSSL_free(ln); | ||
113 | if (r->data != NULL) OPENSSL_free(r->data); | ||
114 | OPENSSL_free(r); | ||
115 | } | ||
116 | return(NULL); | ||
117 | } | ||
118 | |||
119 | int OBJ_cmp(ASN1_OBJECT *a, ASN1_OBJECT *b) | ||
120 | { | ||
121 | int ret; | ||
122 | |||
123 | ret=(a->length-b->length); | ||
124 | if (ret) return(ret); | ||
125 | return(memcmp(a->data,b->data,a->length)); | ||
126 | } | ||
diff --git a/src/lib/libcrypto/objects/obj_mac.num b/src/lib/libcrypto/objects/obj_mac.num deleted file mode 100644 index d73a51370f..0000000000 --- a/src/lib/libcrypto/objects/obj_mac.num +++ /dev/null | |||
@@ -1,392 +0,0 @@ | |||
1 | undef 0 | ||
2 | rsadsi 1 | ||
3 | pkcs 2 | ||
4 | md2 3 | ||
5 | md5 4 | ||
6 | rc4 5 | ||
7 | rsaEncryption 6 | ||
8 | md2WithRSAEncryption 7 | ||
9 | md5WithRSAEncryption 8 | ||
10 | pbeWithMD2AndDES_CBC 9 | ||
11 | pbeWithMD5AndDES_CBC 10 | ||
12 | X500 11 | ||
13 | X509 12 | ||
14 | commonName 13 | ||
15 | countryName 14 | ||
16 | localityName 15 | ||
17 | stateOrProvinceName 16 | ||
18 | organizationName 17 | ||
19 | organizationalUnitName 18 | ||
20 | rsa 19 | ||
21 | pkcs7 20 | ||
22 | pkcs7_data 21 | ||
23 | pkcs7_signed 22 | ||
24 | pkcs7_enveloped 23 | ||
25 | pkcs7_signedAndEnveloped 24 | ||
26 | pkcs7_digest 25 | ||
27 | pkcs7_encrypted 26 | ||
28 | pkcs3 27 | ||
29 | dhKeyAgreement 28 | ||
30 | des_ecb 29 | ||
31 | des_cfb64 30 | ||
32 | des_cbc 31 | ||
33 | des_ede 32 | ||
34 | des_ede3 33 | ||
35 | idea_cbc 34 | ||
36 | idea_cfb64 35 | ||
37 | idea_ecb 36 | ||
38 | rc2_cbc 37 | ||
39 | rc2_ecb 38 | ||
40 | rc2_cfb64 39 | ||
41 | rc2_ofb64 40 | ||
42 | sha 41 | ||
43 | shaWithRSAEncryption 42 | ||
44 | des_ede_cbc 43 | ||
45 | des_ede3_cbc 44 | ||
46 | des_ofb64 45 | ||
47 | idea_ofb64 46 | ||
48 | pkcs9 47 | ||
49 | pkcs9_emailAddress 48 | ||
50 | pkcs9_unstructuredName 49 | ||
51 | pkcs9_contentType 50 | ||
52 | pkcs9_messageDigest 51 | ||
53 | pkcs9_signingTime 52 | ||
54 | pkcs9_countersignature 53 | ||
55 | pkcs9_challengePassword 54 | ||
56 | pkcs9_unstructuredAddress 55 | ||
57 | pkcs9_extCertAttributes 56 | ||
58 | netscape 57 | ||
59 | netscape_cert_extension 58 | ||
60 | netscape_data_type 59 | ||
61 | des_ede_cfb64 60 | ||
62 | des_ede3_cfb64 61 | ||
63 | des_ede_ofb64 62 | ||
64 | des_ede3_ofb64 63 | ||
65 | sha1 64 | ||
66 | sha1WithRSAEncryption 65 | ||
67 | dsaWithSHA 66 | ||
68 | dsa_2 67 | ||
69 | pbeWithSHA1AndRC2_CBC 68 | ||
70 | id_pbkdf2 69 | ||
71 | dsaWithSHA1_2 70 | ||
72 | netscape_cert_type 71 | ||
73 | netscape_base_url 72 | ||
74 | netscape_revocation_url 73 | ||
75 | netscape_ca_revocation_url 74 | ||
76 | netscape_renewal_url 75 | ||
77 | netscape_ca_policy_url 76 | ||
78 | netscape_ssl_server_name 77 | ||
79 | netscape_comment 78 | ||
80 | netscape_cert_sequence 79 | ||
81 | desx_cbc 80 | ||
82 | id_ce 81 | ||
83 | subject_key_identifier 82 | ||
84 | key_usage 83 | ||
85 | private_key_usage_period 84 | ||
86 | subject_alt_name 85 | ||
87 | issuer_alt_name 86 | ||
88 | basic_constraints 87 | ||
89 | crl_number 88 | ||
90 | certificate_policies 89 | ||
91 | authority_key_identifier 90 | ||
92 | bf_cbc 91 | ||
93 | bf_ecb 92 | ||
94 | bf_cfb64 93 | ||
95 | bf_ofb64 94 | ||
96 | mdc2 95 | ||
97 | mdc2WithRSA 96 | ||
98 | rc4_40 97 | ||
99 | rc2_40_cbc 98 | ||
100 | givenName 99 | ||
101 | surname 100 | ||
102 | initials 101 | ||
103 | uniqueIdentifier 102 | ||
104 | crl_distribution_points 103 | ||
105 | md5WithRSA 104 | ||
106 | serialNumber 105 | ||
107 | title 106 | ||
108 | description 107 | ||
109 | cast5_cbc 108 | ||
110 | cast5_ecb 109 | ||
111 | cast5_cfb64 110 | ||
112 | cast5_ofb64 111 | ||
113 | pbeWithMD5AndCast5_CBC 112 | ||
114 | dsaWithSHA1 113 | ||
115 | md5_sha1 114 | ||
116 | sha1WithRSA 115 | ||
117 | dsa 116 | ||
118 | ripemd160 117 | ||
119 | ripemd160WithRSA 119 | ||
120 | rc5_cbc 120 | ||
121 | rc5_ecb 121 | ||
122 | rc5_cfb64 122 | ||
123 | rc5_ofb64 123 | ||
124 | rle_compression 124 | ||
125 | zlib_compression 125 | ||
126 | ext_key_usage 126 | ||
127 | id_pkix 127 | ||
128 | id_kp 128 | ||
129 | server_auth 129 | ||
130 | client_auth 130 | ||
131 | code_sign 131 | ||
132 | email_protect 132 | ||
133 | time_stamp 133 | ||
134 | ms_code_ind 134 | ||
135 | ms_code_com 135 | ||
136 | ms_ctl_sign 136 | ||
137 | ms_sgc 137 | ||
138 | ms_efs 138 | ||
139 | ns_sgc 139 | ||
140 | delta_crl 140 | ||
141 | crl_reason 141 | ||
142 | invalidity_date 142 | ||
143 | sxnet 143 | ||
144 | pbe_WithSHA1And128BitRC4 144 | ||
145 | pbe_WithSHA1And40BitRC4 145 | ||
146 | pbe_WithSHA1And3_Key_TripleDES_CBC 146 | ||
147 | pbe_WithSHA1And2_Key_TripleDES_CBC 147 | ||
148 | pbe_WithSHA1And128BitRC2_CBC 148 | ||
149 | pbe_WithSHA1And40BitRC2_CBC 149 | ||
150 | keyBag 150 | ||
151 | pkcs8ShroudedKeyBag 151 | ||
152 | certBag 152 | ||
153 | crlBag 153 | ||
154 | secretBag 154 | ||
155 | safeContentsBag 155 | ||
156 | friendlyName 156 | ||
157 | localKeyID 157 | ||
158 | x509Certificate 158 | ||
159 | sdsiCertificate 159 | ||
160 | x509Crl 160 | ||
161 | pbes2 161 | ||
162 | pbmac1 162 | ||
163 | hmacWithSHA1 163 | ||
164 | id_qt_cps 164 | ||
165 | id_qt_unotice 165 | ||
166 | rc2_64_cbc 166 | ||
167 | SMIMECapabilities 167 | ||
168 | pbeWithMD2AndRC2_CBC 168 | ||
169 | pbeWithMD5AndRC2_CBC 169 | ||
170 | pbeWithSHA1AndDES_CBC 170 | ||
171 | ms_ext_req 171 | ||
172 | ext_req 172 | ||
173 | name 173 | ||
174 | dnQualifier 174 | ||
175 | id_pe 175 | ||
176 | id_ad 176 | ||
177 | info_access 177 | ||
178 | ad_OCSP 178 | ||
179 | ad_ca_issuers 179 | ||
180 | OCSP_sign 180 | ||
181 | iso 181 | ||
182 | member_body 182 | ||
183 | ISO_US 183 | ||
184 | X9_57 184 | ||
185 | X9cm 185 | ||
186 | pkcs1 186 | ||
187 | pkcs5 187 | ||
188 | SMIME 188 | ||
189 | id_smime_mod 189 | ||
190 | id_smime_ct 190 | ||
191 | id_smime_aa 191 | ||
192 | id_smime_alg 192 | ||
193 | id_smime_cd 193 | ||
194 | id_smime_spq 194 | ||
195 | id_smime_cti 195 | ||
196 | id_smime_mod_cms 196 | ||
197 | id_smime_mod_ess 197 | ||
198 | id_smime_mod_oid 198 | ||
199 | id_smime_mod_msg_v3 199 | ||
200 | id_smime_mod_ets_eSignature_88 200 | ||
201 | id_smime_mod_ets_eSignature_97 201 | ||
202 | id_smime_mod_ets_eSigPolicy_88 202 | ||
203 | id_smime_mod_ets_eSigPolicy_97 203 | ||
204 | id_smime_ct_receipt 204 | ||
205 | id_smime_ct_authData 205 | ||
206 | id_smime_ct_publishCert 206 | ||
207 | id_smime_ct_TSTInfo 207 | ||
208 | id_smime_ct_TDTInfo 208 | ||
209 | id_smime_ct_contentInfo 209 | ||
210 | id_smime_ct_DVCSRequestData 210 | ||
211 | id_smime_ct_DVCSResponseData 211 | ||
212 | id_smime_aa_receiptRequest 212 | ||
213 | id_smime_aa_securityLabel 213 | ||
214 | id_smime_aa_mlExpandHistory 214 | ||
215 | id_smime_aa_contentHint 215 | ||
216 | id_smime_aa_msgSigDigest 216 | ||
217 | id_smime_aa_encapContentType 217 | ||
218 | id_smime_aa_contentIdentifier 218 | ||
219 | id_smime_aa_macValue 219 | ||
220 | id_smime_aa_equivalentLabels 220 | ||
221 | id_smime_aa_contentReference 221 | ||
222 | id_smime_aa_encrypKeyPref 222 | ||
223 | id_smime_aa_signingCertificate 223 | ||
224 | id_smime_aa_smimeEncryptCerts 224 | ||
225 | id_smime_aa_timeStampToken 225 | ||
226 | id_smime_aa_ets_sigPolicyId 226 | ||
227 | id_smime_aa_ets_commitmentType 227 | ||
228 | id_smime_aa_ets_signerLocation 228 | ||
229 | id_smime_aa_ets_signerAttr 229 | ||
230 | id_smime_aa_ets_otherSigCert 230 | ||
231 | id_smime_aa_ets_contentTimestamp 231 | ||
232 | id_smime_aa_ets_CertificateRefs 232 | ||
233 | id_smime_aa_ets_RevocationRefs 233 | ||
234 | id_smime_aa_ets_certValues 234 | ||
235 | id_smime_aa_ets_revocationValues 235 | ||
236 | id_smime_aa_ets_escTimeStamp 236 | ||
237 | id_smime_aa_ets_certCRLTimestamp 237 | ||
238 | id_smime_aa_ets_archiveTimeStamp 238 | ||
239 | id_smime_aa_signatureType 239 | ||
240 | id_smime_aa_dvcs_dvc 240 | ||
241 | id_smime_alg_ESDHwith3DES 241 | ||
242 | id_smime_alg_ESDHwithRC2 242 | ||
243 | id_smime_alg_3DESwrap 243 | ||
244 | id_smime_alg_RC2wrap 244 | ||
245 | id_smime_alg_ESDH 245 | ||
246 | id_smime_alg_CMS3DESwrap 246 | ||
247 | id_smime_alg_CMSRC2wrap 247 | ||
248 | id_smime_cd_ldap 248 | ||
249 | id_smime_spq_ets_sqt_uri 249 | ||
250 | id_smime_spq_ets_sqt_unotice 250 | ||
251 | id_smime_cti_ets_proofOfOrigin 251 | ||
252 | id_smime_cti_ets_proofOfReceipt 252 | ||
253 | id_smime_cti_ets_proofOfDelivery 253 | ||
254 | id_smime_cti_ets_proofOfSender 254 | ||
255 | id_smime_cti_ets_proofOfApproval 255 | ||
256 | id_smime_cti_ets_proofOfCreation 256 | ||
257 | md4 257 | ||
258 | id_pkix_mod 258 | ||
259 | id_qt 259 | ||
260 | id_it 260 | ||
261 | id_pkip 261 | ||
262 | id_alg 262 | ||
263 | id_cmc 263 | ||
264 | id_on 264 | ||
265 | id_pda 265 | ||
266 | id_aca 266 | ||
267 | id_qcs 267 | ||
268 | id_cct 268 | ||
269 | id_pkix1_explicit_88 269 | ||
270 | id_pkix1_implicit_88 270 | ||
271 | id_pkix1_explicit_93 271 | ||
272 | id_pkix1_implicit_93 272 | ||
273 | id_mod_crmf 273 | ||
274 | id_mod_cmc 274 | ||
275 | id_mod_kea_profile_88 275 | ||
276 | id_mod_kea_profile_93 276 | ||
277 | id_mod_cmp 277 | ||
278 | id_mod_qualified_cert_88 278 | ||
279 | id_mod_qualified_cert_93 279 | ||
280 | id_mod_attribute_cert 280 | ||
281 | id_mod_timestamp_protocol 281 | ||
282 | id_mod_ocsp 282 | ||
283 | id_mod_dvcs 283 | ||
284 | id_mod_cmp2000 284 | ||
285 | biometricInfo 285 | ||
286 | qcStatements 286 | ||
287 | ac_auditEntity 287 | ||
288 | ac_targeting 288 | ||
289 | aaControls 289 | ||
290 | sbqp_ipAddrBlock 290 | ||
291 | sbqp_autonomousSysNum 291 | ||
292 | sbqp_routerIdentifier 292 | ||
293 | textNotice 293 | ||
294 | ipsecEndSystem 294 | ||
295 | ipsecTunnel 295 | ||
296 | ipsecUser 296 | ||
297 | dvcs 297 | ||
298 | id_it_caProtEncCert 298 | ||
299 | id_it_signKeyPairTypes 299 | ||
300 | id_it_encKeyPairTypes 300 | ||
301 | id_it_preferredSymmAlg 301 | ||
302 | id_it_caKeyUpdateInfo 302 | ||
303 | id_it_currentCRL 303 | ||
304 | id_it_unsupportedOIDs 304 | ||
305 | id_it_subscriptionRequest 305 | ||
306 | id_it_subscriptionResponse 306 | ||
307 | id_it_keyPairParamReq 307 | ||
308 | id_it_keyPairParamRep 308 | ||
309 | id_it_revPassphrase 309 | ||
310 | id_it_implicitConfirm 310 | ||
311 | id_it_confirmWaitTime 311 | ||
312 | id_it_origPKIMessage 312 | ||
313 | id_regCtrl 313 | ||
314 | id_regInfo 314 | ||
315 | id_regCtrl_regToken 315 | ||
316 | id_regCtrl_authenticator 316 | ||
317 | id_regCtrl_pkiPublicationInfo 317 | ||
318 | id_regCtrl_pkiArchiveOptions 318 | ||
319 | id_regCtrl_oldCertID 319 | ||
320 | id_regCtrl_protocolEncrKey 320 | ||
321 | id_regInfo_utf8Pairs 321 | ||
322 | id_regInfo_certReq 322 | ||
323 | id_alg_des40 323 | ||
324 | id_alg_noSignature 324 | ||
325 | id_alg_dh_sig_hmac_sha1 325 | ||
326 | id_alg_dh_pop 326 | ||
327 | id_cmc_statusInfo 327 | ||
328 | id_cmc_identification 328 | ||
329 | id_cmc_identityProof 329 | ||
330 | id_cmc_dataReturn 330 | ||
331 | id_cmc_transactionId 331 | ||
332 | id_cmc_senderNonce 332 | ||
333 | id_cmc_recipientNonce 333 | ||
334 | id_cmc_addExtensions 334 | ||
335 | id_cmc_encryptedPOP 335 | ||
336 | id_cmc_decryptedPOP 336 | ||
337 | id_cmc_lraPOPWitness 337 | ||
338 | id_cmc_getCert 338 | ||
339 | id_cmc_getCRL 339 | ||
340 | id_cmc_revokeRequest 340 | ||
341 | id_cmc_regInfo 341 | ||
342 | id_cmc_responseInfo 342 | ||
343 | id_cmc_queryPending 343 | ||
344 | id_cmc_popLinkRandom 344 | ||
345 | id_cmc_popLinkWitness 345 | ||
346 | id_cmc_confirmCertAcceptance 346 | ||
347 | id_on_personalData 347 | ||
348 | id_pda_dateOfBirth 348 | ||
349 | id_pda_placeOfBirth 349 | ||
350 | id_pda_pseudonym 350 | ||
351 | id_pda_gender 351 | ||
352 | id_pda_countryOfCitizenship 352 | ||
353 | id_pda_countryOfResidence 353 | ||
354 | id_aca_authenticationInfo 354 | ||
355 | id_aca_accessIdentity 355 | ||
356 | id_aca_chargingIdentity 356 | ||
357 | id_aca_group 357 | ||
358 | id_aca_role 358 | ||
359 | id_qcs_pkixQCSyntax_v1 359 | ||
360 | id_cct_crs 360 | ||
361 | id_cct_PKIData 361 | ||
362 | id_cct_PKIResponse 362 | ||
363 | ad_timeStamping 363 | ||
364 | ad_dvcs 364 | ||
365 | id_pkix_OCSP_basic 365 | ||
366 | id_pkix_OCSP_Nonce 366 | ||
367 | id_pkix_OCSP_CrlID 367 | ||
368 | id_pkix_OCSP_acceptableResponses 368 | ||
369 | id_pkix_OCSP_noCheck 369 | ||
370 | id_pkix_OCSP_archiveCutoff 370 | ||
371 | id_pkix_OCSP_serviceLocator 371 | ||
372 | id_pkix_OCSP_extendedStatus 372 | ||
373 | id_pkix_OCSP_valid 373 | ||
374 | id_pkix_OCSP_path 374 | ||
375 | id_pkix_OCSP_trustRoot 375 | ||
376 | algorithm 376 | ||
377 | rsaSignature 377 | ||
378 | X500algorithms 378 | ||
379 | org 379 | ||
380 | dod 380 | ||
381 | iana 381 | ||
382 | Directory 382 | ||
383 | Management 383 | ||
384 | Experimental 384 | ||
385 | Private 385 | ||
386 | Security 386 | ||
387 | SNMPv2 387 | ||
388 | Mail 388 | ||
389 | Enterprises 389 | ||
390 | dcObject 390 | ||
391 | domainComponent 391 | ||
392 | Domain 392 | ||
diff --git a/src/lib/libcrypto/objects/objects.README b/src/lib/libcrypto/objects/objects.README deleted file mode 100644 index 4d745508d8..0000000000 --- a/src/lib/libcrypto/objects/objects.README +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | objects.txt syntax | ||
2 | ------------------ | ||
3 | |||
4 | To cover all the naming hacks that were previously in objects.h needed some | ||
5 | kind of hacks in objects.txt. | ||
6 | |||
7 | The basic syntax for adding an object is as follows: | ||
8 | |||
9 | 1 2 3 4 : shortName : Long Name | ||
10 | |||
11 | If the long name doesn't contain spaces, or no short name | ||
12 | exists, the long name is used as basis for the base name | ||
13 | in C. Otherwise, the short name is used. | ||
14 | |||
15 | The base name (let's call it 'base') will then be used to | ||
16 | create the C macros SN_base, LN_base, NID_base and OBJ_base. | ||
17 | |||
18 | Note that if the base name contains spaces, dashes or periods, | ||
19 | those will be converte to underscore. | ||
20 | |||
21 | Then there are some extra commands: | ||
22 | |||
23 | !Alias foo 1 2 3 4 | ||
24 | |||
25 | This juts makes a name foo for an OID. The C macro | ||
26 | OBJ_foo will be created as a result. | ||
27 | |||
28 | !Cname foo | ||
29 | |||
30 | This makes sure that the name foo will be used as base name | ||
31 | in C. | ||
32 | |||
33 | !module foo | ||
34 | 1 2 3 4 : shortName : Long Name | ||
35 | !global | ||
36 | |||
37 | The !module command was meant to define a kind of modularity. | ||
38 | What it does is to make sure the module name is prepended | ||
39 | to the base name. !global turns this off. This construction | ||
40 | is not recursive. | ||
41 | |||
42 | Lines starting with # are treated as comments, as well as any line starting | ||
43 | with ! and not matching the commands above. | ||
44 | |||
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h deleted file mode 100644 index c099e2e84e..0000000000 --- a/src/lib/libcrypto/objects/objects.h +++ /dev/null | |||
@@ -1,1038 +0,0 @@ | |||
1 | /* crypto/objects/objects.h */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
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 | #define USE_OBJ_MAC | ||
63 | |||
64 | #ifdef USE_OBJ_MAC | ||
65 | #include <openssl/obj_mac.h> | ||
66 | #else | ||
67 | #define SN_undef "UNDEF" | ||
68 | #define LN_undef "undefined" | ||
69 | #define NID_undef 0 | ||
70 | #define OBJ_undef 0L | ||
71 | |||
72 | #define SN_Algorithm "Algorithm" | ||
73 | #define LN_algorithm "algorithm" | ||
74 | #define NID_algorithm 38 | ||
75 | #define OBJ_algorithm 1L,3L,14L,3L,2L | ||
76 | |||
77 | #define LN_rsadsi "rsadsi" | ||
78 | #define NID_rsadsi 1 | ||
79 | #define OBJ_rsadsi 1L,2L,840L,113549L | ||
80 | |||
81 | #define LN_pkcs "pkcs" | ||
82 | #define NID_pkcs 2 | ||
83 | #define OBJ_pkcs OBJ_rsadsi,1L | ||
84 | |||
85 | #define SN_md2 "MD2" | ||
86 | #define LN_md2 "md2" | ||
87 | #define NID_md2 3 | ||
88 | #define OBJ_md2 OBJ_rsadsi,2L,2L | ||
89 | |||
90 | #define SN_md5 "MD5" | ||
91 | #define LN_md5 "md5" | ||
92 | #define NID_md5 4 | ||
93 | #define OBJ_md5 OBJ_rsadsi,2L,5L | ||
94 | |||
95 | #define SN_rc4 "RC4" | ||
96 | #define LN_rc4 "rc4" | ||
97 | #define NID_rc4 5 | ||
98 | #define OBJ_rc4 OBJ_rsadsi,3L,4L | ||
99 | |||
100 | #define LN_rsaEncryption "rsaEncryption" | ||
101 | #define NID_rsaEncryption 6 | ||
102 | #define OBJ_rsaEncryption OBJ_pkcs,1L,1L | ||
103 | |||
104 | #define SN_md2WithRSAEncryption "RSA-MD2" | ||
105 | #define LN_md2WithRSAEncryption "md2WithRSAEncryption" | ||
106 | #define NID_md2WithRSAEncryption 7 | ||
107 | #define OBJ_md2WithRSAEncryption OBJ_pkcs,1L,2L | ||
108 | |||
109 | #define SN_md5WithRSAEncryption "RSA-MD5" | ||
110 | #define LN_md5WithRSAEncryption "md5WithRSAEncryption" | ||
111 | #define NID_md5WithRSAEncryption 8 | ||
112 | #define OBJ_md5WithRSAEncryption OBJ_pkcs,1L,4L | ||
113 | |||
114 | #define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" | ||
115 | #define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" | ||
116 | #define NID_pbeWithMD2AndDES_CBC 9 | ||
117 | #define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs,5L,1L | ||
118 | |||
119 | #define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" | ||
120 | #define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" | ||
121 | #define NID_pbeWithMD5AndDES_CBC 10 | ||
122 | #define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs,5L,3L | ||
123 | |||
124 | #define LN_X500 "X500" | ||
125 | #define NID_X500 11 | ||
126 | #define OBJ_X500 2L,5L | ||
127 | |||
128 | #define LN_X509 "X509" | ||
129 | #define NID_X509 12 | ||
130 | #define OBJ_X509 OBJ_X500,4L | ||
131 | |||
132 | #define SN_commonName "CN" | ||
133 | #define LN_commonName "commonName" | ||
134 | #define NID_commonName 13 | ||
135 | #define OBJ_commonName OBJ_X509,3L | ||
136 | |||
137 | #define SN_countryName "C" | ||
138 | #define LN_countryName "countryName" | ||
139 | #define NID_countryName 14 | ||
140 | #define OBJ_countryName OBJ_X509,6L | ||
141 | |||
142 | #define SN_localityName "L" | ||
143 | #define LN_localityName "localityName" | ||
144 | #define NID_localityName 15 | ||
145 | #define OBJ_localityName OBJ_X509,7L | ||
146 | |||
147 | /* Postal Address? PA */ | ||
148 | |||
149 | /* should be "ST" (rfc1327) but MS uses 'S' */ | ||
150 | #define SN_stateOrProvinceName "ST" | ||
151 | #define LN_stateOrProvinceName "stateOrProvinceName" | ||
152 | #define NID_stateOrProvinceName 16 | ||
153 | #define OBJ_stateOrProvinceName OBJ_X509,8L | ||
154 | |||
155 | #define SN_organizationName "O" | ||
156 | #define LN_organizationName "organizationName" | ||
157 | #define NID_organizationName 17 | ||
158 | #define OBJ_organizationName OBJ_X509,10L | ||
159 | |||
160 | #define SN_organizationalUnitName "OU" | ||
161 | #define LN_organizationalUnitName "organizationalUnitName" | ||
162 | #define NID_organizationalUnitName 18 | ||
163 | #define OBJ_organizationalUnitName OBJ_X509,11L | ||
164 | |||
165 | #define SN_rsa "RSA" | ||
166 | #define LN_rsa "rsa" | ||
167 | #define NID_rsa 19 | ||
168 | #define OBJ_rsa OBJ_X500,8L,1L,1L | ||
169 | |||
170 | #define LN_pkcs7 "pkcs7" | ||
171 | #define NID_pkcs7 20 | ||
172 | #define OBJ_pkcs7 OBJ_pkcs,7L | ||
173 | |||
174 | #define LN_pkcs7_data "pkcs7-data" | ||
175 | #define NID_pkcs7_data 21 | ||
176 | #define OBJ_pkcs7_data OBJ_pkcs7,1L | ||
177 | |||
178 | #define LN_pkcs7_signed "pkcs7-signedData" | ||
179 | #define NID_pkcs7_signed 22 | ||
180 | #define OBJ_pkcs7_signed OBJ_pkcs7,2L | ||
181 | |||
182 | #define LN_pkcs7_enveloped "pkcs7-envelopedData" | ||
183 | #define NID_pkcs7_enveloped 23 | ||
184 | #define OBJ_pkcs7_enveloped OBJ_pkcs7,3L | ||
185 | |||
186 | #define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" | ||
187 | #define NID_pkcs7_signedAndEnveloped 24 | ||
188 | #define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L | ||
189 | |||
190 | #define LN_pkcs7_digest "pkcs7-digestData" | ||
191 | #define NID_pkcs7_digest 25 | ||
192 | #define OBJ_pkcs7_digest OBJ_pkcs7,5L | ||
193 | |||
194 | #define LN_pkcs7_encrypted "pkcs7-encryptedData" | ||
195 | #define NID_pkcs7_encrypted 26 | ||
196 | #define OBJ_pkcs7_encrypted OBJ_pkcs7,6L | ||
197 | |||
198 | #define LN_pkcs3 "pkcs3" | ||
199 | #define NID_pkcs3 27 | ||
200 | #define OBJ_pkcs3 OBJ_pkcs,3L | ||
201 | |||
202 | #define LN_dhKeyAgreement "dhKeyAgreement" | ||
203 | #define NID_dhKeyAgreement 28 | ||
204 | #define OBJ_dhKeyAgreement OBJ_pkcs3,1L | ||
205 | |||
206 | #define SN_des_ecb "DES-ECB" | ||
207 | #define LN_des_ecb "des-ecb" | ||
208 | #define NID_des_ecb 29 | ||
209 | #define OBJ_des_ecb OBJ_algorithm,6L | ||
210 | |||
211 | #define SN_des_cfb64 "DES-CFB" | ||
212 | #define LN_des_cfb64 "des-cfb" | ||
213 | #define NID_des_cfb64 30 | ||
214 | /* IV + num */ | ||
215 | #define OBJ_des_cfb64 OBJ_algorithm,9L | ||
216 | |||
217 | #define SN_des_cbc "DES-CBC" | ||
218 | #define LN_des_cbc "des-cbc" | ||
219 | #define NID_des_cbc 31 | ||
220 | /* IV */ | ||
221 | #define OBJ_des_cbc OBJ_algorithm,7L | ||
222 | |||
223 | #define SN_des_ede "DES-EDE" | ||
224 | #define LN_des_ede "des-ede" | ||
225 | #define NID_des_ede 32 | ||
226 | /* ?? */ | ||
227 | #define OBJ_des_ede OBJ_algorithm,17L | ||
228 | |||
229 | #define SN_des_ede3 "DES-EDE3" | ||
230 | #define LN_des_ede3 "des-ede3" | ||
231 | #define NID_des_ede3 33 | ||
232 | |||
233 | #define SN_idea_cbc "IDEA-CBC" | ||
234 | #define LN_idea_cbc "idea-cbc" | ||
235 | #define NID_idea_cbc 34 | ||
236 | #define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L | ||
237 | |||
238 | #define SN_idea_cfb64 "IDEA-CFB" | ||
239 | #define LN_idea_cfb64 "idea-cfb" | ||
240 | #define NID_idea_cfb64 35 | ||
241 | |||
242 | #define SN_idea_ecb "IDEA-ECB" | ||
243 | #define LN_idea_ecb "idea-ecb" | ||
244 | #define NID_idea_ecb 36 | ||
245 | |||
246 | #define SN_rc2_cbc "RC2-CBC" | ||
247 | #define LN_rc2_cbc "rc2-cbc" | ||
248 | #define NID_rc2_cbc 37 | ||
249 | #define OBJ_rc2_cbc OBJ_rsadsi,3L,2L | ||
250 | |||
251 | #define SN_rc2_ecb "RC2-ECB" | ||
252 | #define LN_rc2_ecb "rc2-ecb" | ||
253 | #define NID_rc2_ecb 38 | ||
254 | |||
255 | #define SN_rc2_cfb64 "RC2-CFB" | ||
256 | #define LN_rc2_cfb64 "rc2-cfb" | ||
257 | #define NID_rc2_cfb64 39 | ||
258 | |||
259 | #define SN_rc2_ofb64 "RC2-OFB" | ||
260 | #define LN_rc2_ofb64 "rc2-ofb" | ||
261 | #define NID_rc2_ofb64 40 | ||
262 | |||
263 | #define SN_sha "SHA" | ||
264 | #define LN_sha "sha" | ||
265 | #define NID_sha 41 | ||
266 | #define OBJ_sha OBJ_algorithm,18L | ||
267 | |||
268 | #define SN_shaWithRSAEncryption "RSA-SHA" | ||
269 | #define LN_shaWithRSAEncryption "shaWithRSAEncryption" | ||
270 | #define NID_shaWithRSAEncryption 42 | ||
271 | #define OBJ_shaWithRSAEncryption OBJ_algorithm,15L | ||
272 | |||
273 | #define SN_des_ede_cbc "DES-EDE-CBC" | ||
274 | #define LN_des_ede_cbc "des-ede-cbc" | ||
275 | #define NID_des_ede_cbc 43 | ||
276 | |||
277 | #define SN_des_ede3_cbc "DES-EDE3-CBC" | ||
278 | #define LN_des_ede3_cbc "des-ede3-cbc" | ||
279 | #define NID_des_ede3_cbc 44 | ||
280 | #define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L | ||
281 | |||
282 | #define SN_des_ofb64 "DES-OFB" | ||
283 | #define LN_des_ofb64 "des-ofb" | ||
284 | #define NID_des_ofb64 45 | ||
285 | #define OBJ_des_ofb64 OBJ_algorithm,8L | ||
286 | |||
287 | #define SN_idea_ofb64 "IDEA-OFB" | ||
288 | #define LN_idea_ofb64 "idea-ofb" | ||
289 | #define NID_idea_ofb64 46 | ||
290 | |||
291 | #define LN_pkcs9 "pkcs9" | ||
292 | #define NID_pkcs9 47 | ||
293 | #define OBJ_pkcs9 OBJ_pkcs,9L | ||
294 | |||
295 | #define SN_pkcs9_emailAddress "Email" | ||
296 | #define LN_pkcs9_emailAddress "emailAddress" | ||
297 | #define NID_pkcs9_emailAddress 48 | ||
298 | #define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L | ||
299 | |||
300 | #define LN_pkcs9_unstructuredName "unstructuredName" | ||
301 | #define NID_pkcs9_unstructuredName 49 | ||
302 | #define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L | ||
303 | |||
304 | #define LN_pkcs9_contentType "contentType" | ||
305 | #define NID_pkcs9_contentType 50 | ||
306 | #define OBJ_pkcs9_contentType OBJ_pkcs9,3L | ||
307 | |||
308 | #define LN_pkcs9_messageDigest "messageDigest" | ||
309 | #define NID_pkcs9_messageDigest 51 | ||
310 | #define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L | ||
311 | |||
312 | #define LN_pkcs9_signingTime "signingTime" | ||
313 | #define NID_pkcs9_signingTime 52 | ||
314 | #define OBJ_pkcs9_signingTime OBJ_pkcs9,5L | ||
315 | |||
316 | #define LN_pkcs9_countersignature "countersignature" | ||
317 | #define NID_pkcs9_countersignature 53 | ||
318 | #define OBJ_pkcs9_countersignature OBJ_pkcs9,6L | ||
319 | |||
320 | #define LN_pkcs9_challengePassword "challengePassword" | ||
321 | #define NID_pkcs9_challengePassword 54 | ||
322 | #define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L | ||
323 | |||
324 | #define LN_pkcs9_unstructuredAddress "unstructuredAddress" | ||
325 | #define NID_pkcs9_unstructuredAddress 55 | ||
326 | #define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L | ||
327 | |||
328 | #define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" | ||
329 | #define NID_pkcs9_extCertAttributes 56 | ||
330 | #define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L | ||
331 | |||
332 | #define SN_netscape "Netscape" | ||
333 | #define LN_netscape "Netscape Communications Corp." | ||
334 | #define NID_netscape 57 | ||
335 | #define OBJ_netscape 2L,16L,840L,1L,113730L | ||
336 | |||
337 | #define SN_netscape_cert_extension "nsCertExt" | ||
338 | #define LN_netscape_cert_extension "Netscape Certificate Extension" | ||
339 | #define NID_netscape_cert_extension 58 | ||
340 | #define OBJ_netscape_cert_extension OBJ_netscape,1L | ||
341 | |||
342 | #define SN_netscape_data_type "nsDataType" | ||
343 | #define LN_netscape_data_type "Netscape Data Type" | ||
344 | #define NID_netscape_data_type 59 | ||
345 | #define OBJ_netscape_data_type OBJ_netscape,2L | ||
346 | |||
347 | #define SN_des_ede_cfb64 "DES-EDE-CFB" | ||
348 | #define LN_des_ede_cfb64 "des-ede-cfb" | ||
349 | #define NID_des_ede_cfb64 60 | ||
350 | |||
351 | #define SN_des_ede3_cfb64 "DES-EDE3-CFB" | ||
352 | #define LN_des_ede3_cfb64 "des-ede3-cfb" | ||
353 | #define NID_des_ede3_cfb64 61 | ||
354 | |||
355 | #define SN_des_ede_ofb64 "DES-EDE-OFB" | ||
356 | #define LN_des_ede_ofb64 "des-ede-ofb" | ||
357 | #define NID_des_ede_ofb64 62 | ||
358 | |||
359 | #define SN_des_ede3_ofb64 "DES-EDE3-OFB" | ||
360 | #define LN_des_ede3_ofb64 "des-ede3-ofb" | ||
361 | #define NID_des_ede3_ofb64 63 | ||
362 | |||
363 | /* I'm not sure about the object ID */ | ||
364 | #define SN_sha1 "SHA1" | ||
365 | #define LN_sha1 "sha1" | ||
366 | #define NID_sha1 64 | ||
367 | #define OBJ_sha1 OBJ_algorithm,26L | ||
368 | /* 28 Jun 1996 - eay */ | ||
369 | /* #define OBJ_sha1 1L,3L,14L,2L,26L,05L <- wrong */ | ||
370 | |||
371 | #define SN_sha1WithRSAEncryption "RSA-SHA1" | ||
372 | #define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" | ||
373 | #define NID_sha1WithRSAEncryption 65 | ||
374 | #define OBJ_sha1WithRSAEncryption OBJ_pkcs,1L,5L | ||
375 | |||
376 | #define SN_dsaWithSHA "DSA-SHA" | ||
377 | #define LN_dsaWithSHA "dsaWithSHA" | ||
378 | #define NID_dsaWithSHA 66 | ||
379 | #define OBJ_dsaWithSHA OBJ_algorithm,13L | ||
380 | |||
381 | #define SN_dsa_2 "DSA-old" | ||
382 | #define LN_dsa_2 "dsaEncryption-old" | ||
383 | #define NID_dsa_2 67 | ||
384 | #define OBJ_dsa_2 OBJ_algorithm,12L | ||
385 | |||
386 | /* proposed by microsoft to RSA */ | ||
387 | #define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" | ||
388 | #define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" | ||
389 | #define NID_pbeWithSHA1AndRC2_CBC 68 | ||
390 | #define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L | ||
391 | |||
392 | /* proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now | ||
393 | * defined explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something | ||
394 | * completely different. | ||
395 | */ | ||
396 | #define LN_id_pbkdf2 "PBKDF2" | ||
397 | #define NID_id_pbkdf2 69 | ||
398 | #define OBJ_id_pbkdf2 OBJ_pkcs,5L,12L | ||
399 | |||
400 | #define SN_dsaWithSHA1_2 "DSA-SHA1-old" | ||
401 | #define LN_dsaWithSHA1_2 "dsaWithSHA1-old" | ||
402 | #define NID_dsaWithSHA1_2 70 | ||
403 | /* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */ | ||
404 | #define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L | ||
405 | |||
406 | #define SN_netscape_cert_type "nsCertType" | ||
407 | #define LN_netscape_cert_type "Netscape Cert Type" | ||
408 | #define NID_netscape_cert_type 71 | ||
409 | #define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L | ||
410 | |||
411 | #define SN_netscape_base_url "nsBaseUrl" | ||
412 | #define LN_netscape_base_url "Netscape Base Url" | ||
413 | #define NID_netscape_base_url 72 | ||
414 | #define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L | ||
415 | |||
416 | #define SN_netscape_revocation_url "nsRevocationUrl" | ||
417 | #define LN_netscape_revocation_url "Netscape Revocation Url" | ||
418 | #define NID_netscape_revocation_url 73 | ||
419 | #define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L | ||
420 | |||
421 | #define SN_netscape_ca_revocation_url "nsCaRevocationUrl" | ||
422 | #define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" | ||
423 | #define NID_netscape_ca_revocation_url 74 | ||
424 | #define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L | ||
425 | |||
426 | #define SN_netscape_renewal_url "nsRenewalUrl" | ||
427 | #define LN_netscape_renewal_url "Netscape Renewal Url" | ||
428 | #define NID_netscape_renewal_url 75 | ||
429 | #define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L | ||
430 | |||
431 | #define SN_netscape_ca_policy_url "nsCaPolicyUrl" | ||
432 | #define LN_netscape_ca_policy_url "Netscape CA Policy Url" | ||
433 | #define NID_netscape_ca_policy_url 76 | ||
434 | #define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L | ||
435 | |||
436 | #define SN_netscape_ssl_server_name "nsSslServerName" | ||
437 | #define LN_netscape_ssl_server_name "Netscape SSL Server Name" | ||
438 | #define NID_netscape_ssl_server_name 77 | ||
439 | #define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L | ||
440 | |||
441 | #define SN_netscape_comment "nsComment" | ||
442 | #define LN_netscape_comment "Netscape Comment" | ||
443 | #define NID_netscape_comment 78 | ||
444 | #define OBJ_netscape_comment OBJ_netscape_cert_extension,13L | ||
445 | |||
446 | #define SN_netscape_cert_sequence "nsCertSequence" | ||
447 | #define LN_netscape_cert_sequence "Netscape Certificate Sequence" | ||
448 | #define NID_netscape_cert_sequence 79 | ||
449 | #define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L | ||
450 | |||
451 | #define SN_desx_cbc "DESX-CBC" | ||
452 | #define LN_desx_cbc "desx-cbc" | ||
453 | #define NID_desx_cbc 80 | ||
454 | |||
455 | #define SN_ld_ce "ld-ce" | ||
456 | #define NID_ld_ce 81 | ||
457 | #define OBJ_ld_ce 2L,5L,29L | ||
458 | |||
459 | #define SN_subject_key_identifier "subjectKeyIdentifier" | ||
460 | #define LN_subject_key_identifier "X509v3 Subject Key Identifier" | ||
461 | #define NID_subject_key_identifier 82 | ||
462 | #define OBJ_subject_key_identifier OBJ_ld_ce,14L | ||
463 | |||
464 | #define SN_key_usage "keyUsage" | ||
465 | #define LN_key_usage "X509v3 Key Usage" | ||
466 | #define NID_key_usage 83 | ||
467 | #define OBJ_key_usage OBJ_ld_ce,15L | ||
468 | |||
469 | #define SN_private_key_usage_period "privateKeyUsagePeriod" | ||
470 | #define LN_private_key_usage_period "X509v3 Private Key Usage Period" | ||
471 | #define NID_private_key_usage_period 84 | ||
472 | #define OBJ_private_key_usage_period OBJ_ld_ce,16L | ||
473 | |||
474 | #define SN_subject_alt_name "subjectAltName" | ||
475 | #define LN_subject_alt_name "X509v3 Subject Alternative Name" | ||
476 | #define NID_subject_alt_name 85 | ||
477 | #define OBJ_subject_alt_name OBJ_ld_ce,17L | ||
478 | |||
479 | #define SN_issuer_alt_name "issuerAltName" | ||
480 | #define LN_issuer_alt_name "X509v3 Issuer Alternative Name" | ||
481 | #define NID_issuer_alt_name 86 | ||
482 | #define OBJ_issuer_alt_name OBJ_ld_ce,18L | ||
483 | |||
484 | #define SN_basic_constraints "basicConstraints" | ||
485 | #define LN_basic_constraints "X509v3 Basic Constraints" | ||
486 | #define NID_basic_constraints 87 | ||
487 | #define OBJ_basic_constraints OBJ_ld_ce,19L | ||
488 | |||
489 | #define SN_crl_number "crlNumber" | ||
490 | #define LN_crl_number "X509v3 CRL Number" | ||
491 | #define NID_crl_number 88 | ||
492 | #define OBJ_crl_number OBJ_ld_ce,20L | ||
493 | |||
494 | #define SN_certificate_policies "certificatePolicies" | ||
495 | #define LN_certificate_policies "X509v3 Certificate Policies" | ||
496 | #define NID_certificate_policies 89 | ||
497 | #define OBJ_certificate_policies OBJ_ld_ce,32L | ||
498 | |||
499 | #define SN_authority_key_identifier "authorityKeyIdentifier" | ||
500 | #define LN_authority_key_identifier "X509v3 Authority Key Identifier" | ||
501 | #define NID_authority_key_identifier 90 | ||
502 | #define OBJ_authority_key_identifier OBJ_ld_ce,35L | ||
503 | |||
504 | #define SN_bf_cbc "BF-CBC" | ||
505 | #define LN_bf_cbc "bf-cbc" | ||
506 | #define NID_bf_cbc 91 | ||
507 | #define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L | ||
508 | |||
509 | #define SN_bf_ecb "BF-ECB" | ||
510 | #define LN_bf_ecb "bf-ecb" | ||
511 | #define NID_bf_ecb 92 | ||
512 | |||
513 | #define SN_bf_cfb64 "BF-CFB" | ||
514 | #define LN_bf_cfb64 "bf-cfb" | ||
515 | #define NID_bf_cfb64 93 | ||
516 | |||
517 | #define SN_bf_ofb64 "BF-OFB" | ||
518 | #define LN_bf_ofb64 "bf-ofb" | ||
519 | #define NID_bf_ofb64 94 | ||
520 | |||
521 | #define SN_mdc2 "MDC2" | ||
522 | #define LN_mdc2 "mdc2" | ||
523 | #define NID_mdc2 95 | ||
524 | #define OBJ_mdc2 2L,5L,8L,3L,101L | ||
525 | /* An alternative? 1L,3L,14L,3L,2L,19L */ | ||
526 | |||
527 | #define SN_mdc2WithRSA "RSA-MDC2" | ||
528 | #define LN_mdc2WithRSA "mdc2withRSA" | ||
529 | #define NID_mdc2WithRSA 96 | ||
530 | #define OBJ_mdc2WithRSA 2L,5L,8L,3L,100L | ||
531 | |||
532 | #define SN_rc4_40 "RC4-40" | ||
533 | #define LN_rc4_40 "rc4-40" | ||
534 | #define NID_rc4_40 97 | ||
535 | |||
536 | #define SN_rc2_40_cbc "RC2-40-CBC" | ||
537 | #define LN_rc2_40_cbc "rc2-40-cbc" | ||
538 | #define NID_rc2_40_cbc 98 | ||
539 | |||
540 | #define SN_givenName "G" | ||
541 | #define LN_givenName "givenName" | ||
542 | #define NID_givenName 99 | ||
543 | #define OBJ_givenName OBJ_X509,42L | ||
544 | |||
545 | #define SN_surname "S" | ||
546 | #define LN_surname "surname" | ||
547 | #define NID_surname 100 | ||
548 | #define OBJ_surname OBJ_X509,4L | ||
549 | |||
550 | #define SN_initials "I" | ||
551 | #define LN_initials "initials" | ||
552 | #define NID_initials 101 | ||
553 | #define OBJ_initials OBJ_X509,43L | ||
554 | |||
555 | #define SN_uniqueIdentifier "UID" | ||
556 | #define LN_uniqueIdentifier "uniqueIdentifier" | ||
557 | #define NID_uniqueIdentifier 102 | ||
558 | #define OBJ_uniqueIdentifier OBJ_X509,45L | ||
559 | |||
560 | #define SN_crl_distribution_points "crlDistributionPoints" | ||
561 | #define LN_crl_distribution_points "X509v3 CRL Distribution Points" | ||
562 | #define NID_crl_distribution_points 103 | ||
563 | #define OBJ_crl_distribution_points OBJ_ld_ce,31L | ||
564 | |||
565 | #define SN_md5WithRSA "RSA-NP-MD5" | ||
566 | #define LN_md5WithRSA "md5WithRSA" | ||
567 | #define NID_md5WithRSA 104 | ||
568 | #define OBJ_md5WithRSA OBJ_algorithm,3L | ||
569 | |||
570 | #define SN_serialNumber "SN" | ||
571 | #define LN_serialNumber "serialNumber" | ||
572 | #define NID_serialNumber 105 | ||
573 | #define OBJ_serialNumber OBJ_X509,5L | ||
574 | |||
575 | #define SN_title "T" | ||
576 | #define LN_title "title" | ||
577 | #define NID_title 106 | ||
578 | #define OBJ_title OBJ_X509,12L | ||
579 | |||
580 | #define SN_description "D" | ||
581 | #define LN_description "description" | ||
582 | #define NID_description 107 | ||
583 | #define OBJ_description OBJ_X509,13L | ||
584 | |||
585 | /* CAST5 is CAST-128, I'm just sticking with the documentation */ | ||
586 | #define SN_cast5_cbc "CAST5-CBC" | ||
587 | #define LN_cast5_cbc "cast5-cbc" | ||
588 | #define NID_cast5_cbc 108 | ||
589 | #define OBJ_cast5_cbc 1L,2L,840L,113533L,7L,66L,10L | ||
590 | |||
591 | #define SN_cast5_ecb "CAST5-ECB" | ||
592 | #define LN_cast5_ecb "cast5-ecb" | ||
593 | #define NID_cast5_ecb 109 | ||
594 | |||
595 | #define SN_cast5_cfb64 "CAST5-CFB" | ||
596 | #define LN_cast5_cfb64 "cast5-cfb" | ||
597 | #define NID_cast5_cfb64 110 | ||
598 | |||
599 | #define SN_cast5_ofb64 "CAST5-OFB" | ||
600 | #define LN_cast5_ofb64 "cast5-ofb" | ||
601 | #define NID_cast5_ofb64 111 | ||
602 | |||
603 | #define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" | ||
604 | #define NID_pbeWithMD5AndCast5_CBC 112 | ||
605 | #define OBJ_pbeWithMD5AndCast5_CBC 1L,2L,840L,113533L,7L,66L,12L | ||
606 | |||
607 | /* This is one sun will soon be using :-( | ||
608 | * id-dsa-with-sha1 ID ::= { | ||
609 | * iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 } | ||
610 | */ | ||
611 | #define SN_dsaWithSHA1 "DSA-SHA1" | ||
612 | #define LN_dsaWithSHA1 "dsaWithSHA1" | ||
613 | #define NID_dsaWithSHA1 113 | ||
614 | #define OBJ_dsaWithSHA1 1L,2L,840L,10040L,4L,3L | ||
615 | |||
616 | #define NID_md5_sha1 114 | ||
617 | #define SN_md5_sha1 "MD5-SHA1" | ||
618 | #define LN_md5_sha1 "md5-sha1" | ||
619 | |||
620 | #define SN_sha1WithRSA "RSA-SHA1-2" | ||
621 | #define LN_sha1WithRSA "sha1WithRSA" | ||
622 | #define NID_sha1WithRSA 115 | ||
623 | #define OBJ_sha1WithRSA OBJ_algorithm,29L | ||
624 | |||
625 | #define SN_dsa "DSA" | ||
626 | #define LN_dsa "dsaEncryption" | ||
627 | #define NID_dsa 116 | ||
628 | #define OBJ_dsa 1L,2L,840L,10040L,4L,1L | ||
629 | |||
630 | #define SN_ripemd160 "RIPEMD160" | ||
631 | #define LN_ripemd160 "ripemd160" | ||
632 | #define NID_ripemd160 117 | ||
633 | #define OBJ_ripemd160 1L,3L,36L,3L,2L,1L | ||
634 | |||
635 | /* The name should actually be rsaSignatureWithripemd160, but I'm going | ||
636 | * to continue using the convention I'm using with the other ciphers */ | ||
637 | #define SN_ripemd160WithRSA "RSA-RIPEMD160" | ||
638 | #define LN_ripemd160WithRSA "ripemd160WithRSA" | ||
639 | #define NID_ripemd160WithRSA 119 | ||
640 | #define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L | ||
641 | |||
642 | /* Taken from rfc2040 | ||
643 | * RC5_CBC_Parameters ::= SEQUENCE { | ||
644 | * version INTEGER (v1_0(16)), | ||
645 | * rounds INTEGER (8..127), | ||
646 | * blockSizeInBits INTEGER (64, 128), | ||
647 | * iv OCTET STRING OPTIONAL | ||
648 | * } | ||
649 | */ | ||
650 | #define SN_rc5_cbc "RC5-CBC" | ||
651 | #define LN_rc5_cbc "rc5-cbc" | ||
652 | #define NID_rc5_cbc 120 | ||
653 | #define OBJ_rc5_cbc OBJ_rsadsi,3L,8L | ||
654 | |||
655 | #define SN_rc5_ecb "RC5-ECB" | ||
656 | #define LN_rc5_ecb "rc5-ecb" | ||
657 | #define NID_rc5_ecb 121 | ||
658 | |||
659 | #define SN_rc5_cfb64 "RC5-CFB" | ||
660 | #define LN_rc5_cfb64 "rc5-cfb" | ||
661 | #define NID_rc5_cfb64 122 | ||
662 | |||
663 | #define SN_rc5_ofb64 "RC5-OFB" | ||
664 | #define LN_rc5_ofb64 "rc5-ofb" | ||
665 | #define NID_rc5_ofb64 123 | ||
666 | |||
667 | #define SN_rle_compression "RLE" | ||
668 | #define LN_rle_compression "run length compression" | ||
669 | #define NID_rle_compression 124 | ||
670 | #define OBJ_rle_compression 1L,1L,1L,1L,666L,1L | ||
671 | |||
672 | #define SN_zlib_compression "ZLIB" | ||
673 | #define LN_zlib_compression "zlib compression" | ||
674 | #define NID_zlib_compression 125 | ||
675 | #define OBJ_zlib_compression 1L,1L,1L,1L,666L,2L | ||
676 | |||
677 | #define SN_ext_key_usage "extendedKeyUsage" | ||
678 | #define LN_ext_key_usage "X509v3 Extended Key Usage" | ||
679 | #define NID_ext_key_usage 126 | ||
680 | #define OBJ_ext_key_usage OBJ_ld_ce,37 | ||
681 | |||
682 | #define SN_id_pkix "PKIX" | ||
683 | #define NID_id_pkix 127 | ||
684 | #define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L | ||
685 | |||
686 | #define SN_id_kp "id-kp" | ||
687 | #define NID_id_kp 128 | ||
688 | #define OBJ_id_kp OBJ_id_pkix,3L | ||
689 | |||
690 | /* PKIX extended key usage OIDs */ | ||
691 | |||
692 | #define SN_server_auth "serverAuth" | ||
693 | #define LN_server_auth "TLS Web Server Authentication" | ||
694 | #define NID_server_auth 129 | ||
695 | #define OBJ_server_auth OBJ_id_kp,1L | ||
696 | |||
697 | #define SN_client_auth "clientAuth" | ||
698 | #define LN_client_auth "TLS Web Client Authentication" | ||
699 | #define NID_client_auth 130 | ||
700 | #define OBJ_client_auth OBJ_id_kp,2L | ||
701 | |||
702 | #define SN_code_sign "codeSigning" | ||
703 | #define LN_code_sign "Code Signing" | ||
704 | #define NID_code_sign 131 | ||
705 | #define OBJ_code_sign OBJ_id_kp,3L | ||
706 | |||
707 | #define SN_email_protect "emailProtection" | ||
708 | #define LN_email_protect "E-mail Protection" | ||
709 | #define NID_email_protect 132 | ||
710 | #define OBJ_email_protect OBJ_id_kp,4L | ||
711 | |||
712 | #define SN_time_stamp "timeStamping" | ||
713 | #define LN_time_stamp "Time Stamping" | ||
714 | #define NID_time_stamp 133 | ||
715 | #define OBJ_time_stamp OBJ_id_kp,8L | ||
716 | |||
717 | /* Additional extended key usage OIDs: Microsoft */ | ||
718 | |||
719 | #define SN_ms_code_ind "msCodeInd" | ||
720 | #define LN_ms_code_ind "Microsoft Individual Code Signing" | ||
721 | #define NID_ms_code_ind 134 | ||
722 | #define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L | ||
723 | |||
724 | #define SN_ms_code_com "msCodeCom" | ||
725 | #define LN_ms_code_com "Microsoft Commercial Code Signing" | ||
726 | #define NID_ms_code_com 135 | ||
727 | #define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L | ||
728 | |||
729 | #define SN_ms_ctl_sign "msCTLSign" | ||
730 | #define LN_ms_ctl_sign "Microsoft Trust List Signing" | ||
731 | #define NID_ms_ctl_sign 136 | ||
732 | #define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L | ||
733 | |||
734 | #define SN_ms_sgc "msSGC" | ||
735 | #define LN_ms_sgc "Microsoft Server Gated Crypto" | ||
736 | #define NID_ms_sgc 137 | ||
737 | #define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L | ||
738 | |||
739 | #define SN_ms_efs "msEFS" | ||
740 | #define LN_ms_efs "Microsoft Encrypted File System" | ||
741 | #define NID_ms_efs 138 | ||
742 | #define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L | ||
743 | |||
744 | /* Additional usage: Netscape */ | ||
745 | |||
746 | #define SN_ns_sgc "nsSGC" | ||
747 | #define LN_ns_sgc "Netscape Server Gated Crypto" | ||
748 | #define NID_ns_sgc 139 | ||
749 | #define OBJ_ns_sgc OBJ_netscape,4L,1L | ||
750 | |||
751 | #define SN_delta_crl "deltaCRL" | ||
752 | #define LN_delta_crl "X509v3 Delta CRL Indicator" | ||
753 | #define NID_delta_crl 140 | ||
754 | #define OBJ_delta_crl OBJ_ld_ce,27L | ||
755 | |||
756 | #define SN_crl_reason "CRLReason" | ||
757 | #define LN_crl_reason "CRL Reason Code" | ||
758 | #define NID_crl_reason 141 | ||
759 | #define OBJ_crl_reason OBJ_ld_ce,21L | ||
760 | |||
761 | #define SN_invalidity_date "invalidityDate" | ||
762 | #define LN_invalidity_date "Invalidity Date" | ||
763 | #define NID_invalidity_date 142 | ||
764 | #define OBJ_invalidity_date OBJ_ld_ce,24L | ||
765 | |||
766 | #define SN_sxnet "SXNetID" | ||
767 | #define LN_sxnet "Strong Extranet ID" | ||
768 | #define NID_sxnet 143 | ||
769 | #define OBJ_sxnet 1L,3L,101L,1L,4L,1L | ||
770 | |||
771 | /* PKCS12 and related OBJECT IDENTIFIERS */ | ||
772 | |||
773 | #define OBJ_pkcs12 OBJ_pkcs,12L | ||
774 | #define OBJ_pkcs12_pbeids OBJ_pkcs12, 1 | ||
775 | |||
776 | #define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" | ||
777 | #define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" | ||
778 | #define NID_pbe_WithSHA1And128BitRC4 144 | ||
779 | #define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids, 1L | ||
780 | |||
781 | #define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" | ||
782 | #define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" | ||
783 | #define NID_pbe_WithSHA1And40BitRC4 145 | ||
784 | #define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids, 2L | ||
785 | |||
786 | #define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" | ||
787 | #define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" | ||
788 | #define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 | ||
789 | #define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 3L | ||
790 | |||
791 | #define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" | ||
792 | #define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" | ||
793 | #define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 | ||
794 | #define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 4L | ||
795 | |||
796 | #define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" | ||
797 | #define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" | ||
798 | #define NID_pbe_WithSHA1And128BitRC2_CBC 148 | ||
799 | #define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids, 5L | ||
800 | |||
801 | #define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" | ||
802 | #define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" | ||
803 | #define NID_pbe_WithSHA1And40BitRC2_CBC 149 | ||
804 | #define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids, 6L | ||
805 | |||
806 | #define OBJ_pkcs12_Version1 OBJ_pkcs12, 10L | ||
807 | |||
808 | #define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1, 1L | ||
809 | |||
810 | #define LN_keyBag "keyBag" | ||
811 | #define NID_keyBag 150 | ||
812 | #define OBJ_keyBag OBJ_pkcs12_BagIds, 1L | ||
813 | |||
814 | #define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" | ||
815 | #define NID_pkcs8ShroudedKeyBag 151 | ||
816 | #define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds, 2L | ||
817 | |||
818 | #define LN_certBag "certBag" | ||
819 | #define NID_certBag 152 | ||
820 | #define OBJ_certBag OBJ_pkcs12_BagIds, 3L | ||
821 | |||
822 | #define LN_crlBag "crlBag" | ||
823 | #define NID_crlBag 153 | ||
824 | #define OBJ_crlBag OBJ_pkcs12_BagIds, 4L | ||
825 | |||
826 | #define LN_secretBag "secretBag" | ||
827 | #define NID_secretBag 154 | ||
828 | #define OBJ_secretBag OBJ_pkcs12_BagIds, 5L | ||
829 | |||
830 | #define LN_safeContentsBag "safeContentsBag" | ||
831 | #define NID_safeContentsBag 155 | ||
832 | #define OBJ_safeContentsBag OBJ_pkcs12_BagIds, 6L | ||
833 | |||
834 | #define LN_friendlyName "friendlyName" | ||
835 | #define NID_friendlyName 156 | ||
836 | #define OBJ_friendlyName OBJ_pkcs9, 20L | ||
837 | |||
838 | #define LN_localKeyID "localKeyID" | ||
839 | #define NID_localKeyID 157 | ||
840 | #define OBJ_localKeyID OBJ_pkcs9, 21L | ||
841 | |||
842 | #define OBJ_certTypes OBJ_pkcs9, 22L | ||
843 | |||
844 | #define LN_x509Certificate "x509Certificate" | ||
845 | #define NID_x509Certificate 158 | ||
846 | #define OBJ_x509Certificate OBJ_certTypes, 1L | ||
847 | |||
848 | #define LN_sdsiCertificate "sdsiCertificate" | ||
849 | #define NID_sdsiCertificate 159 | ||
850 | #define OBJ_sdsiCertificate OBJ_certTypes, 2L | ||
851 | |||
852 | #define OBJ_crlTypes OBJ_pkcs9, 23L | ||
853 | |||
854 | #define LN_x509Crl "x509Crl" | ||
855 | #define NID_x509Crl 160 | ||
856 | #define OBJ_x509Crl OBJ_crlTypes, 1L | ||
857 | |||
858 | /* PKCS#5 v2 OIDs */ | ||
859 | |||
860 | #define LN_pbes2 "PBES2" | ||
861 | #define NID_pbes2 161 | ||
862 | #define OBJ_pbes2 OBJ_pkcs,5L,13L | ||
863 | |||
864 | #define LN_pbmac1 "PBMAC1" | ||
865 | #define NID_pbmac1 162 | ||
866 | #define OBJ_pbmac1 OBJ_pkcs,5L,14L | ||
867 | |||
868 | #define LN_hmacWithSHA1 "hmacWithSHA1" | ||
869 | #define NID_hmacWithSHA1 163 | ||
870 | #define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L | ||
871 | |||
872 | /* Policy Qualifier Ids */ | ||
873 | |||
874 | #define LN_id_qt_cps "Policy Qualifier CPS" | ||
875 | #define SN_id_qt_cps "id-qt-cps" | ||
876 | #define NID_id_qt_cps 164 | ||
877 | #define OBJ_id_qt_cps OBJ_id_pkix,2L,1L | ||
878 | |||
879 | #define LN_id_qt_unotice "Policy Qualifier User Notice" | ||
880 | #define SN_id_qt_unotice "id-qt-unotice" | ||
881 | #define NID_id_qt_unotice 165 | ||
882 | #define OBJ_id_qt_unotice OBJ_id_pkix,2L,2L | ||
883 | |||
884 | #define SN_rc2_64_cbc "RC2-64-CBC" | ||
885 | #define LN_rc2_64_cbc "rc2-64-cbc" | ||
886 | #define NID_rc2_64_cbc 166 | ||
887 | |||
888 | #define SN_SMIMECapabilities "SMIME-CAPS" | ||
889 | #define LN_SMIMECapabilities "S/MIME Capabilities" | ||
890 | #define NID_SMIMECapabilities 167 | ||
891 | #define OBJ_SMIMECapabilities OBJ_pkcs9,15L | ||
892 | |||
893 | #define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" | ||
894 | #define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" | ||
895 | #define NID_pbeWithMD2AndRC2_CBC 168 | ||
896 | #define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs,5L,4L | ||
897 | |||
898 | #define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" | ||
899 | #define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" | ||
900 | #define NID_pbeWithMD5AndRC2_CBC 169 | ||
901 | #define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs,5L,6L | ||
902 | |||
903 | #define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" | ||
904 | #define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" | ||
905 | #define NID_pbeWithSHA1AndDES_CBC 170 | ||
906 | #define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs,5L,10L | ||
907 | |||
908 | /* Extension request OIDs */ | ||
909 | |||
910 | #define LN_ms_ext_req "Microsoft Extension Request" | ||
911 | #define SN_ms_ext_req "msExtReq" | ||
912 | #define NID_ms_ext_req 171 | ||
913 | #define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L | ||
914 | |||
915 | #define LN_ext_req "Extension Request" | ||
916 | #define SN_ext_req "extReq" | ||
917 | #define NID_ext_req 172 | ||
918 | #define OBJ_ext_req OBJ_pkcs9,14L | ||
919 | |||
920 | #define SN_name "name" | ||
921 | #define LN_name "name" | ||
922 | #define NID_name 173 | ||
923 | #define OBJ_name OBJ_X509,41L | ||
924 | |||
925 | #define SN_dnQualifier "dnQualifier" | ||
926 | #define LN_dnQualifier "dnQualifier" | ||
927 | #define NID_dnQualifier 174 | ||
928 | #define OBJ_dnQualifier OBJ_X509,46L | ||
929 | |||
930 | #define SN_id_pe "id-pe" | ||
931 | #define NID_id_pe 175 | ||
932 | #define OBJ_id_pe OBJ_id_pkix,1L | ||
933 | |||
934 | #define SN_id_ad "id-ad" | ||
935 | #define NID_id_ad 176 | ||
936 | #define OBJ_id_ad OBJ_id_pkix,48L | ||
937 | |||
938 | #define SN_info_access "authorityInfoAccess" | ||
939 | #define LN_info_access "Authority Information Access" | ||
940 | #define NID_info_access 177 | ||
941 | #define OBJ_info_access OBJ_id_pe,1L | ||
942 | |||
943 | #define SN_ad_OCSP "OCSP" | ||
944 | #define LN_ad_OCSP "OCSP" | ||
945 | #define NID_ad_OCSP 178 | ||
946 | #define OBJ_ad_OCSP OBJ_id_ad,1L | ||
947 | |||
948 | #define SN_ad_ca_issuers "caIssuers" | ||
949 | #define LN_ad_ca_issuers "CA Issuers" | ||
950 | #define NID_ad_ca_issuers 179 | ||
951 | #define OBJ_ad_ca_issuers OBJ_id_ad,2L | ||
952 | |||
953 | #define SN_OCSP_sign "OCSPSigning" | ||
954 | #define LN_OCSP_sign "OCSP Signing" | ||
955 | #define NID_OCSP_sign 180 | ||
956 | #define OBJ_OCSP_sign OBJ_id_kp,9L | ||
957 | #endif /* USE_OBJ_MAC */ | ||
958 | |||
959 | #include <openssl/bio.h> | ||
960 | #include <openssl/asn1.h> | ||
961 | |||
962 | #define OBJ_NAME_TYPE_UNDEF 0x00 | ||
963 | #define OBJ_NAME_TYPE_MD_METH 0x01 | ||
964 | #define OBJ_NAME_TYPE_CIPHER_METH 0x02 | ||
965 | #define OBJ_NAME_TYPE_PKEY_METH 0x03 | ||
966 | #define OBJ_NAME_TYPE_COMP_METH 0x04 | ||
967 | #define OBJ_NAME_TYPE_NUM 0x05 | ||
968 | |||
969 | #define OBJ_NAME_ALIAS 0x8000 | ||
970 | |||
971 | |||
972 | #ifdef __cplusplus | ||
973 | extern "C" { | ||
974 | #endif | ||
975 | |||
976 | typedef struct obj_name_st | ||
977 | { | ||
978 | int type; | ||
979 | int alias; | ||
980 | const char *name; | ||
981 | const char *data; | ||
982 | } OBJ_NAME; | ||
983 | |||
984 | #define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) | ||
985 | |||
986 | |||
987 | int OBJ_NAME_init(void); | ||
988 | int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),int (*cmp_func)(const void *, const void *), | ||
989 | void (*free_func)(const char *, int, const char *)); | ||
990 | const char *OBJ_NAME_get(const char *name,int type); | ||
991 | int OBJ_NAME_add(const char *name,int type,const char *data); | ||
992 | int OBJ_NAME_remove(const char *name,int type); | ||
993 | void OBJ_NAME_cleanup(int type); /* -1 for everything */ | ||
994 | |||
995 | ASN1_OBJECT * OBJ_dup(ASN1_OBJECT *o); | ||
996 | ASN1_OBJECT * OBJ_nid2obj(int n); | ||
997 | const char * OBJ_nid2ln(int n); | ||
998 | const char * OBJ_nid2sn(int n); | ||
999 | int OBJ_obj2nid(ASN1_OBJECT *o); | ||
1000 | ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name); | ||
1001 | int OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *a, int no_name); | ||
1002 | int OBJ_txt2nid(char *s); | ||
1003 | int OBJ_ln2nid(const char *s); | ||
1004 | int OBJ_sn2nid(const char *s); | ||
1005 | int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b); | ||
1006 | char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)(const void *, const void *)); | ||
1007 | |||
1008 | void ERR_load_OBJ_strings(void ); | ||
1009 | |||
1010 | int OBJ_new_nid(int num); | ||
1011 | int OBJ_add_object(ASN1_OBJECT *obj); | ||
1012 | int OBJ_create(char *oid,char *sn,char *ln); | ||
1013 | void OBJ_cleanup(void ); | ||
1014 | int OBJ_create_objects(BIO *in); | ||
1015 | |||
1016 | /* BEGIN ERROR CODES */ | ||
1017 | /* The following lines are auto generated by the script mkerr.pl. Any changes | ||
1018 | * made after this point may be overwritten when the script is next run. | ||
1019 | */ | ||
1020 | |||
1021 | /* Error codes for the OBJ functions. */ | ||
1022 | |||
1023 | /* Function codes. */ | ||
1024 | #define OBJ_F_OBJ_CREATE 100 | ||
1025 | #define OBJ_F_OBJ_DUP 101 | ||
1026 | #define OBJ_F_OBJ_NID2LN 102 | ||
1027 | #define OBJ_F_OBJ_NID2OBJ 103 | ||
1028 | #define OBJ_F_OBJ_NID2SN 104 | ||
1029 | |||
1030 | /* Reason codes. */ | ||
1031 | #define OBJ_R_MALLOC_FAILURE 100 | ||
1032 | #define OBJ_R_UNKNOWN_NID 101 | ||
1033 | |||
1034 | #ifdef __cplusplus | ||
1035 | } | ||
1036 | #endif | ||
1037 | #endif | ||
1038 | |||
diff --git a/src/lib/libcrypto/objects/objects.pl b/src/lib/libcrypto/objects/objects.pl deleted file mode 100644 index c956bbb841..0000000000 --- a/src/lib/libcrypto/objects/objects.pl +++ /dev/null | |||
@@ -1,224 +0,0 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | |||
3 | open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]"; | ||
4 | $max_nid=0; | ||
5 | $o=0; | ||
6 | while(<NUMIN>) | ||
7 | { | ||
8 | chop; | ||
9 | $o++; | ||
10 | s/#.*$//; | ||
11 | next if /^\s*$/; | ||
12 | ($Cname,$mynum) = split; | ||
13 | if (defined($nidn{$mynum})) | ||
14 | { die "$ARGV[1]:$o:There's already an object with NID ",$mynum," on line ",$order{$mynum},"\n"; } | ||
15 | $nid{$Cname} = $mynum; | ||
16 | $nidn{$mynum} = $Cname; | ||
17 | $order{$mynum} = $o; | ||
18 | $max_nid = $mynum if $mynum > $max_nid; | ||
19 | } | ||
20 | close NUMIN; | ||
21 | |||
22 | open (IN,"$ARGV[0]") || die "Can't open input file $ARGV[0]"; | ||
23 | $Cname=""; | ||
24 | $o=0; | ||
25 | while (<IN>) | ||
26 | { | ||
27 | chop; | ||
28 | $o++; | ||
29 | if (/^!module\s+(.*)$/) | ||
30 | { | ||
31 | $module = $1."-"; | ||
32 | $module =~ s/\./_/g; | ||
33 | $module =~ s/-/_/g; | ||
34 | } | ||
35 | if (/^!global$/) | ||
36 | { $module = ""; } | ||
37 | if (/^!Cname\s+(.*)$/) | ||
38 | { $Cname = $1; } | ||
39 | if (/^!Alias\s+(.+?)\s+(.*)$/) | ||
40 | { | ||
41 | $Cname = $module.$1; | ||
42 | $myoid = $2; | ||
43 | $myoid = &process_oid($myoid); | ||
44 | $Cname =~ s/-/_/g; | ||
45 | $ordern{$o} = $Cname; | ||
46 | $order{$Cname} = $o; | ||
47 | $obj{$Cname} = $myoid; | ||
48 | $_ = ""; | ||
49 | $Cname = ""; | ||
50 | } | ||
51 | s/!.*$//; | ||
52 | s/#.*$//; | ||
53 | next if /^\s*$/; | ||
54 | ($myoid,$mysn,$myln) = split ':'; | ||
55 | $mysn =~ s/^\s*//; | ||
56 | $mysn =~ s/\s*$//; | ||
57 | $myln =~ s/^\s*//; | ||
58 | $myln =~ s/\s*$//; | ||
59 | $myoid =~ s/^\s*//; | ||
60 | $myoid =~ s/\s*$//; | ||
61 | if ($myoid ne "") | ||
62 | { | ||
63 | $myoid = &process_oid($myoid); | ||
64 | } | ||
65 | |||
66 | if ($Cname eq "" && !($myln =~ / /)) | ||
67 | { | ||
68 | $Cname = $myln; | ||
69 | $Cname =~ s/\./_/g; | ||
70 | $Cname =~ s/-/_/g; | ||
71 | if ($Cname ne "" && defined($ln{$module.$Cname})) | ||
72 | { die "objects.txt:$o:There's already an object with long name ",$ln{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
73 | } | ||
74 | if ($Cname eq "") | ||
75 | { | ||
76 | $Cname = $mysn; | ||
77 | $Cname =~ s/-/_/g; | ||
78 | if ($Cname ne "" && defined($sn{$module.$Cname})) | ||
79 | { die "objects.txt:$o:There's already an object with short name ",$sn{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
80 | } | ||
81 | if ($Cname eq "") | ||
82 | { | ||
83 | $Cname = $myln; | ||
84 | $Cname =~ s/-/_/g; | ||
85 | $Cname =~ s/\./_/g; | ||
86 | $Cname =~ s/ /_/g; | ||
87 | if ($Cname ne "" && defined($ln{$module.$Cname})) | ||
88 | { die "objects.txt:$o:There's already an object with long name ",$ln{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
89 | } | ||
90 | $Cname =~ s/\./_/g; | ||
91 | $Cname =~ s/-/_/g; | ||
92 | $Cname = $module.$Cname; | ||
93 | $ordern{$o} = $Cname; | ||
94 | $order{$Cname} = $o; | ||
95 | $sn{$Cname} = $mysn; | ||
96 | $ln{$Cname} = $myln; | ||
97 | $obj{$Cname} = $myoid; | ||
98 | if (!defined($nid{$Cname})) | ||
99 | { | ||
100 | $max_nid++; | ||
101 | $nid{$Cname} = $max_nid; | ||
102 | $nidn{$max_nid} = $Cname; | ||
103 | } | ||
104 | $Cname=""; | ||
105 | } | ||
106 | close IN; | ||
107 | |||
108 | open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; | ||
109 | foreach (sort { $a <=> $b } keys %nidn) | ||
110 | { | ||
111 | print NUMOUT $nidn{$_},"\t\t",$_,"\n"; | ||
112 | } | ||
113 | close NUMOUT; | ||
114 | |||
115 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; | ||
116 | print OUT <<'EOF'; | ||
117 | /* lib/obj/obj_mac.h */ | ||
118 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
119 | * All rights reserved. | ||
120 | * | ||
121 | * This package is an SSL implementation written | ||
122 | * by Eric Young (eay@cryptsoft.com). | ||
123 | * The implementation was written so as to conform with Netscapes SSL. | ||
124 | * | ||
125 | * This library is free for commercial and non-commercial use as long as | ||
126 | * the following conditions are aheared to. The following conditions | ||
127 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
128 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
129 | * included with this distribution is covered by the same copyright terms | ||
130 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
131 | * | ||
132 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
133 | * the code are not to be removed. | ||
134 | * If this package is used in a product, Eric Young should be given attribution | ||
135 | * as the author of the parts of the library used. | ||
136 | * This can be in the form of a textual message at program startup or | ||
137 | * in documentation (online or textual) provided with the package. | ||
138 | * | ||
139 | * Redistribution and use in source and binary forms, with or without | ||
140 | * modification, are permitted provided that the following conditions | ||
141 | * are met: | ||
142 | * 1. Redistributions of source code must retain the copyright | ||
143 | * notice, this list of conditions and the following disclaimer. | ||
144 | * 2. Redistributions in binary form must reproduce the above copyright | ||
145 | * notice, this list of conditions and the following disclaimer in the | ||
146 | * documentation and/or other materials provided with the distribution. | ||
147 | * 3. All advertising materials mentioning features or use of this software | ||
148 | * must display the following acknowledgement: | ||
149 | * "This product includes cryptographic software written by | ||
150 | * Eric Young (eay@cryptsoft.com)" | ||
151 | * The word 'cryptographic' can be left out if the rouines from the library | ||
152 | * being used are not cryptographic related :-). | ||
153 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
154 | * the apps directory (application code) you must include an acknowledgement: | ||
155 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
156 | * | ||
157 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
158 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
159 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
160 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
161 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
162 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
163 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
164 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
165 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
166 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
167 | * SUCH DAMAGE. | ||
168 | * | ||
169 | * The licence and distribution terms for any publically available version or | ||
170 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
171 | * copied and put under another distribution licence | ||
172 | * [including the GNU Public Licence.] | ||
173 | */ | ||
174 | |||
175 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
176 | * following command: | ||
177 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
178 | */ | ||
179 | |||
180 | #define SN_undef "UNDEF" | ||
181 | #define LN_undef "undefined" | ||
182 | #define NID_undef 0 | ||
183 | #define OBJ_undef 0L | ||
184 | |||
185 | EOF | ||
186 | |||
187 | foreach (sort { $a <=> $b } keys %ordern) | ||
188 | { | ||
189 | $Cname=$ordern{$_}; | ||
190 | print OUT "#define SN_",$Cname,"\t\t\"",$sn{$Cname},"\"\n" if $sn{$Cname} ne ""; | ||
191 | print OUT "#define LN_",$Cname,"\t\t\"",$ln{$Cname},"\"\n" if $ln{$Cname} ne ""; | ||
192 | print OUT "#define NID_",$Cname,"\t\t",$nid{$Cname},"\n" if $nid{$Cname} ne ""; | ||
193 | print OUT "#define OBJ_",$Cname,"\t\t",$obj{$Cname},"\n" if $obj{$Cname} ne ""; | ||
194 | print OUT "\n"; | ||
195 | } | ||
196 | |||
197 | close OUT; | ||
198 | |||
199 | sub process_oid | ||
200 | { | ||
201 | local($oid)=@_; | ||
202 | local(@a,$oid_pref); | ||
203 | |||
204 | @a = split(/\s+/,$myoid); | ||
205 | $pref_oid = ""; | ||
206 | $pref_sep = ""; | ||
207 | if (!($a[0] =~ /^[0-9]+$/)) | ||
208 | { | ||
209 | $a[0] =~ s/-/_/g; | ||
210 | $pref_oid = "OBJ_" . $a[0]; | ||
211 | $pref_sep = ","; | ||
212 | shift @a; | ||
213 | } | ||
214 | $oids = join('L,',@a) . "L"; | ||
215 | if ($oids ne "L") | ||
216 | { | ||
217 | $oids = $pref_oid . $pref_sep . $oids; | ||
218 | } | ||
219 | else | ||
220 | { | ||
221 | $oids = $pref_oid; | ||
222 | } | ||
223 | return($oids); | ||
224 | } | ||
diff --git a/src/lib/libcrypto/objects/objects.txt b/src/lib/libcrypto/objects/objects.txt deleted file mode 100644 index 3d443cf884..0000000000 --- a/src/lib/libcrypto/objects/objects.txt +++ /dev/null | |||
@@ -1,593 +0,0 @@ | |||
1 | 1 : ISO : iso | ||
2 | |||
3 | iso 2 : member-body : ISO Member Body | ||
4 | |||
5 | member-body 840 : ISO-US : ISO US Member Body | ||
6 | ISO-US 10040 : X9-57 : X9.57 | ||
7 | X9-57 4 : X9cm : X9.57 CM ? | ||
8 | |||
9 | !Cname dsa | ||
10 | X9cm 1 : DSA : dsaEncryption | ||
11 | X9cm 3 : DSA-SHA1 : dsaWithSHA1 | ||
12 | |||
13 | ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc | ||
14 | : CAST5-ECB : cast5-ecb | ||
15 | !Cname cast5-cfb64 | ||
16 | : CAST5-CFB : cast5-cfb | ||
17 | !Cname cast5-ofb64 | ||
18 | : CAST5-OFB : cast5-ofb | ||
19 | !Cname pbeWithMD5AndCast5-CBC | ||
20 | ISO-US 113533 7 66 12 : : pbeWithMD5AndCast5CBC | ||
21 | |||
22 | ISO-US 113549 : rsadsi : RSA Data Security, Inc. | ||
23 | |||
24 | rsadsi 1 : pkcs : RSA Data Security, Inc. PKCS | ||
25 | |||
26 | pkcs 1 : pkcs1 | ||
27 | pkcs1 1 : : rsaEncryption | ||
28 | pkcs1 2 : RSA-MD2 : md2WithRSAEncryption | ||
29 | pkcs1 4 : RSA-MD5 : md5WithRSAEncryption | ||
30 | pkcs1 5 : RSA-SHA1 : sha1WithRSAEncryption | ||
31 | |||
32 | pkcs 3 : pkcs3 | ||
33 | pkcs3 1 : : dhKeyAgreement | ||
34 | |||
35 | pkcs 5 : pkcs5 | ||
36 | pkcs5 1 : PBE-MD2-DES : pbeWithMD2AndDES-CBC | ||
37 | pkcs5 3 : PBE-MD5-DES : pbeWithMD5AndDES-CBC | ||
38 | pkcs5 4 : PBE-MD2-RC2-64 : pbeWithMD2AndRC2-CBC | ||
39 | pkcs5 6 : PBE-MD5-RC2-64 : pbeWithMD5AndRC2-CBC | ||
40 | pkcs5 10 : PBE-SHA1-DES : pbeWithSHA1AndDES-CBC | ||
41 | pkcs5 11 : PBE-SHA1-RC2-64 : pbeWithSHA1AndRC2-CBC | ||
42 | !Cname id_pbkdf2 | ||
43 | pkcs5 12 : : PBKDF2 | ||
44 | !Cname pbes2 | ||
45 | pkcs5 13 : : PBES2 | ||
46 | !Cname pbmac1 | ||
47 | pkcs5 14 : : PBMAC1 | ||
48 | |||
49 | pkcs 7 : pkcs7 | ||
50 | pkcs7 1 : : pkcs7-data | ||
51 | !Cname pkcs7-signed | ||
52 | pkcs7 2 : : pkcs7-signedData | ||
53 | !Cname pkcs7-enveloped | ||
54 | pkcs7 3 : : pkcs7-envelopedData | ||
55 | !Cname pkcs7-signedAndEnveloped | ||
56 | pkcs7 4 : : pkcs7-signedAndEnvelopedData | ||
57 | !Cname pkcs7-digest | ||
58 | pkcs7 5 : : pkcs7-digestData | ||
59 | !Cname pkcs7-encrypted | ||
60 | pkcs7 6 : : pkcs7-encryptedData | ||
61 | |||
62 | pkcs 9 : pkcs9 | ||
63 | !module pkcs9 | ||
64 | pkcs9 1 : Email : emailAddress | ||
65 | pkcs9 2 : : unstructuredName | ||
66 | pkcs9 3 : : contentType | ||
67 | pkcs9 4 : : messageDigest | ||
68 | pkcs9 5 : : signingTime | ||
69 | pkcs9 6 : : countersignature | ||
70 | pkcs9 7 : : challengePassword | ||
71 | pkcs9 8 : : unstructuredAddress | ||
72 | !Cname extCertAttributes | ||
73 | pkcs9 9 : : extendedCertificateAttributes | ||
74 | !global | ||
75 | |||
76 | !Cname ext-req | ||
77 | pkcs9 14 : extReq : Extension Request | ||
78 | |||
79 | !Cname SMIMECapabilities | ||
80 | pkcs9 15 : SMIME-CAPS : S/MIME Capabilities | ||
81 | |||
82 | # S/MIME | ||
83 | !Cname SMIME | ||
84 | pkcs9 16 : SMIME : S/MIME | ||
85 | SMIME 0 : id-smime-mod | ||
86 | SMIME 1 : id-smime-ct | ||
87 | SMIME 2 : id-smime-aa | ||
88 | SMIME 3 : id-smime-alg | ||
89 | SMIME 4 : id-smime-cd | ||
90 | SMIME 5 : id-smime-spq | ||
91 | SMIME 6 : id-smime-cti | ||
92 | |||
93 | # S/MIME Modules | ||
94 | id-smime-mod 1 : id-smime-mod-cms | ||
95 | id-smime-mod 2 : id-smime-mod-ess | ||
96 | id-smime-mod 3 : id-smime-mod-oid | ||
97 | id-smime-mod 4 : id-smime-mod-msg-v3 | ||
98 | id-smime-mod 5 : id-smime-mod-ets-eSignature-88 | ||
99 | id-smime-mod 6 : id-smime-mod-ets-eSignature-97 | ||
100 | id-smime-mod 7 : id-smime-mod-ets-eSigPolicy-88 | ||
101 | id-smime-mod 8 : id-smime-mod-ets-eSigPolicy-97 | ||
102 | |||
103 | # S/MIME Content Types | ||
104 | id-smime-ct 1 : id-smime-ct-receipt | ||
105 | id-smime-ct 2 : id-smime-ct-authData | ||
106 | id-smime-ct 3 : id-smime-ct-publishCert | ||
107 | id-smime-ct 4 : id-smime-ct-TSTInfo | ||
108 | id-smime-ct 5 : id-smime-ct-TDTInfo | ||
109 | id-smime-ct 6 : id-smime-ct-contentInfo | ||
110 | id-smime-ct 7 : id-smime-ct-DVCSRequestData | ||
111 | id-smime-ct 8 : id-smime-ct-DVCSResponseData | ||
112 | |||
113 | # S/MIME Attributes | ||
114 | id-smime-aa 1 : id-smime-aa-receiptRequest | ||
115 | id-smime-aa 2 : id-smime-aa-securityLabel | ||
116 | id-smime-aa 3 : id-smime-aa-mlExpandHistory | ||
117 | id-smime-aa 4 : id-smime-aa-contentHint | ||
118 | id-smime-aa 5 : id-smime-aa-msgSigDigest | ||
119 | # obsolete | ||
120 | id-smime-aa 6 : id-smime-aa-encapContentType | ||
121 | id-smime-aa 7 : id-smime-aa-contentIdentifier | ||
122 | # obsolete | ||
123 | id-smime-aa 8 : id-smime-aa-macValue | ||
124 | id-smime-aa 9 : id-smime-aa-equivalentLabels | ||
125 | id-smime-aa 10 : id-smime-aa-contentReference | ||
126 | id-smime-aa 11 : id-smime-aa-encrypKeyPref | ||
127 | id-smime-aa 12 : id-smime-aa-signingCertificate | ||
128 | id-smime-aa 13 : id-smime-aa-smimeEncryptCerts | ||
129 | id-smime-aa 14 : id-smime-aa-timeStampToken | ||
130 | id-smime-aa 15 : id-smime-aa-ets-sigPolicyId | ||
131 | id-smime-aa 16 : id-smime-aa-ets-commitmentType | ||
132 | id-smime-aa 17 : id-smime-aa-ets-signerLocation | ||
133 | id-smime-aa 18 : id-smime-aa-ets-signerAttr | ||
134 | id-smime-aa 19 : id-smime-aa-ets-otherSigCert | ||
135 | id-smime-aa 20 : id-smime-aa-ets-contentTimestamp | ||
136 | id-smime-aa 21 : id-smime-aa-ets-CertificateRefs | ||
137 | id-smime-aa 22 : id-smime-aa-ets-RevocationRefs | ||
138 | id-smime-aa 23 : id-smime-aa-ets-certValues | ||
139 | id-smime-aa 24 : id-smime-aa-ets-revocationValues | ||
140 | id-smime-aa 25 : id-smime-aa-ets-escTimeStamp | ||
141 | id-smime-aa 26 : id-smime-aa-ets-certCRLTimestamp | ||
142 | id-smime-aa 27 : id-smime-aa-ets-archiveTimeStamp | ||
143 | id-smime-aa 28 : id-smime-aa-signatureType | ||
144 | id-smime-aa 29 : id-smime-aa-dvcs-dvc | ||
145 | |||
146 | # S/MIME Algorithm Identifiers | ||
147 | # obsolete | ||
148 | id-smime-alg 1 : id-smime-alg-ESDHwith3DES | ||
149 | # obsolete | ||
150 | id-smime-alg 2 : id-smime-alg-ESDHwithRC2 | ||
151 | # obsolete | ||
152 | id-smime-alg 3 : id-smime-alg-3DESwrap | ||
153 | # obsolete | ||
154 | id-smime-alg 4 : id-smime-alg-RC2wrap | ||
155 | id-smime-alg 5 : id-smime-alg-ESDH | ||
156 | id-smime-alg 6 : id-smime-alg-CMS3DESwrap | ||
157 | id-smime-alg 7 : id-smime-alg-CMSRC2wrap | ||
158 | |||
159 | # S/MIME Certificate Distribution | ||
160 | id-smime-cd 1 : id-smime-cd-ldap | ||
161 | |||
162 | # S/MIME Signature Policy Qualifier | ||
163 | id-smime-spq 1 : id-smime-spq-ets-sqt-uri | ||
164 | id-smime-spq 2 : id-smime-spq-ets-sqt-unotice | ||
165 | |||
166 | # S/MIME Commitment Type Identifier | ||
167 | id-smime-cti 1 : id-smime-cti-ets-proofOfOrigin | ||
168 | id-smime-cti 2 : id-smime-cti-ets-proofOfReceipt | ||
169 | id-smime-cti 3 : id-smime-cti-ets-proofOfDelivery | ||
170 | id-smime-cti 4 : id-smime-cti-ets-proofOfSender | ||
171 | id-smime-cti 5 : id-smime-cti-ets-proofOfApproval | ||
172 | id-smime-cti 6 : id-smime-cti-ets-proofOfCreation | ||
173 | |||
174 | pkcs9 20 : : friendlyName | ||
175 | pkcs9 21 : : localKeyID | ||
176 | !Alias certTypes pkcs9 22 | ||
177 | certTypes 1 : : x509Certificate | ||
178 | certTypes 2 : : sdsiCertificate | ||
179 | !Alias crlTypes pkcs9 23 | ||
180 | crlTypes 1 : : x509Crl | ||
181 | |||
182 | !Alias pkcs12 pkcs 12 | ||
183 | !Alias pkcs12-pbeids pkcs12 1 | ||
184 | |||
185 | !Cname pbe-WithSHA1And128BitRC4 | ||
186 | pkcs12-pbeids 1 : PBE-SHA1-RC4-128 : pbeWithSHA1And128BitRC4 | ||
187 | !Cname pbe-WithSHA1And40BitRC4 | ||
188 | pkcs12-pbeids 2 : PBE-SHA1-RC4-40 : pbeWithSHA1And40BitRC4 | ||
189 | !Cname pbe-WithSHA1And3_Key_TripleDES-CBC | ||
190 | pkcs12-pbeids 3 : PBE-SHA1-3DES : pbeWithSHA1And3-KeyTripleDES-CBC | ||
191 | !Cname pbe-WithSHA1And2_Key_TripleDES-CBC | ||
192 | pkcs12-pbeids 4 : PBE-SHA1-2DES : pbeWithSHA1And2-KeyTripleDES-CBC | ||
193 | !Cname pbe-WithSHA1And128BitRC2-CBC | ||
194 | pkcs12-pbeids 5 : PBE-SHA1-RC2-128 : pbeWithSHA1And128BitRC2-CBC | ||
195 | !Cname pbe-WithSHA1And40BitRC2-CBC | ||
196 | pkcs12-pbeids 6 : PBE-SHA1-RC2-40 : pbeWithSHA1And40BitRC2-CBC | ||
197 | |||
198 | !Alias pkcs12-Version1 pkcs12 10 | ||
199 | !Alias pkcs12-BagIds pkcs12-Version1 1 | ||
200 | pkcs12-BagIds 1 : : keyBag | ||
201 | pkcs12-BagIds 2 : : pkcs8ShroudedKeyBag | ||
202 | pkcs12-BagIds 3 : : certBag | ||
203 | pkcs12-BagIds 4 : : crlBag | ||
204 | pkcs12-BagIds 5 : : secretBag | ||
205 | pkcs12-BagIds 6 : : safeContentsBag | ||
206 | |||
207 | rsadsi 2 2 : MD2 : md2 | ||
208 | rsadsi 2 4 : MD4 : md4 | ||
209 | rsadsi 2 5 : MD5 : md5 | ||
210 | : MD5-SHA1 : md5-sha1 | ||
211 | rsadsi 2 7 : : hmacWithSHA1 | ||
212 | rsadsi 3 2 : RC2-CBC : rc2-cbc | ||
213 | : RC2-ECB : rc2-ecb | ||
214 | !Cname rc2-cfb64 | ||
215 | : RC2-CFB : rc2-cfb | ||
216 | !Cname rc2-ofb64 | ||
217 | : RC2-OFB : rc2-ofb | ||
218 | : RC2-40-CBC : rc2-40-cbc | ||
219 | : RC2-64-CBC : rc2-64-cbc | ||
220 | rsadsi 3 4 : RC4 : rc4 | ||
221 | : RC4-40 : rc4-40 | ||
222 | rsadsi 3 7 : DES-EDE3-CBC : des-ede3-cbc | ||
223 | rsadsi 3 8 : RC5-CBC : rc5-cbc | ||
224 | : RC5-ECB : rc5-ecb | ||
225 | !Cname rc5-cfb64 | ||
226 | : RC5-CFB : rc5-cfb | ||
227 | !Cname rc5-ofb64 | ||
228 | : RC5-OFB : rc5-ofb | ||
229 | |||
230 | !Cname ms-ext-req | ||
231 | 1 3 6 1 4 1 311 2 1 14 : msExtReq : Microsoft Extension Request | ||
232 | !Cname ms-code-ind | ||
233 | 1 3 6 1 4 1 311 2 1 21 : msCodeInd : Microsoft Individual Code Signing | ||
234 | !Cname ms-code-com | ||
235 | 1 3 6 1 4 1 311 2 1 22 : msCodeCom : Microsoft Commercial Code Signing | ||
236 | !Cname ms-ctl-sign | ||
237 | 1 3 6 1 4 1 311 10 3 1 : msCTLSign : Microsoft Trust List Signing | ||
238 | !Cname ms-sgc | ||
239 | 1 3 6 1 4 1 311 10 3 3 : msSGC : Microsoft Server Gated Crypto | ||
240 | !Cname ms-efs | ||
241 | 1 3 6 1 4 1 311 10 3 4 : msEFS : Microsoft Encrypted File System | ||
242 | |||
243 | 1 3 6 1 4 1 188 7 1 1 2 : IDEA-CBC : idea-cbc | ||
244 | : IDEA-ECB : idea-ecb | ||
245 | !Cname idea-cfb64 | ||
246 | : IDEA-CFB : idea-cfb | ||
247 | !Cname idea-ofb64 | ||
248 | : IDEA-OFB : idea-ofb | ||
249 | |||
250 | 1 3 6 1 4 1 3029 1 2 : BF-CBC : bf-cbc | ||
251 | : BF-ECB : bf-ecb | ||
252 | !Cname bf-cfb64 | ||
253 | : BF-CFB : bf-cfb | ||
254 | !Cname bf-ofb64 | ||
255 | : BF-OFB : bf-ofb | ||
256 | |||
257 | !Cname id-pkix | ||
258 | 1 3 6 1 5 5 7 : PKIX | ||
259 | |||
260 | # PKIX Arcs | ||
261 | id-pkix 0 : id-pkix-mod | ||
262 | id-pkix 1 : id-pe | ||
263 | id-pkix 2 : id-qt | ||
264 | id-pkix 3 : id-kp | ||
265 | id-pkix 4 : id-it | ||
266 | id-pkix 5 : id-pkip | ||
267 | id-pkix 6 : id-alg | ||
268 | id-pkix 7 : id-cmc | ||
269 | id-pkix 8 : id-on | ||
270 | id-pkix 9 : id-pda | ||
271 | id-pkix 10 : id-aca | ||
272 | id-pkix 11 : id-qcs | ||
273 | id-pkix 12 : id-cct | ||
274 | id-pkix 48 : id-ad | ||
275 | |||
276 | # PKIX Modules | ||
277 | id-pkix-mod 1 : id-pkix1-explicit-88 | ||
278 | id-pkix-mod 2 : id-pkix1-implicit-88 | ||
279 | id-pkix-mod 3 : id-pkix1-explicit-93 | ||
280 | id-pkix-mod 4 : id-pkix1-implicit-93 | ||
281 | id-pkix-mod 5 : id-mod-crmf | ||
282 | id-pkix-mod 6 : id-mod-cmc | ||
283 | id-pkix-mod 7 : id-mod-kea-profile-88 | ||
284 | id-pkix-mod 8 : id-mod-kea-profile-93 | ||
285 | id-pkix-mod 9 : id-mod-cmp | ||
286 | id-pkix-mod 10 : id-mod-qualified-cert-88 | ||
287 | id-pkix-mod 11 : id-mod-qualified-cert-93 | ||
288 | id-pkix-mod 12 : id-mod-attribute-cert | ||
289 | id-pkix-mod 13 : id-mod-timestamp-protocol | ||
290 | id-pkix-mod 14 : id-mod-ocsp | ||
291 | id-pkix-mod 15 : id-mod-dvcs | ||
292 | id-pkix-mod 16 : id-mod-cmp2000 | ||
293 | |||
294 | # PKIX Private Extensions | ||
295 | !Cname info-access | ||
296 | id-pe 1 : authorityInfoAccess : Authority Information Access | ||
297 | id-pe 2 : biometricInfo : Biometric Info | ||
298 | id-pe 3 : qcStatements | ||
299 | id-pe 4 : ac-auditEntity | ||
300 | id-pe 5 : ac-targeting | ||
301 | id-pe 6 : aaControls | ||
302 | id-pe 7 : sbqp-ipAddrBlock | ||
303 | id-pe 8 : sbqp-autonomousSysNum | ||
304 | id-pe 9 : sbqp-routerIdentifier | ||
305 | |||
306 | # PKIX policyQualifiers for Internet policy qualifiers | ||
307 | id-qt 1 : id-qt-cps : Policy Qualifier CPS | ||
308 | id-qt 2 : id-qt-unotice : Policy Qualifier User Notice | ||
309 | id-qt 3 : textNotice | ||
310 | |||
311 | # PKIX key purpose identifiers | ||
312 | !Cname server-auth | ||
313 | id-kp 1 : serverAuth : TLS Web Server Authentication | ||
314 | !Cname client-auth | ||
315 | id-kp 2 : clientAuth : TLS Web Client Authentication | ||
316 | !Cname code-sign | ||
317 | id-kp 3 : codeSigning : Code Signing | ||
318 | !Cname email-protect | ||
319 | id-kp 4 : emailProtection : E-mail Protection | ||
320 | id-kp 5 : ipsecEndSystem : IPSec End System | ||
321 | id-kp 6 : ipsecTunnel : IPSec Tunnel | ||
322 | id-kp 7 : ipsecUser : IPSec User | ||
323 | !Cname time-stamp | ||
324 | id-kp 8 : timeStamping : Time Stamping | ||
325 | # From OCSP spec RFC2560 | ||
326 | !Cname OCSP-sign | ||
327 | id-kp 9 : OCSPSigning : OCSP Signing | ||
328 | id-kp 10 : DVCS : dvcs | ||
329 | |||
330 | # CMP information types | ||
331 | id-it 1 : id-it-caProtEncCert | ||
332 | id-it 2 : id-it-signKeyPairTypes | ||
333 | id-it 3 : id-it-encKeyPairTypes | ||
334 | id-it 4 : id-it-preferredSymmAlg | ||
335 | id-it 5 : id-it-caKeyUpdateInfo | ||
336 | id-it 6 : id-it-currentCRL | ||
337 | id-it 7 : id-it-unsupportedOIDs | ||
338 | # obsolete | ||
339 | id-it 8 : id-it-subscriptionRequest | ||
340 | # obsolete | ||
341 | id-it 9 : id-it-subscriptionResponse | ||
342 | id-it 10 : id-it-keyPairParamReq | ||
343 | id-it 11 : id-it-keyPairParamRep | ||
344 | id-it 12 : id-it-revPassphrase | ||
345 | id-it 13 : id-it-implicitConfirm | ||
346 | id-it 14 : id-it-confirmWaitTime | ||
347 | id-it 15 : id-it-origPKIMessage | ||
348 | |||
349 | # CRMF registration | ||
350 | id-pkip 1 : id-regCtrl | ||
351 | id-pkip 2 : id-regInfo | ||
352 | |||
353 | # CRMF registration controls | ||
354 | id-regCtrl 1 : id-regCtrl-regToken | ||
355 | id-regCtrl 2 : id-regCtrl-authenticator | ||
356 | id-regCtrl 3 : id-regCtrl-pkiPublicationInfo | ||
357 | id-regCtrl 4 : id-regCtrl-pkiArchiveOptions | ||
358 | id-regCtrl 5 : id-regCtrl-oldCertID | ||
359 | id-regCtrl 6 : id-regCtrl-protocolEncrKey | ||
360 | |||
361 | # CRMF registration information | ||
362 | id-regInfo 1 : id-regInfo-utf8Pairs | ||
363 | id-regInfo 2 : id-regInfo-certReq | ||
364 | |||
365 | # algorithms | ||
366 | id-alg 1 : id-alg-des40 | ||
367 | id-alg 2 : id-alg-noSignature | ||
368 | id-alg 3 : id-alg-dh-sig-hmac-sha1 | ||
369 | id-alg 4 : id-alg-dh-pop | ||
370 | |||
371 | # CMC controls | ||
372 | id-cmc 1 : id-cmc-statusInfo | ||
373 | id-cmc 2 : id-cmc-identification | ||
374 | id-cmc 3 : id-cmc-identityProof | ||
375 | id-cmc 4 : id-cmc-dataReturn | ||
376 | id-cmc 5 : id-cmc-transactionId | ||
377 | id-cmc 6 : id-cmc-senderNonce | ||
378 | id-cmc 7 : id-cmc-recipientNonce | ||
379 | id-cmc 8 : id-cmc-addExtensions | ||
380 | id-cmc 9 : id-cmc-encryptedPOP | ||
381 | id-cmc 10 : id-cmc-decryptedPOP | ||
382 | id-cmc 11 : id-cmc-lraPOPWitness | ||
383 | id-cmc 15 : id-cmc-getCert | ||
384 | id-cmc 16 : id-cmc-getCRL | ||
385 | id-cmc 17 : id-cmc-revokeRequest | ||
386 | id-cmc 18 : id-cmc-regInfo | ||
387 | id-cmc 19 : id-cmc-responseInfo | ||
388 | id-cmc 21 : id-cmc-queryPending | ||
389 | id-cmc 22 : id-cmc-popLinkRandom | ||
390 | id-cmc 23 : id-cmc-popLinkWitness | ||
391 | id-cmc 24 : id-cmc-confirmCertAcceptance | ||
392 | |||
393 | # other names | ||
394 | id-on 1 : id-on-personalData | ||
395 | |||
396 | # personal data attributes | ||
397 | id-pda 1 : id-pda-dateOfBirth | ||
398 | id-pda 2 : id-pda-placeOfBirth | ||
399 | id-pda 3 : id-pda-pseudonym | ||
400 | id-pda 4 : id-pda-gender | ||
401 | id-pda 5 : id-pda-countryOfCitizenship | ||
402 | id-pda 6 : id-pda-countryOfResidence | ||
403 | |||
404 | # attribute certificate attributes | ||
405 | id-aca 1 : id-aca-authenticationInfo | ||
406 | id-aca 2 : id-aca-accessIdentity | ||
407 | id-aca 3 : id-aca-chargingIdentity | ||
408 | id-aca 4 : id-aca-group | ||
409 | id-aca 5 : id-aca-role | ||
410 | |||
411 | # qualified certificate statements | ||
412 | id-qcs 1 : id-qcs-pkixQCSyntax-v1 | ||
413 | |||
414 | # CMC content types | ||
415 | id-cct 1 : id-cct-crs | ||
416 | id-cct 2 : id-cct-PKIData | ||
417 | id-cct 3 : id-cct-PKIResponse | ||
418 | |||
419 | # access descriptors for authority info access extension | ||
420 | !Cname ad-OCSP | ||
421 | id-ad 1 : OCSP : OCSP | ||
422 | !Cname ad-ca-issuers | ||
423 | id-ad 2 : caIssuers : CA Issuers | ||
424 | !Cname ad-timeStamping | ||
425 | id-ad 3 : ad_timestamping : AD Time Stamping | ||
426 | !Cname ad-dvcs | ||
427 | id-ad 4 : AD_DVCS : ad dvcs | ||
428 | |||
429 | |||
430 | !Alias id-pkix-OCSP ad-OCSP | ||
431 | !module id-pkix-OCSP | ||
432 | !Cname basic | ||
433 | id-pkix-OCSP 1 : basicOCSPResponse : Basic OCSP Response | ||
434 | id-pkix-OCSP 2 : Nonce : OCSP Nonce | ||
435 | id-pkix-OCSP 3 : CrlID : OCSP CRL ID | ||
436 | id-pkix-OCSP 4 : acceptableResponses : Acceptable OCSP Responses | ||
437 | id-pkix-OCSP 5 : noCheck | ||
438 | id-pkix-OCSP 6 : archiveCutoff : OCSP Archive Cutoff | ||
439 | id-pkix-OCSP 7 : serviceLocator : OCSP Service Locator | ||
440 | id-pkix-OCSP 8 : extendedStatus : Extended OCSP Status | ||
441 | id-pkix-OCSP 9 : valid | ||
442 | id-pkix-OCSP 10 : path | ||
443 | id-pkix-OCSP 11 : trustRoot : Trust Root | ||
444 | !global | ||
445 | |||
446 | 1 3 14 3 2 : algorithm : algorithm | ||
447 | algorithm 3 : RSA-NP-MD5 : md5WithRSA | ||
448 | algorithm 6 : DES-ECB : des-ecb | ||
449 | algorithm 7 : DES-CBC : des-cbc | ||
450 | !Cname des-ofb64 | ||
451 | algorithm 8 : DES-OFB : des-ofb | ||
452 | !Cname des-cfb64 | ||
453 | algorithm 9 : DES-CFB : des-cfb | ||
454 | algorithm 11 : rsaSignature | ||
455 | !Cname dsa-2 | ||
456 | algorithm 12 : DSA-old : dsaEncryption-old | ||
457 | algorithm 13 : DSA-SHA : dsaWithSHA | ||
458 | algorithm 15 : RSA-SHA : shaWithRSAEncryption | ||
459 | algorithm 17 : DES-EDE : des-ede | ||
460 | : DES-EDE3 : des-ede3 | ||
461 | : DES-EDE-CBC : des-ede-cbc | ||
462 | !Cname des-ede-cfb64 | ||
463 | : DES-EDE-CFB : des-ede-cfb | ||
464 | !Cname des-ede3-cfb64 | ||
465 | : DES-EDE3-CFB : des-ede3-cfb | ||
466 | !Cname des-ede-ofb64 | ||
467 | : DES-EDE-OFB : des-ede-ofb | ||
468 | !Cname des-ede3-ofb64 | ||
469 | : DES-EDE3-OFB : des-ede3-ofb | ||
470 | : DESX-CBC : desx-cbc | ||
471 | algorithm 18 : SHA : sha | ||
472 | algorithm 26 : SHA1 : sha1 | ||
473 | !Cname dsaWithSHA1-2 | ||
474 | algorithm 27 : DSA-SHA1-old : dsaWithSHA1-old | ||
475 | algorithm 29 : RSA-SHA1-2 : sha1WithRSA | ||
476 | |||
477 | 1 3 36 3 2 1 : RIPEMD160 : ripemd160 | ||
478 | 1 3 36 3 3 1 2 : RSA-RIPEMD160 : ripemd160WithRSA | ||
479 | |||
480 | !Cname sxnet | ||
481 | 1 3 101 1 4 1 : SXNetID : Strong Extranet ID | ||
482 | |||
483 | 2 5 : X500 : directory services (X.500) | ||
484 | |||
485 | X500 4 : X509 | ||
486 | X509 3 : CN : commonName | ||
487 | X509 4 : S : surname | ||
488 | X509 5 : SN : serialNumber | ||
489 | X509 6 : C : countryName | ||
490 | X509 7 : L : localityName | ||
491 | X509 8 : ST : stateOrProvinceName | ||
492 | X509 10 : O : organizationName | ||
493 | X509 11 : OU : organizationalUnitName | ||
494 | X509 12 : T : title | ||
495 | X509 13 : D : description | ||
496 | X509 41 : name : name | ||
497 | X509 42 : G : givenName | ||
498 | X509 43 : I : initials | ||
499 | X509 45 : UID : uniqueIdentifier | ||
500 | X509 46 : dnQualifier : dnQualifier | ||
501 | |||
502 | X500 8 : X500algorithms : directory services - algorithms | ||
503 | X500algorithms 1 1 : RSA : rsa | ||
504 | X500algorithms 3 100 : RSA-MDC2 : mdc2WithRSA | ||
505 | X500algorithms 3 101 : MDC2 : mdc2 | ||
506 | |||
507 | X500 29 : id-ce | ||
508 | !Cname subject-key-identifier | ||
509 | id-ce 14 : subjectKeyIdentifier : X509v3 Subject Key Identifier | ||
510 | !Cname key-usage | ||
511 | id-ce 15 : keyUsage : X509v3 Key Usage | ||
512 | !Cname private-key-usage-period | ||
513 | id-ce 16 : privateKeyUsagePeriod : X509v3 Private Key Usage Period | ||
514 | !Cname subject-alt-name | ||
515 | id-ce 17 : subjectAltName : X509v3 Subject Alternative Name | ||
516 | !Cname issuer-alt-name | ||
517 | id-ce 18 : issuerAltName : X509v3 Issuer Alternative Name | ||
518 | !Cname basic-constraints | ||
519 | id-ce 19 : basicConstraints : X509v3 Basic Constraints | ||
520 | !Cname crl-number | ||
521 | id-ce 20 : crlNumber : X509v3 CRL Number | ||
522 | !Cname crl-reason | ||
523 | id-ce 21 : CRLReason : X509v3 CRL Reason Code | ||
524 | !Cname invalidity-date | ||
525 | id-ce 24 : invalidityDate : Invalidity Date | ||
526 | !Cname delta-crl | ||
527 | id-ce 27 : deltaCRL : X509v3 Delta CRL Indicator | ||
528 | !Cname crl-distribution-points | ||
529 | id-ce 31 : crlDistributionPoints : X509v3 CRL Distribution Points | ||
530 | !Cname certificate-policies | ||
531 | id-ce 32 : certificatePolicies : X509v3 Certificate Policies | ||
532 | !Cname authority-key-identifier | ||
533 | id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier | ||
534 | !Cname ext-key-usage | ||
535 | id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage | ||
536 | |||
537 | !Cname netscape | ||
538 | 2 16 840 1 113730 : Netscape : Netscape Communications Corp. | ||
539 | !Cname netscape-cert-extension | ||
540 | netscape 1 : nsCertExt : Netscape Certificate Extension | ||
541 | !Cname netscape-data-type | ||
542 | netscape 2 : nsDataType : Netscape Data Type | ||
543 | !Cname netscape-cert-type | ||
544 | netscape-cert-extension 1 : nsCertType : Netscape Cert Type | ||
545 | !Cname netscape-base-url | ||
546 | netscape-cert-extension 2 : nsBaseUrl : Netscape Base Url | ||
547 | !Cname netscape-revocation-url | ||
548 | netscape-cert-extension 3 : nsRevocationUrl : Netscape Revocation Url | ||
549 | !Cname netscape-ca-revocation-url | ||
550 | netscape-cert-extension 4 : nsCaRevocationUrl : Netscape CA Revocation Url | ||
551 | !Cname netscape-renewal-url | ||
552 | netscape-cert-extension 7 : nsRenewalUrl : Netscape Renewal Url | ||
553 | !Cname netscape-ca-policy-url | ||
554 | netscape-cert-extension 8 : nsCaPolicyUrl : Netscape CA Policy Url | ||
555 | !Cname netscape-ssl-server-name | ||
556 | netscape-cert-extension 12 : nsSslServerName : Netscape SSL Server Name | ||
557 | !Cname netscape-comment | ||
558 | netscape-cert-extension 13 : nsComment : Netscape Comment | ||
559 | !Cname netscape-cert-sequence | ||
560 | netscape-data-type 5 : nsCertSequence : Netscape Certificate Sequence | ||
561 | !Cname ns-sgc | ||
562 | netscape 4 1 : nsSGC : Netscape Server Gated Crypto | ||
563 | |||
564 | # iso(1) | ||
565 | iso 3 : ORG : org | ||
566 | org 6 : DOD : dod | ||
567 | dod 1 : IANA : iana | ||
568 | !Alias internet iana | ||
569 | |||
570 | internet 1 : directory : Directory | ||
571 | internet 2 : mgmt : Management | ||
572 | internet 3 : experimental : Experimental | ||
573 | internet 4 : private : Private | ||
574 | internet 5 : security : Security | ||
575 | internet 6 : snmpv2 : SNMPv2 | ||
576 | internet 7 : mail : Mail | ||
577 | |||
578 | private 1 : enterprises : Enterprises | ||
579 | |||
580 | # RFC 2247 | ||
581 | enterprises 1466 344 : dcobject : dcObject | ||
582 | |||
583 | # Stray OIDs we don't know the full name of each step for | ||
584 | # RFC 2247 | ||
585 | 0 9 2342 19200300 100 1 25 : DC : domainComponent | ||
586 | 0 9 2342 19200300 100 4 13 : domain : Domain | ||
587 | |||
588 | # What the hell are these OIDs, really? | ||
589 | !Cname rle-compression | ||
590 | 1 1 1 1 666 1 : RLE : run length compression | ||
591 | !Cname zlib-compression | ||
592 | 1 1 1 1 666 2 : ZLIB : zlib compression | ||
593 | |||