diff options
author | markus <> | 2002-09-05 12:51:50 +0000 |
---|---|---|
committer | markus <> | 2002-09-05 12:51:50 +0000 |
commit | 15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch) | |
tree | bf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/objects | |
parent | 027351f729b9e837200dae6e1520cda6577ab930 (diff) | |
download | openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2 openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/objects')
-rw-r--r-- | src/lib/libcrypto/objects/o_names.c | 229 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 359 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.pl | 112 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_err.c | 123 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_lib.c | 39 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_mac.num | 121 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/objects.h | 444 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/objects.pl | 17 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/objects.txt | 800 |
9 files changed, 1828 insertions, 416 deletions
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c index 4da5e45b9c..b4453b4a98 100644 --- a/src/lib/libcrypto/objects/o_names.c +++ b/src/lib/libcrypto/objects/o_names.c | |||
@@ -4,78 +4,119 @@ | |||
4 | 4 | ||
5 | #include <openssl/lhash.h> | 5 | #include <openssl/lhash.h> |
6 | #include <openssl/objects.h> | 6 | #include <openssl/objects.h> |
7 | #include <openssl/safestack.h> | ||
8 | #include <openssl/e_os2.h> | ||
9 | |||
10 | /* Later versions of DEC C has started to add lnkage information to certain | ||
11 | * functions, which makes it tricky to use them as values to regular function | ||
12 | * pointers. One way is to define a macro that takes care of casting them | ||
13 | * correctly. | ||
14 | */ | ||
15 | #ifdef OPENSSL_SYS_VMS_DECC | ||
16 | # define OPENSSL_strcmp (int (*)(const char *,const char *))strcmp | ||
17 | #else | ||
18 | # define OPENSSL_strcmp strcmp | ||
19 | #endif | ||
7 | 20 | ||
8 | /* I use the ex_data stuff to manage the identifiers for the obj_name_types | 21 | /* I use the ex_data stuff to manage the identifiers for the obj_name_types |
9 | * that applications may define. I only really use the free function field. | 22 | * that applications may define. I only really use the free function field. |
10 | */ | 23 | */ |
11 | static LHASH *names_lh=NULL; | 24 | static LHASH *names_lh=NULL; |
12 | static int names_type_num=OBJ_NAME_TYPE_NUM; | 25 | static int names_type_num=OBJ_NAME_TYPE_NUM; |
13 | static STACK *names_cmp=NULL; | ||
14 | static STACK *names_hash=NULL; | ||
15 | static STACK *names_free=NULL; | ||
16 | 26 | ||
17 | static unsigned long obj_name_hash(OBJ_NAME *a); | 27 | typedef struct name_funcs_st |
18 | static int obj_name_cmp(OBJ_NAME *a,OBJ_NAME *b); | 28 | { |
29 | unsigned long (*hash_func)(const char *name); | ||
30 | int (*cmp_func)(const char *a,const char *b); | ||
31 | void (*free_func)(const char *, int, const char *); | ||
32 | } NAME_FUNCS; | ||
33 | |||
34 | DECLARE_STACK_OF(NAME_FUNCS) | ||
35 | IMPLEMENT_STACK_OF(NAME_FUNCS) | ||
36 | |||
37 | static STACK_OF(NAME_FUNCS) *name_funcs_stack; | ||
38 | |||
39 | /* The LHASH callbacks now use the raw "void *" prototypes and do per-variable | ||
40 | * casting in the functions. This prevents function pointer casting without the | ||
41 | * need for macro-generated wrapper functions. */ | ||
42 | |||
43 | /* static unsigned long obj_name_hash(OBJ_NAME *a); */ | ||
44 | static unsigned long obj_name_hash(const void *a_void); | ||
45 | /* static int obj_name_cmp(OBJ_NAME *a,OBJ_NAME *b); */ | ||
46 | static int obj_name_cmp(const void *a_void,const void *b_void); | ||
19 | 47 | ||
20 | int OBJ_NAME_init(void) | 48 | int OBJ_NAME_init(void) |
21 | { | 49 | { |
22 | if (names_lh != NULL) return(1); | 50 | if (names_lh != NULL) return(1); |
23 | MemCheck_off(); | 51 | MemCheck_off(); |
24 | names_lh=lh_new(obj_name_hash,obj_name_cmp); | 52 | names_lh=lh_new(obj_name_hash, obj_name_cmp); |
25 | MemCheck_on(); | 53 | MemCheck_on(); |
26 | return(names_lh != NULL); | 54 | return(names_lh != NULL); |
27 | } | 55 | } |
28 | 56 | ||
29 | int OBJ_NAME_new_index(unsigned long (*hash_func)(), int (*cmp_func)(), | 57 | int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), |
30 | void (*free_func)()) | 58 | int (*cmp_func)(const char *, const char *), |
59 | void (*free_func)(const char *, int, const char *)) | ||
31 | { | 60 | { |
32 | int ret; | 61 | int ret; |
33 | int i; | 62 | int i; |
63 | NAME_FUNCS *name_funcs; | ||
34 | 64 | ||
35 | if (names_free == NULL) | 65 | if (name_funcs_stack == NULL) |
36 | { | 66 | { |
37 | MemCheck_off(); | 67 | MemCheck_off(); |
38 | names_hash=sk_new_null(); | 68 | name_funcs_stack=sk_NAME_FUNCS_new_null(); |
39 | names_cmp=sk_new_null(); | ||
40 | names_free=sk_new_null(); | ||
41 | MemCheck_on(); | 69 | MemCheck_on(); |
42 | } | 70 | } |
43 | if ((names_free == NULL) || (names_hash == NULL) || (names_cmp == NULL)) | 71 | if ((name_funcs_stack == NULL)) |
44 | { | 72 | { |
45 | /* ERROR */ | 73 | /* ERROR */ |
46 | return(0); | 74 | return(0); |
47 | } | 75 | } |
48 | ret=names_type_num; | 76 | ret=names_type_num; |
49 | names_type_num++; | 77 | names_type_num++; |
50 | for (i=sk_num(names_free); i<names_type_num; i++) | 78 | for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++) |
51 | { | 79 | { |
52 | MemCheck_off(); | 80 | MemCheck_off(); |
53 | sk_push(names_hash,(char *)strcmp); | 81 | name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); |
54 | sk_push(names_cmp,(char *)lh_strhash); | 82 | MemCheck_on(); |
55 | sk_push(names_free,NULL); | 83 | if (!name_funcs) return(0); |
84 | name_funcs->hash_func = lh_strhash; | ||
85 | name_funcs->cmp_func = OPENSSL_strcmp; | ||
86 | name_funcs->free_func = 0; /* NULL is often declared to | ||
87 | * ((void *)0), which according | ||
88 | * to Compaq C is not really | ||
89 | * compatible with a function | ||
90 | * pointer. -- Richard Levitte*/ | ||
91 | MemCheck_off(); | ||
92 | sk_NAME_FUNCS_push(name_funcs_stack,name_funcs); | ||
56 | MemCheck_on(); | 93 | MemCheck_on(); |
57 | } | 94 | } |
95 | name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret); | ||
58 | if (hash_func != NULL) | 96 | if (hash_func != NULL) |
59 | sk_set(names_hash,ret,(char *)hash_func); | 97 | name_funcs->hash_func = hash_func; |
60 | if (cmp_func != NULL) | 98 | if (cmp_func != NULL) |
61 | sk_set(names_cmp,ret,(char *)cmp_func); | 99 | name_funcs->cmp_func = cmp_func; |
62 | if (free_func != NULL) | 100 | if (free_func != NULL) |
63 | sk_set(names_free,ret,(char *)free_func); | 101 | name_funcs->free_func = free_func; |
64 | return(ret); | 102 | return(ret); |
65 | } | 103 | } |
66 | 104 | ||
67 | static int obj_name_cmp(OBJ_NAME *a, OBJ_NAME *b) | 105 | /* static int obj_name_cmp(OBJ_NAME *a, OBJ_NAME *b) */ |
106 | static int obj_name_cmp(const void *a_void, const void *b_void) | ||
68 | { | 107 | { |
69 | int ret; | 108 | int ret; |
70 | int (*cmp)(); | 109 | OBJ_NAME *a = (OBJ_NAME *)a_void; |
110 | OBJ_NAME *b = (OBJ_NAME *)b_void; | ||
71 | 111 | ||
72 | ret=a->type-b->type; | 112 | ret=a->type-b->type; |
73 | if (ret == 0) | 113 | if (ret == 0) |
74 | { | 114 | { |
75 | if ((names_cmp != NULL) && (sk_num(names_cmp) > a->type)) | 115 | if ((name_funcs_stack != NULL) |
116 | && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) | ||
76 | { | 117 | { |
77 | cmp=(int (*)())sk_value(names_cmp,a->type); | 118 | ret=sk_NAME_FUNCS_value(name_funcs_stack, |
78 | ret=cmp(a->name,b->name); | 119 | a->type)->cmp_func(a->name,b->name); |
79 | } | 120 | } |
80 | else | 121 | else |
81 | ret=strcmp(a->name,b->name); | 122 | ret=strcmp(a->name,b->name); |
@@ -83,15 +124,16 @@ static int obj_name_cmp(OBJ_NAME *a, OBJ_NAME *b) | |||
83 | return(ret); | 124 | return(ret); |
84 | } | 125 | } |
85 | 126 | ||
86 | static unsigned long obj_name_hash(OBJ_NAME *a) | 127 | /* static unsigned long obj_name_hash(OBJ_NAME *a) */ |
128 | static unsigned long obj_name_hash(const void *a_void) | ||
87 | { | 129 | { |
88 | unsigned long ret; | 130 | unsigned long ret; |
89 | unsigned long (*hash)(); | 131 | OBJ_NAME *a = (OBJ_NAME *)a_void; |
90 | 132 | ||
91 | if ((names_hash != NULL) && (sk_num(names_hash) > a->type)) | 133 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) |
92 | { | 134 | { |
93 | hash=(unsigned long (*)())sk_value(names_hash,a->type); | 135 | ret=sk_NAME_FUNCS_value(name_funcs_stack, |
94 | ret=hash(a->name); | 136 | a->type)->hash_func(a->name); |
95 | } | 137 | } |
96 | else | 138 | else |
97 | { | 139 | { |
@@ -116,8 +158,8 @@ const char *OBJ_NAME_get(const char *name, int type) | |||
116 | on.type=type; | 158 | on.type=type; |
117 | 159 | ||
118 | for (;;) | 160 | for (;;) |
119 | { | 161 | { |
120 | ret=(OBJ_NAME *)lh_retrieve(names_lh,(char *)&on); | 162 | ret=(OBJ_NAME *)lh_retrieve(names_lh,&on); |
121 | if (ret == NULL) return(NULL); | 163 | if (ret == NULL) return(NULL); |
122 | if ((ret->alias) && !alias) | 164 | if ((ret->alias) && !alias) |
123 | { | 165 | { |
@@ -133,7 +175,6 @@ const char *OBJ_NAME_get(const char *name, int type) | |||
133 | 175 | ||
134 | int OBJ_NAME_add(const char *name, int type, const char *data) | 176 | int OBJ_NAME_add(const char *name, int type, const char *data) |
135 | { | 177 | { |
136 | void (*f)(); | ||
137 | OBJ_NAME *onp,*ret; | 178 | OBJ_NAME *onp,*ret; |
138 | int alias; | 179 | int alias; |
139 | 180 | ||
@@ -142,7 +183,7 @@ int OBJ_NAME_add(const char *name, int type, const char *data) | |||
142 | alias=type&OBJ_NAME_ALIAS; | 183 | alias=type&OBJ_NAME_ALIAS; |
143 | type&= ~OBJ_NAME_ALIAS; | 184 | type&= ~OBJ_NAME_ALIAS; |
144 | 185 | ||
145 | onp=(OBJ_NAME *)Malloc(sizeof(OBJ_NAME)); | 186 | onp=(OBJ_NAME *)OPENSSL_malloc(sizeof(OBJ_NAME)); |
146 | if (onp == NULL) | 187 | if (onp == NULL) |
147 | { | 188 | { |
148 | /* ERROR */ | 189 | /* ERROR */ |
@@ -154,16 +195,20 @@ int OBJ_NAME_add(const char *name, int type, const char *data) | |||
154 | onp->type=type; | 195 | onp->type=type; |
155 | onp->data=data; | 196 | onp->data=data; |
156 | 197 | ||
157 | ret=(OBJ_NAME *)lh_insert(names_lh,(char *)onp); | 198 | ret=(OBJ_NAME *)lh_insert(names_lh,onp); |
158 | if (ret != NULL) | 199 | if (ret != NULL) |
159 | { | 200 | { |
160 | /* free things */ | 201 | /* free things */ |
161 | if ((names_free != NULL) && (sk_num(names_free) > ret->type)) | 202 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) |
162 | { | 203 | { |
163 | f=(void (*)())sk_value(names_free,ret->type); | 204 | /* XXX: I'm not sure I understand why the free |
164 | f(ret->name,ret->type,ret->data); | 205 | * function should get three arguments... |
206 | * -- Richard Levitte | ||
207 | */ | ||
208 | sk_NAME_FUNCS_value(name_funcs_stack, | ||
209 | ret->type)->free_func(ret->name,ret->type,ret->data); | ||
165 | } | 210 | } |
166 | Free((char *)ret); | 211 | OPENSSL_free(ret); |
167 | } | 212 | } |
168 | else | 213 | else |
169 | { | 214 | { |
@@ -179,35 +224,108 @@ int OBJ_NAME_add(const char *name, int type, const char *data) | |||
179 | int OBJ_NAME_remove(const char *name, int type) | 224 | int OBJ_NAME_remove(const char *name, int type) |
180 | { | 225 | { |
181 | OBJ_NAME on,*ret; | 226 | OBJ_NAME on,*ret; |
182 | void (*f)(); | ||
183 | 227 | ||
184 | if (names_lh == NULL) return(0); | 228 | if (names_lh == NULL) return(0); |
185 | 229 | ||
186 | type&= ~OBJ_NAME_ALIAS; | 230 | type&= ~OBJ_NAME_ALIAS; |
187 | on.name=name; | 231 | on.name=name; |
188 | on.type=type; | 232 | on.type=type; |
189 | ret=(OBJ_NAME *)lh_delete(names_lh,(char *)&on); | 233 | ret=(OBJ_NAME *)lh_delete(names_lh,&on); |
190 | if (ret != NULL) | 234 | if (ret != NULL) |
191 | { | 235 | { |
192 | /* free things */ | 236 | /* free things */ |
193 | if ((names_free != NULL) && (sk_num(names_free) > type)) | 237 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) |
194 | { | 238 | { |
195 | f=(void (*)())sk_value(names_free,type); | 239 | /* XXX: I'm not sure I understand why the free |
196 | f(ret->name,ret->type,ret->data); | 240 | * function should get three arguments... |
241 | * -- Richard Levitte | ||
242 | */ | ||
243 | sk_NAME_FUNCS_value(name_funcs_stack, | ||
244 | ret->type)->free_func(ret->name,ret->type,ret->data); | ||
197 | } | 245 | } |
198 | Free((char *)ret); | 246 | OPENSSL_free(ret); |
199 | return(1); | 247 | return(1); |
200 | } | 248 | } |
201 | else | 249 | else |
202 | return(0); | 250 | return(0); |
203 | } | 251 | } |
204 | 252 | ||
253 | struct doall | ||
254 | { | ||
255 | int type; | ||
256 | void (*fn)(const OBJ_NAME *,void *arg); | ||
257 | void *arg; | ||
258 | }; | ||
259 | |||
260 | static void do_all_fn(const OBJ_NAME *name,struct doall *d) | ||
261 | { | ||
262 | if(name->type == d->type) | ||
263 | d->fn(name,d->arg); | ||
264 | } | ||
265 | |||
266 | static IMPLEMENT_LHASH_DOALL_ARG_FN(do_all_fn, const OBJ_NAME *, struct doall *) | ||
267 | |||
268 | void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg),void *arg) | ||
269 | { | ||
270 | struct doall d; | ||
271 | |||
272 | d.type=type; | ||
273 | d.fn=fn; | ||
274 | d.arg=arg; | ||
275 | |||
276 | lh_doall_arg(names_lh,LHASH_DOALL_ARG_FN(do_all_fn),&d); | ||
277 | } | ||
278 | |||
279 | struct doall_sorted | ||
280 | { | ||
281 | int type; | ||
282 | int n; | ||
283 | const OBJ_NAME **names; | ||
284 | }; | ||
285 | |||
286 | static void do_all_sorted_fn(const OBJ_NAME *name,void *d_) | ||
287 | { | ||
288 | struct doall_sorted *d=d_; | ||
289 | |||
290 | if(name->type != d->type) | ||
291 | return; | ||
292 | |||
293 | d->names[d->n++]=name; | ||
294 | } | ||
295 | |||
296 | static int do_all_sorted_cmp(const void *n1_,const void *n2_) | ||
297 | { | ||
298 | const OBJ_NAME * const *n1=n1_; | ||
299 | const OBJ_NAME * const *n2=n2_; | ||
300 | |||
301 | return strcmp((*n1)->name,(*n2)->name); | ||
302 | } | ||
303 | |||
304 | void OBJ_NAME_do_all_sorted(int type,void (*fn)(const OBJ_NAME *,void *arg), | ||
305 | void *arg) | ||
306 | { | ||
307 | struct doall_sorted d; | ||
308 | int n; | ||
309 | |||
310 | d.type=type; | ||
311 | d.names=OPENSSL_malloc(lh_num_items(names_lh)*sizeof *d.names); | ||
312 | d.n=0; | ||
313 | OBJ_NAME_do_all(type,do_all_sorted_fn,&d); | ||
314 | |||
315 | qsort((void *)d.names,d.n,sizeof *d.names,do_all_sorted_cmp); | ||
316 | |||
317 | for(n=0 ; n < d.n ; ++n) | ||
318 | fn(d.names[n],arg); | ||
319 | |||
320 | OPENSSL_free((void *)d.names); | ||
321 | } | ||
322 | |||
205 | static int free_type; | 323 | static int free_type; |
206 | 324 | ||
207 | static void names_lh_free(OBJ_NAME *onp, int type) | 325 | static void names_lh_free(OBJ_NAME *onp) |
208 | { | 326 | { |
209 | if(onp == NULL) | 327 | if(onp == NULL) |
210 | return; | 328 | return; |
211 | 329 | ||
212 | if ((free_type < 0) || (free_type == onp->type)) | 330 | if ((free_type < 0) || (free_type == onp->type)) |
213 | { | 331 | { |
@@ -215,6 +333,13 @@ static void names_lh_free(OBJ_NAME *onp, int type) | |||
215 | } | 333 | } |
216 | } | 334 | } |
217 | 335 | ||
336 | static IMPLEMENT_LHASH_DOALL_FN(names_lh_free, OBJ_NAME *) | ||
337 | |||
338 | static void name_funcs_free(NAME_FUNCS *ptr) | ||
339 | { | ||
340 | OPENSSL_free(ptr); | ||
341 | } | ||
342 | |||
218 | void OBJ_NAME_cleanup(int type) | 343 | void OBJ_NAME_cleanup(int type) |
219 | { | 344 | { |
220 | unsigned long down_load; | 345 | unsigned long down_load; |
@@ -225,17 +350,13 @@ void OBJ_NAME_cleanup(int type) | |||
225 | down_load=names_lh->down_load; | 350 | down_load=names_lh->down_load; |
226 | names_lh->down_load=0; | 351 | names_lh->down_load=0; |
227 | 352 | ||
228 | lh_doall(names_lh,names_lh_free); | 353 | lh_doall(names_lh,LHASH_DOALL_FN(names_lh_free)); |
229 | if (type < 0) | 354 | if (type < 0) |
230 | { | 355 | { |
231 | lh_free(names_lh); | 356 | lh_free(names_lh); |
232 | sk_free(names_hash); | 357 | sk_NAME_FUNCS_pop_free(name_funcs_stack,name_funcs_free); |
233 | sk_free(names_cmp); | ||
234 | sk_free(names_free); | ||
235 | names_lh=NULL; | 358 | names_lh=NULL; |
236 | names_hash=NULL; | 359 | name_funcs_stack = NULL; |
237 | names_cmp=NULL; | ||
238 | names_free=NULL; | ||
239 | } | 360 | } |
240 | else | 361 | else |
241 | names_lh->down_load=down_load; | 362 | names_lh->down_load=down_load; |
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index 34866ebbd2..3ff64bb8d1 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
@@ -59,23 +59,29 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <ctype.h> | 60 | #include <ctype.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include "lhash.h" | 62 | #include <openssl/lhash.h> |
63 | #include "asn1.h" | 63 | #include <openssl/asn1.h> |
64 | #include "objects.h" | 64 | #include <openssl/objects.h> |
65 | 65 | ||
66 | /* obj_dat.h is generated from objects.h by obj_dat.pl */ | 66 | /* obj_dat.h is generated from objects.h by obj_dat.pl */ |
67 | #ifndef OPENSSL_NO_OBJECT | ||
67 | #include "obj_dat.h" | 68 | #include "obj_dat.h" |
68 | |||
69 | #ifndef NOPROTO | ||
70 | static int sn_cmp(ASN1_OBJECT **a, ASN1_OBJECT **b); | ||
71 | static int ln_cmp(ASN1_OBJECT **a, ASN1_OBJECT **b); | ||
72 | static int obj_cmp(ASN1_OBJECT **a, ASN1_OBJECT **b); | ||
73 | #else | 69 | #else |
74 | static int sn_cmp(); | 70 | /* You will have to load all the objects needed manually in the application */ |
75 | static int ln_cmp(); | 71 | #define NUM_NID 0 |
76 | static int obj_cmp(); | 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]; | ||
77 | #endif | 80 | #endif |
78 | 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); | ||
79 | #define ADDED_DATA 0 | 85 | #define ADDED_DATA 0 |
80 | #define ADDED_SNAME 1 | 86 | #define ADDED_SNAME 1 |
81 | #define ADDED_LNAME 2 | 87 | #define ADDED_LNAME 2 |
@@ -90,23 +96,26 @@ typedef struct added_obj_st | |||
90 | static int new_nid=NUM_NID; | 96 | static int new_nid=NUM_NID; |
91 | static LHASH *added=NULL; | 97 | static LHASH *added=NULL; |
92 | 98 | ||
93 | static int sn_cmp(ap,bp) | 99 | static int sn_cmp(const void *a, const void *b) |
94 | ASN1_OBJECT **ap; | 100 | { |
95 | ASN1_OBJECT **bp; | 101 | const ASN1_OBJECT * const *ap = a, * const *bp = b; |
96 | { return(strcmp((*ap)->sn,(*bp)->sn)); } | 102 | return(strcmp((*ap)->sn,(*bp)->sn)); |
103 | } | ||
97 | 104 | ||
98 | static int ln_cmp(ap,bp) | 105 | static int ln_cmp(const void *a, const void *b) |
99 | ASN1_OBJECT **ap; | 106 | { |
100 | ASN1_OBJECT **bp; | 107 | const ASN1_OBJECT * const *ap = a, * const *bp = b; |
101 | { return(strcmp((*ap)->ln,(*bp)->ln)); } | 108 | return(strcmp((*ap)->ln,(*bp)->ln)); |
109 | } | ||
102 | 110 | ||
103 | static unsigned long add_hash(ca) | 111 | /* static unsigned long add_hash(ADDED_OBJ *ca) */ |
104 | ADDED_OBJ *ca; | 112 | static unsigned long add_hash(const void *ca_void) |
105 | { | 113 | { |
106 | ASN1_OBJECT *a; | 114 | const ASN1_OBJECT *a; |
107 | int i; | 115 | int i; |
108 | unsigned long ret=0; | 116 | unsigned long ret=0; |
109 | unsigned char *p; | 117 | unsigned char *p; |
118 | ADDED_OBJ *ca = (ADDED_OBJ *)ca_void; | ||
110 | 119 | ||
111 | a=ca->obj; | 120 | a=ca->obj; |
112 | switch (ca->type) | 121 | switch (ca->type) |
@@ -127,18 +136,21 @@ ADDED_OBJ *ca; | |||
127 | ret=a->nid; | 136 | ret=a->nid; |
128 | break; | 137 | break; |
129 | default: | 138 | default: |
130 | abort(); | 139 | /* abort(); */ |
140 | return 0; | ||
131 | } | 141 | } |
132 | ret&=0x3fffffffL; | 142 | ret&=0x3fffffffL; |
133 | ret|=ca->type<<30L; | 143 | ret|=ca->type<<30L; |
134 | return(ret); | 144 | return(ret); |
135 | } | 145 | } |
136 | 146 | ||
137 | static int add_cmp(ca,cb) | 147 | /* static int add_cmp(ADDED_OBJ *ca, ADDED_OBJ *cb) */ |
138 | ADDED_OBJ *ca,*cb; | 148 | static int add_cmp(const void *ca_void, const void *cb_void) |
139 | { | 149 | { |
140 | ASN1_OBJECT *a,*b; | 150 | ASN1_OBJECT *a,*b; |
141 | int i; | 151 | int i; |
152 | ADDED_OBJ *ca = (ADDED_OBJ *)ca_void; | ||
153 | ADDED_OBJ *cb = (ADDED_OBJ *)cb_void; | ||
142 | 154 | ||
143 | i=ca->type-cb->type; | 155 | i=ca->type-cb->type; |
144 | if (i) return(i); | 156 | if (i) return(i); |
@@ -161,50 +173,52 @@ ADDED_OBJ *ca,*cb; | |||
161 | case ADDED_NID: | 173 | case ADDED_NID: |
162 | return(a->nid-b->nid); | 174 | return(a->nid-b->nid); |
163 | default: | 175 | default: |
164 | abort(); | 176 | /* abort(); */ |
177 | return 0; | ||
165 | } | 178 | } |
166 | } | 179 | } |
167 | 180 | ||
168 | static int init_added() | 181 | static int init_added(void) |
169 | { | 182 | { |
170 | if (added != NULL) return(1); | 183 | if (added != NULL) return(1); |
171 | added=lh_new(add_hash,add_cmp); | 184 | added=lh_new(add_hash,add_cmp); |
172 | return(added != NULL); | 185 | return(added != NULL); |
173 | } | 186 | } |
174 | 187 | ||
175 | static void cleanup1(a) | 188 | static void cleanup1(ADDED_OBJ *a) |
176 | ADDED_OBJ *a; | ||
177 | { | 189 | { |
178 | a->obj->nid=0; | 190 | a->obj->nid=0; |
179 | a->obj->flags|=ASN1_OBJECT_FLAG_DYNAMIC| | 191 | a->obj->flags|=ASN1_OBJECT_FLAG_DYNAMIC| |
180 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS; | 192 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS| |
193 | ASN1_OBJECT_FLAG_DYNAMIC_DATA; | ||
181 | } | 194 | } |
182 | 195 | ||
183 | static void cleanup2(a) | 196 | static void cleanup2(ADDED_OBJ *a) |
184 | ADDED_OBJ *a; | ||
185 | { a->obj->nid++; } | 197 | { a->obj->nid++; } |
186 | 198 | ||
187 | static void cleanup3(a) | 199 | static void cleanup3(ADDED_OBJ *a) |
188 | ADDED_OBJ *a; | ||
189 | { | 200 | { |
190 | if (--a->obj->nid == 0) | 201 | if (--a->obj->nid == 0) |
191 | ASN1_OBJECT_free(a->obj); | 202 | ASN1_OBJECT_free(a->obj); |
192 | Free(a); | 203 | OPENSSL_free(a); |
193 | } | 204 | } |
194 | 205 | ||
195 | void OBJ_cleanup() | 206 | static IMPLEMENT_LHASH_DOALL_FN(cleanup1, ADDED_OBJ *) |
207 | static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ *) | ||
208 | static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ *) | ||
209 | |||
210 | void OBJ_cleanup(void) | ||
196 | { | 211 | { |
197 | if (added == NULL) return; | 212 | if (added == NULL) return; |
198 | added->down_load=0; | 213 | added->down_load=0; |
199 | lh_doall(added,cleanup1); /* zero counters */ | 214 | lh_doall(added,LHASH_DOALL_FN(cleanup1)); /* zero counters */ |
200 | lh_doall(added,cleanup2); /* set counters */ | 215 | lh_doall(added,LHASH_DOALL_FN(cleanup2)); /* set counters */ |
201 | lh_doall(added,cleanup3); /* free objects */ | 216 | lh_doall(added,LHASH_DOALL_FN(cleanup3)); /* free objects */ |
202 | lh_free(added); | 217 | lh_free(added); |
203 | added=NULL; | 218 | added=NULL; |
204 | } | 219 | } |
205 | 220 | ||
206 | int OBJ_new_nid(num) | 221 | int OBJ_new_nid(int num) |
207 | int num; | ||
208 | { | 222 | { |
209 | int i; | 223 | int i; |
210 | 224 | ||
@@ -213,27 +227,22 @@ int num; | |||
213 | return(i); | 227 | return(i); |
214 | } | 228 | } |
215 | 229 | ||
216 | int OBJ_add_object(obj) | 230 | int OBJ_add_object(const ASN1_OBJECT *obj) |
217 | ASN1_OBJECT *obj; | ||
218 | { | 231 | { |
219 | ASN1_OBJECT *o; | 232 | ASN1_OBJECT *o; |
220 | ADDED_OBJ *ao[4],*aop; | 233 | ADDED_OBJ *ao[4]={NULL,NULL,NULL,NULL},*aop; |
221 | int i; | 234 | int i; |
222 | 235 | ||
223 | if (added == NULL) | 236 | if (added == NULL) |
224 | if (!init_added()) return(0); | 237 | if (!init_added()) return(0); |
225 | if ((o=OBJ_dup(obj)) == NULL) goto err; | 238 | if ((o=OBJ_dup(obj)) == NULL) goto err; |
226 | ao[ADDED_DATA]=NULL; | 239 | if (!(ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err; |
227 | ao[ADDED_SNAME]=NULL; | ||
228 | ao[ADDED_LNAME]=NULL; | ||
229 | ao[ADDED_NID]=NULL; | ||
230 | ao[ADDED_NID]=(ADDED_OBJ *)Malloc(sizeof(ADDED_OBJ)); | ||
231 | if ((o->length != 0) && (obj->data != NULL)) | 240 | if ((o->length != 0) && (obj->data != NULL)) |
232 | ao[ADDED_DATA]=(ADDED_OBJ *)Malloc(sizeof(ADDED_OBJ)); | 241 | ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); |
233 | if (o->sn != NULL) | 242 | if (o->sn != NULL) |
234 | ao[ADDED_SNAME]=(ADDED_OBJ *)Malloc(sizeof(ADDED_OBJ)); | 243 | ao[ADDED_SNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); |
235 | if (o->ln != NULL) | 244 | if (o->ln != NULL) |
236 | ao[ADDED_LNAME]=(ADDED_OBJ *)Malloc(sizeof(ADDED_OBJ)); | 245 | ao[ADDED_LNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); |
237 | 246 | ||
238 | for (i=ADDED_DATA; i<=ADDED_NID; i++) | 247 | for (i=ADDED_DATA; i<=ADDED_NID; i++) |
239 | { | 248 | { |
@@ -241,23 +250,24 @@ ASN1_OBJECT *obj; | |||
241 | { | 250 | { |
242 | ao[i]->type=i; | 251 | ao[i]->type=i; |
243 | ao[i]->obj=o; | 252 | ao[i]->obj=o; |
244 | aop=(ADDED_OBJ *)lh_insert(added,(char *)ao[i]); | 253 | aop=(ADDED_OBJ *)lh_insert(added,ao[i]); |
245 | /* memory leak, buit should not normally matter */ | 254 | /* memory leak, buit should not normally matter */ |
246 | if (aop != NULL) | 255 | if (aop != NULL) |
247 | Free(aop); | 256 | OPENSSL_free(aop); |
248 | } | 257 | } |
249 | } | 258 | } |
250 | o->flags&= ~(ASN1_OBJECT_FLAG_DYNAMIC|ASN1_OBJECT_FLAG_DYNAMIC_STRINGS); | 259 | o->flags&= ~(ASN1_OBJECT_FLAG_DYNAMIC|ASN1_OBJECT_FLAG_DYNAMIC_STRINGS| |
260 | ASN1_OBJECT_FLAG_DYNAMIC_DATA); | ||
261 | |||
251 | return(o->nid); | 262 | return(o->nid); |
252 | err: | 263 | err: |
253 | for (i=ADDED_DATA; i<=ADDED_NID; i++) | 264 | for (i=ADDED_DATA; i<=ADDED_NID; i++) |
254 | if (ao[i] != NULL) Free(ao[i]); | 265 | if (ao[i] != NULL) OPENSSL_free(ao[i]); |
255 | if (o != NULL) Free(o); | 266 | if (o != NULL) OPENSSL_free(o); |
256 | return(NID_undef); | 267 | return(NID_undef); |
257 | } | 268 | } |
258 | 269 | ||
259 | ASN1_OBJECT *OBJ_nid2obj(n) | 270 | ASN1_OBJECT *OBJ_nid2obj(int n) |
260 | int n; | ||
261 | { | 271 | { |
262 | ADDED_OBJ ad,*adp; | 272 | ADDED_OBJ ad,*adp; |
263 | ASN1_OBJECT ob; | 273 | ASN1_OBJECT ob; |
@@ -278,7 +288,7 @@ int n; | |||
278 | ad.type=ADDED_NID; | 288 | ad.type=ADDED_NID; |
279 | ad.obj= &ob; | 289 | ad.obj= &ob; |
280 | ob.nid=n; | 290 | ob.nid=n; |
281 | adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad); | 291 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); |
282 | if (adp != NULL) | 292 | if (adp != NULL) |
283 | return(adp->obj); | 293 | return(adp->obj); |
284 | else | 294 | else |
@@ -289,8 +299,7 @@ int n; | |||
289 | } | 299 | } |
290 | } | 300 | } |
291 | 301 | ||
292 | char *OBJ_nid2sn(n) | 302 | const char *OBJ_nid2sn(int n) |
293 | int n; | ||
294 | { | 303 | { |
295 | ADDED_OBJ ad,*adp; | 304 | ADDED_OBJ ad,*adp; |
296 | ASN1_OBJECT ob; | 305 | ASN1_OBJECT ob; |
@@ -311,7 +320,7 @@ int n; | |||
311 | ad.type=ADDED_NID; | 320 | ad.type=ADDED_NID; |
312 | ad.obj= &ob; | 321 | ad.obj= &ob; |
313 | ob.nid=n; | 322 | ob.nid=n; |
314 | adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad); | 323 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); |
315 | if (adp != NULL) | 324 | if (adp != NULL) |
316 | return(adp->obj->sn); | 325 | return(adp->obj->sn); |
317 | else | 326 | else |
@@ -322,8 +331,7 @@ int n; | |||
322 | } | 331 | } |
323 | } | 332 | } |
324 | 333 | ||
325 | char *OBJ_nid2ln(n) | 334 | const char *OBJ_nid2ln(int n) |
326 | int n; | ||
327 | { | 335 | { |
328 | ADDED_OBJ ad,*adp; | 336 | ADDED_OBJ ad,*adp; |
329 | ASN1_OBJECT ob; | 337 | ASN1_OBJECT ob; |
@@ -344,7 +352,7 @@ int n; | |||
344 | ad.type=ADDED_NID; | 352 | ad.type=ADDED_NID; |
345 | ad.obj= &ob; | 353 | ad.obj= &ob; |
346 | ob.nid=n; | 354 | ob.nid=n; |
347 | adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad); | 355 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); |
348 | if (adp != NULL) | 356 | if (adp != NULL) |
349 | return(adp->obj->ln); | 357 | return(adp->obj->ln); |
350 | else | 358 | else |
@@ -355,8 +363,7 @@ int n; | |||
355 | } | 363 | } |
356 | } | 364 | } |
357 | 365 | ||
358 | int OBJ_obj2nid(a) | 366 | int OBJ_obj2nid(const ASN1_OBJECT *a) |
359 | ASN1_OBJECT *a; | ||
360 | { | 367 | { |
361 | ASN1_OBJECT **op; | 368 | ASN1_OBJECT **op; |
362 | ADDED_OBJ ad,*adp; | 369 | ADDED_OBJ ad,*adp; |
@@ -369,56 +376,136 @@ ASN1_OBJECT *a; | |||
369 | if (added != NULL) | 376 | if (added != NULL) |
370 | { | 377 | { |
371 | ad.type=ADDED_DATA; | 378 | ad.type=ADDED_DATA; |
372 | ad.obj=a; | 379 | ad.obj=(ASN1_OBJECT *)a; /* XXX: ugly but harmless */ |
373 | adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad); | 380 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); |
374 | if (adp != NULL) return (adp->obj->nid); | 381 | if (adp != NULL) return (adp->obj->nid); |
375 | } | 382 | } |
376 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&a,(char *)obj_objs,NUM_OBJ, | 383 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&a,(char *)obj_objs,NUM_OBJ, |
377 | sizeof(ASN1_OBJECT *),(int (*)())obj_cmp); | 384 | sizeof(ASN1_OBJECT *),obj_cmp); |
378 | if (op == NULL) | 385 | if (op == NULL) |
379 | return(NID_undef); | 386 | return(NID_undef); |
380 | return((*op)->nid); | 387 | return((*op)->nid); |
381 | } | 388 | } |
382 | 389 | ||
383 | int OBJ_txt2nid(s) | 390 | /* Convert an object name into an ASN1_OBJECT |
384 | char *s; | 391 | * if "noname" is not set then search for short and long names first. |
392 | * This will convert the "dotted" form into an object: unlike OBJ_txt2nid | ||
393 | * it can be used with any objects, not just registered ones. | ||
394 | */ | ||
395 | |||
396 | ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) | ||
385 | { | 397 | { |
386 | int ret; | 398 | int nid = NID_undef; |
399 | ASN1_OBJECT *op=NULL; | ||
400 | unsigned char *buf,*p; | ||
401 | int i, j; | ||
387 | 402 | ||
388 | ret=OBJ_sn2nid(s); | 403 | if(!no_name) { |
389 | if (ret == NID_undef) | 404 | if( ((nid = OBJ_sn2nid(s)) != NID_undef) || |
390 | { | 405 | ((nid = OBJ_ln2nid(s)) != NID_undef) ) |
391 | ret=OBJ_ln2nid(s); | 406 | return OBJ_nid2obj(nid); |
392 | if (ret == NID_undef) | 407 | } |
393 | { | ||
394 | ASN1_OBJECT *op=NULL; | ||
395 | unsigned char *buf,*p; | ||
396 | int i; | ||
397 | 408 | ||
398 | i=a2d_ASN1_OBJECT(NULL,0,s,-1); | 409 | /* Work out size of content octets */ |
399 | if (i <= 0) | 410 | i=a2d_ASN1_OBJECT(NULL,0,s,-1); |
400 | { | 411 | if (i <= 0) { |
401 | /* clear the error */ | 412 | /* Clear the error */ |
402 | ERR_get_error(); | 413 | ERR_get_error(); |
403 | return(0); | 414 | return NULL; |
404 | } | 415 | } |
416 | /* Work out total size */ | ||
417 | j = ASN1_object_size(0,i,V_ASN1_OBJECT); | ||
418 | |||
419 | if((buf=(unsigned char *)OPENSSL_malloc(j)) == NULL) return NULL; | ||
420 | |||
421 | p = buf; | ||
422 | /* Write out tag+length */ | ||
423 | ASN1_put_object(&p,0,i,V_ASN1_OBJECT,V_ASN1_UNIVERSAL); | ||
424 | /* Write out contents */ | ||
425 | a2d_ASN1_OBJECT(p,i,s,-1); | ||
426 | |||
427 | p=buf; | ||
428 | op=d2i_ASN1_OBJECT(NULL,&p,i); | ||
429 | OPENSSL_free(buf); | ||
430 | return op; | ||
431 | } | ||
432 | |||
433 | int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | ||
434 | { | ||
435 | int i,idx=0,n=0,len,nid; | ||
436 | unsigned long l; | ||
437 | unsigned char *p; | ||
438 | const char *s; | ||
439 | char tbuf[32]; | ||
440 | |||
441 | if (buf_len <= 0) return(0); | ||
405 | 442 | ||
406 | if ((buf=(unsigned char *)Malloc(i)) == NULL) | 443 | if ((a == NULL) || (a->data == NULL)) { |
407 | return(NID_undef); | 444 | buf[0]='\0'; |
408 | a2d_ASN1_OBJECT(buf,i,s,-1); | 445 | return(0); |
409 | p=buf; | 446 | } |
410 | op=d2i_ASN1_OBJECT(NULL,&p,i); | 447 | |
411 | if (op == NULL) return(NID_undef); | 448 | if (no_name || (nid=OBJ_obj2nid(a)) == NID_undef) { |
412 | ret=OBJ_obj2nid(op); | 449 | len=a->length; |
413 | ASN1_OBJECT_free(op); | 450 | p=a->data; |
414 | Free(buf); | 451 | |
452 | idx=0; | ||
453 | l=0; | ||
454 | while (idx < a->length) { | ||
455 | l|=(p[idx]&0x7f); | ||
456 | if (!(p[idx] & 0x80)) break; | ||
457 | l<<=7L; | ||
458 | idx++; | ||
459 | } | ||
460 | idx++; | ||
461 | i=(int)(l/40); | ||
462 | if (i > 2) i=2; | ||
463 | l-=(long)(i*40); | ||
464 | |||
465 | sprintf(tbuf,"%d.%lu",i,l); | ||
466 | i=strlen(tbuf); | ||
467 | strncpy(buf,tbuf,buf_len); | ||
468 | buf_len-=i; | ||
469 | buf+=i; | ||
470 | n+=i; | ||
471 | |||
472 | l=0; | ||
473 | for (; idx<len; idx++) { | ||
474 | l|=p[idx]&0x7f; | ||
475 | if (!(p[idx] & 0x80)) { | ||
476 | sprintf(tbuf,".%lu",l); | ||
477 | i=strlen(tbuf); | ||
478 | if (buf_len > 0) | ||
479 | strncpy(buf,tbuf,buf_len); | ||
480 | buf_len-=i; | ||
481 | buf+=i; | ||
482 | n+=i; | ||
483 | l=0; | ||
415 | } | 484 | } |
485 | l<<=7L; | ||
416 | } | 486 | } |
417 | return(ret); | 487 | } else { |
488 | s=OBJ_nid2ln(nid); | ||
489 | if (s == NULL) | ||
490 | s=OBJ_nid2sn(nid); | ||
491 | strncpy(buf,s,buf_len); | ||
492 | n=strlen(s); | ||
418 | } | 493 | } |
494 | buf[buf_len-1]='\0'; | ||
495 | return(n); | ||
496 | } | ||
419 | 497 | ||
420 | int OBJ_ln2nid(s) | 498 | int OBJ_txt2nid(const char *s) |
421 | char *s; | 499 | { |
500 | ASN1_OBJECT *obj; | ||
501 | int nid; | ||
502 | obj = OBJ_txt2obj(s, 0); | ||
503 | nid = OBJ_obj2nid(obj); | ||
504 | ASN1_OBJECT_free(obj); | ||
505 | return nid; | ||
506 | } | ||
507 | |||
508 | int OBJ_ln2nid(const char *s) | ||
422 | { | 509 | { |
423 | ASN1_OBJECT o,*oo= &o,**op; | 510 | ASN1_OBJECT o,*oo= &o,**op; |
424 | ADDED_OBJ ad,*adp; | 511 | ADDED_OBJ ad,*adp; |
@@ -428,17 +515,16 @@ char *s; | |||
428 | { | 515 | { |
429 | ad.type=ADDED_LNAME; | 516 | ad.type=ADDED_LNAME; |
430 | ad.obj= &o; | 517 | ad.obj= &o; |
431 | adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad); | 518 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); |
432 | if (adp != NULL) return (adp->obj->nid); | 519 | if (adp != NULL) return (adp->obj->nid); |
433 | } | 520 | } |
434 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)ln_objs,NUM_LN, | 521 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)ln_objs,NUM_LN, |
435 | sizeof(ASN1_OBJECT *),(int (*)())ln_cmp); | 522 | sizeof(ASN1_OBJECT *),ln_cmp); |
436 | if (op == NULL) return(NID_undef); | 523 | if (op == NULL) return(NID_undef); |
437 | return((*op)->nid); | 524 | return((*op)->nid); |
438 | } | 525 | } |
439 | 526 | ||
440 | int OBJ_sn2nid(s) | 527 | int OBJ_sn2nid(const char *s) |
441 | char *s; | ||
442 | { | 528 | { |
443 | ASN1_OBJECT o,*oo= &o,**op; | 529 | ASN1_OBJECT o,*oo= &o,**op; |
444 | ADDED_OBJ ad,*adp; | 530 | ADDED_OBJ ad,*adp; |
@@ -448,37 +534,31 @@ char *s; | |||
448 | { | 534 | { |
449 | ad.type=ADDED_SNAME; | 535 | ad.type=ADDED_SNAME; |
450 | ad.obj= &o; | 536 | ad.obj= &o; |
451 | adp=(ADDED_OBJ *)lh_retrieve(added,(char *)&ad); | 537 | adp=(ADDED_OBJ *)lh_retrieve(added,&ad); |
452 | if (adp != NULL) return (adp->obj->nid); | 538 | if (adp != NULL) return (adp->obj->nid); |
453 | } | 539 | } |
454 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)sn_objs,NUM_SN, | 540 | op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)sn_objs,NUM_SN, |
455 | sizeof(ASN1_OBJECT *),(int (*)())sn_cmp); | 541 | sizeof(ASN1_OBJECT *),sn_cmp); |
456 | if (op == NULL) return(NID_undef); | 542 | if (op == NULL) return(NID_undef); |
457 | return((*op)->nid); | 543 | return((*op)->nid); |
458 | } | 544 | } |
459 | 545 | ||
460 | static int obj_cmp(ap, bp) | 546 | static int obj_cmp(const void *ap, const void *bp) |
461 | ASN1_OBJECT **ap; | ||
462 | ASN1_OBJECT **bp; | ||
463 | { | 547 | { |
464 | int j; | 548 | int j; |
465 | ASN1_OBJECT *a= *ap; | 549 | ASN1_OBJECT *a= *(ASN1_OBJECT **)ap; |
466 | ASN1_OBJECT *b= *bp; | 550 | ASN1_OBJECT *b= *(ASN1_OBJECT **)bp; |
467 | 551 | ||
468 | j=(a->length - b->length); | 552 | j=(a->length - b->length); |
469 | if (j) return(j); | 553 | if (j) return(j); |
470 | return(memcmp(a->data,b->data,a->length)); | 554 | return(memcmp(a->data,b->data,a->length)); |
471 | } | 555 | } |
472 | 556 | ||
473 | char *OBJ_bsearch(key,base,num,size,cmp) | 557 | const char *OBJ_bsearch(const char *key, const char *base, int num, int size, |
474 | char *key; | 558 | int (*cmp)(const void *, const void *)) |
475 | char *base; | ||
476 | int num; | ||
477 | int size; | ||
478 | int (*cmp)(); | ||
479 | { | 559 | { |
480 | int l,h,i,c; | 560 | int l,h,i,c; |
481 | char *p; | 561 | const char *p; |
482 | 562 | ||
483 | if (num == 0) return(NULL); | 563 | if (num == 0) return(NULL); |
484 | l=0; | 564 | l=0; |
@@ -495,14 +575,24 @@ int (*cmp)(); | |||
495 | else | 575 | else |
496 | return(p); | 576 | return(p); |
497 | } | 577 | } |
578 | #ifdef CHARSET_EBCDIC | ||
579 | /* THIS IS A KLUDGE - Because the *_obj is sorted in ASCII order, and | ||
580 | * I don't have perl (yet), we revert to a *LINEAR* search | ||
581 | * when the object wasn't found in the binary search. | ||
582 | */ | ||
583 | for (i=0; i<num; ++i) { | ||
584 | p= &(base[i*size]); | ||
585 | if ((*cmp)(key,p) == 0) | ||
586 | return p; | ||
587 | } | ||
588 | #endif | ||
498 | return(NULL); | 589 | return(NULL); |
499 | } | 590 | } |
500 | 591 | ||
501 | int OBJ_create_objects(in) | 592 | int OBJ_create_objects(BIO *in) |
502 | BIO *in; | ||
503 | { | 593 | { |
504 | MS_STATIC char buf[512]; | 594 | MS_STATIC char buf[512]; |
505 | int i,num= -1; | 595 | int i,num=0; |
506 | char *o,*s,*l=NULL; | 596 | char *o,*s,*l=NULL; |
507 | 597 | ||
508 | for (;;) | 598 | for (;;) |
@@ -511,26 +601,26 @@ BIO *in; | |||
511 | i=BIO_gets(in,buf,512); | 601 | i=BIO_gets(in,buf,512); |
512 | if (i <= 0) return(num); | 602 | if (i <= 0) return(num); |
513 | buf[i-1]='\0'; | 603 | buf[i-1]='\0'; |
514 | if (!isalnum(buf[0])) return(num); | 604 | if (!isalnum((unsigned char)buf[0])) return(num); |
515 | o=s=buf; | 605 | o=s=buf; |
516 | while (isdigit(*s) || (*s == '.')) | 606 | while (isdigit((unsigned char)*s) || (*s == '.')) |
517 | s++; | 607 | s++; |
518 | if (*s != '\0') | 608 | if (*s != '\0') |
519 | { | 609 | { |
520 | *(s++)='\0'; | 610 | *(s++)='\0'; |
521 | while (isspace(*s)) | 611 | while (isspace((unsigned char)*s)) |
522 | s++; | 612 | s++; |
523 | if (*s == '\0') | 613 | if (*s == '\0') |
524 | s=NULL; | 614 | s=NULL; |
525 | else | 615 | else |
526 | { | 616 | { |
527 | l=s; | 617 | l=s; |
528 | while ((*l != '\0') && !isspace(*l)) | 618 | while ((*l != '\0') && !isspace((unsigned char)*l)) |
529 | l++; | 619 | l++; |
530 | if (*l != '\0') | 620 | if (*l != '\0') |
531 | { | 621 | { |
532 | *(l++)='\0'; | 622 | *(l++)='\0'; |
533 | while (isspace(*l)) | 623 | while (isspace((unsigned char)*l)) |
534 | l++; | 624 | l++; |
535 | if (*l == '\0') l=NULL; | 625 | if (*l == '\0') l=NULL; |
536 | } | 626 | } |
@@ -544,13 +634,10 @@ BIO *in; | |||
544 | if (!OBJ_create(o,s,l)) return(num); | 634 | if (!OBJ_create(o,s,l)) return(num); |
545 | num++; | 635 | num++; |
546 | } | 636 | } |
547 | return(num); | 637 | /* return(num); */ |
548 | } | 638 | } |
549 | 639 | ||
550 | int OBJ_create(oid,sn,ln) | 640 | int OBJ_create(const char *oid, const char *sn, const char *ln) |
551 | char *oid; | ||
552 | char *sn; | ||
553 | char *ln; | ||
554 | { | 641 | { |
555 | int ok=0; | 642 | int ok=0; |
556 | ASN1_OBJECT *op=NULL; | 643 | ASN1_OBJECT *op=NULL; |
@@ -560,19 +647,21 @@ char *ln; | |||
560 | i=a2d_ASN1_OBJECT(NULL,0,oid,-1); | 647 | i=a2d_ASN1_OBJECT(NULL,0,oid,-1); |
561 | if (i <= 0) return(0); | 648 | if (i <= 0) return(0); |
562 | 649 | ||
563 | if ((buf=(unsigned char *)Malloc(i)) == NULL) | 650 | if ((buf=(unsigned char *)OPENSSL_malloc(i)) == NULL) |
564 | { | 651 | { |
565 | OBJerr(OBJ_F_OBJ_CREATE,OBJ_R_MALLOC_FAILURE); | 652 | OBJerr(OBJ_F_OBJ_CREATE,OBJ_R_MALLOC_FAILURE); |
566 | return(0); | 653 | return(0); |
567 | } | 654 | } |
568 | i=a2d_ASN1_OBJECT(buf,i,oid,-1); | 655 | i=a2d_ASN1_OBJECT(buf,i,oid,-1); |
656 | if (i == 0) | ||
657 | goto err; | ||
569 | op=(ASN1_OBJECT *)ASN1_OBJECT_create(OBJ_new_nid(1),buf,i,sn,ln); | 658 | op=(ASN1_OBJECT *)ASN1_OBJECT_create(OBJ_new_nid(1),buf,i,sn,ln); |
570 | if (op == NULL) | 659 | if (op == NULL) |
571 | goto err; | 660 | goto err; |
572 | ok=OBJ_add_object(op); | 661 | ok=OBJ_add_object(op); |
573 | err: | 662 | err: |
574 | ASN1_OBJECT_free(op); | 663 | ASN1_OBJECT_free(op); |
575 | Free((char *)buf); | 664 | OPENSSL_free(buf); |
576 | return(ok); | 665 | return(ok); |
577 | } | 666 | } |
578 | 667 | ||
diff --git a/src/lib/libcrypto/objects/obj_dat.pl b/src/lib/libcrypto/objects/obj_dat.pl index 4e7879d3f3..5dfb84ea00 100644 --- a/src/lib/libcrypto/objects/obj_dat.pl +++ b/src/lib/libcrypto/objects/obj_dat.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | 2 | ||
3 | sub obj_cmp | 3 | sub obj_cmp |
4 | { | 4 | { |
@@ -38,15 +38,36 @@ sub expand_obj | |||
38 | return(%objn); | 38 | return(%objn); |
39 | } | 39 | } |
40 | 40 | ||
41 | while (<>) | 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>) | ||
42 | { | 45 | { |
43 | next unless /^\#define\s+(\S+)\s+(.*)$/; | 46 | next unless /^\#define\s+(\S+)\s+(.*)$/; |
44 | $v=$1; | 47 | $v=$1; |
45 | $d=$2; | 48 | $d=$2; |
49 | $d =~ s/^\"//; | ||
50 | $d =~ s/\"$//; | ||
46 | if ($v =~ /^SN_(.*)$/) | 51 | if ($v =~ /^SN_(.*)$/) |
47 | { $sn{$1}=$d; } | 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 | } | ||
48 | elsif ($v =~ /^LN_(.*)$/) | 61 | elsif ($v =~ /^LN_(.*)$/) |
49 | { $ln{$1}=$d; } | 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 | } | ||
50 | elsif ($v =~ /^NID_(.*)$/) | 71 | elsif ($v =~ /^NID_(.*)$/) |
51 | { $nid{$d}=$1; } | 72 | { $nid{$d}=$1; } |
52 | elsif ($v =~ /^OBJ_(.*)$/) | 73 | elsif ($v =~ /^OBJ_(.*)$/) |
@@ -55,6 +76,7 @@ while (<>) | |||
55 | $objd{$v}=$d; | 76 | $objd{$v}=$d; |
56 | } | 77 | } |
57 | } | 78 | } |
79 | close IN; | ||
58 | 80 | ||
59 | %ob=&expand_obj(*objd); | 81 | %ob=&expand_obj(*objd); |
60 | 82 | ||
@@ -74,11 +96,20 @@ for ($i=0; $i<$n; $i++) | |||
74 | { | 96 | { |
75 | $sn=defined($sn{$nid{$i}})?"$sn{$nid{$i}}":"NULL"; | 97 | $sn=defined($sn{$nid{$i}})?"$sn{$nid{$i}}":"NULL"; |
76 | $ln=defined($ln{$nid{$i}})?"$ln{$nid{$i}}":"NULL"; | 98 | $ln=defined($ln{$nid{$i}})?"$ln{$nid{$i}}":"NULL"; |
77 | $sn=$ln if ($sn eq "NULL"); | 99 | |
78 | $ln=$sn if ($ln eq "NULL"); | 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 | |||
79 | $out ="{"; | 110 | $out ="{"; |
80 | $out.=$sn; | 111 | $out.="\"$sn\""; |
81 | $out.=",".$ln; | 112 | $out.=","."\"$ln\""; |
82 | $out.=",NID_$nid{$i},"; | 113 | $out.=",NID_$nid{$i},"; |
83 | if (defined($obj{$nid{$i}})) | 114 | if (defined($obj{$nid{$i}})) |
84 | { | 115 | { |
@@ -113,13 +144,13 @@ for ($i=0; $i<$n; $i++) | |||
113 | @a=grep(defined($sn{$nid{$_}}),0 .. $n); | 144 | @a=grep(defined($sn{$nid{$_}}),0 .. $n); |
114 | foreach (sort { $sn{$nid{$a}} cmp $sn{$nid{$b}} } @a) | 145 | foreach (sort { $sn{$nid{$a}} cmp $sn{$nid{$b}} } @a) |
115 | { | 146 | { |
116 | push(@sn,sprintf("&(nid_objs[%2d]),/* $sn{$nid{$_}} */\n",$_)); | 147 | push(@sn,sprintf("&(nid_objs[%2d]),/* \"$sn{$nid{$_}}\" */\n",$_)); |
117 | } | 148 | } |
118 | 149 | ||
119 | @a=grep(defined($ln{$nid{$_}}),0 .. $n); | 150 | @a=grep(defined($ln{$nid{$_}}),0 .. $n); |
120 | foreach (sort { $ln{$nid{$a}} cmp $ln{$nid{$b}} } @a) | 151 | foreach (sort { $ln{$nid{$a}} cmp $ln{$nid{$b}} } @a) |
121 | { | 152 | { |
122 | push(@ln,sprintf("&(nid_objs[%2d]),/* $ln{$nid{$_}} */\n",$_)); | 153 | push(@ln,sprintf("&(nid_objs[%2d]),/* \"$ln{$nid{$_}}\" */\n",$_)); |
123 | } | 154 | } |
124 | 155 | ||
125 | @a=grep(defined($obj{$nid{$_}}),0 .. $n); | 156 | @a=grep(defined($obj{$nid{$_}}),0 .. $n); |
@@ -132,8 +163,14 @@ foreach (sort obj_cmp @a) | |||
132 | push(@ob,sprintf("&(nid_objs[%2d]),/* %-32s %s */\n",$_,$m,$v)); | 163 | push(@ob,sprintf("&(nid_objs[%2d]),/* %-32s %s */\n",$_,$m,$v)); |
133 | } | 164 | } |
134 | 165 | ||
135 | print <<'EOF'; | 166 | print OUT <<'EOF'; |
136 | /* lib/obj/obj_dat.h */ | 167 | /* crypto/objects/obj_dat.h */ |
168 | |||
169 | /* THIS FILE IS GENERATED FROM objects.h by obj_dat.pl via the | ||
170 | * following command: | ||
171 | * perl obj_dat.pl obj_mac.h obj_dat.h | ||
172 | */ | ||
173 | |||
137 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 174 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
138 | * All rights reserved. | 175 | * All rights reserved. |
139 | * | 176 | * |
@@ -191,23 +228,18 @@ print <<'EOF'; | |||
191 | * [including the GNU Public Licence.] | 228 | * [including the GNU Public Licence.] |
192 | */ | 229 | */ |
193 | 230 | ||
194 | /* THIS FILE IS GENERATED FROM Objects.h by obj_dat.pl via the | ||
195 | * following command: | ||
196 | * perl obj_dat.pl < objects.h > obj_dat.h | ||
197 | */ | ||
198 | |||
199 | EOF | 231 | EOF |
200 | 232 | ||
201 | printf "#define NUM_NID %d\n",$n; | 233 | printf OUT "#define NUM_NID %d\n",$n; |
202 | printf "#define NUM_SN %d\n",$#sn+1; | 234 | printf OUT "#define NUM_SN %d\n",$#sn+1; |
203 | printf "#define NUM_LN %d\n",$#ln+1; | 235 | printf OUT "#define NUM_LN %d\n",$#ln+1; |
204 | printf "#define NUM_OBJ %d\n\n",$#ob+1; | 236 | printf OUT "#define NUM_OBJ %d\n\n",$#ob+1; |
205 | 237 | ||
206 | printf "static unsigned char lvalues[%d]={\n",$lvalues+1; | 238 | printf OUT "static unsigned char lvalues[%d]={\n",$lvalues+1; |
207 | print @lvalues; | 239 | print OUT @lvalues; |
208 | print "};\n\n"; | 240 | print OUT "};\n\n"; |
209 | 241 | ||
210 | printf "static ASN1_OBJECT nid_objs[NUM_NID]={\n"; | 242 | printf OUT "static ASN1_OBJECT nid_objs[NUM_NID]={\n"; |
211 | foreach (@out) | 243 | foreach (@out) |
212 | { | 244 | { |
213 | if (length($_) > 75) | 245 | if (length($_) > 75) |
@@ -218,30 +250,32 @@ foreach (@out) | |||
218 | $t=$out.$_.","; | 250 | $t=$out.$_.","; |
219 | if (length($t) > 70) | 251 | if (length($t) > 70) |
220 | { | 252 | { |
221 | print "$out\n"; | 253 | print OUT "$out\n"; |
222 | $t="\t$_,"; | 254 | $t="\t$_,"; |
223 | } | 255 | } |
224 | $out=$t; | 256 | $out=$t; |
225 | } | 257 | } |
226 | chop $out; | 258 | chop $out; |
227 | print "$out"; | 259 | print OUT "$out"; |
228 | } | 260 | } |
229 | else | 261 | else |
230 | { print $_; } | 262 | { print OUT $_; } |
231 | } | 263 | } |
232 | print "};\n\n"; | 264 | print OUT "};\n\n"; |
265 | |||
266 | printf OUT "static ASN1_OBJECT *sn_objs[NUM_SN]={\n"; | ||
267 | print OUT @sn; | ||
268 | print OUT "};\n\n"; | ||
233 | 269 | ||
234 | printf "static ASN1_OBJECT *sn_objs[NUM_SN]={\n"; | 270 | printf OUT "static ASN1_OBJECT *ln_objs[NUM_LN]={\n"; |
235 | print @sn; | 271 | print OUT @ln; |
236 | print "};\n\n"; | 272 | print OUT "};\n\n"; |
237 | 273 | ||
238 | printf "static ASN1_OBJECT *ln_objs[NUM_LN]={\n"; | 274 | printf OUT "static ASN1_OBJECT *obj_objs[NUM_OBJ]={\n"; |
239 | print @ln; | 275 | print OUT @ob; |
240 | print "};\n\n"; | 276 | print OUT "};\n\n"; |
241 | 277 | ||
242 | printf "static ASN1_OBJECT *obj_objs[NUM_OBJ]={\n"; | 278 | close OUT; |
243 | print @ob; | ||
244 | print "};\n\n"; | ||
245 | 279 | ||
246 | sub der_it | 280 | sub der_it |
247 | { | 281 | { |
@@ -252,7 +286,7 @@ sub der_it | |||
252 | $ret.=pack("C*",$a[0]*40+$a[1]); | 286 | $ret.=pack("C*",$a[0]*40+$a[1]); |
253 | shift @a; | 287 | shift @a; |
254 | shift @a; | 288 | shift @a; |
255 | while ($_=shift(@a)) | 289 | foreach (@a) |
256 | { | 290 | { |
257 | @r=(); | 291 | @r=(); |
258 | $t=0; | 292 | $t=0; |
diff --git a/src/lib/libcrypto/objects/obj_err.c b/src/lib/libcrypto/objects/obj_err.c index 45206c616c..80ab6855af 100644 --- a/src/lib/libcrypto/objects/obj_err.c +++ b/src/lib/libcrypto/objects/obj_err.c | |||
@@ -1,66 +1,69 @@ | |||
1 | /* lib/obj/obj_err.c */ | 1 | /* crypto/objects/obj_err.c */ |
2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 2 | /* ==================================================================== |
3 | * All rights reserved. | 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
4 | * | 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 | 5 | * Redistribution and use in source and binary forms, with or without |
24 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
25 | * are met: | 7 | * are met: |
26 | * 1. Redistributions of source code must retain the copyright | 8 | * |
27 | * notice, this list of conditions and the following disclaimer. | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
29 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in |
30 | * documentation and/or other materials provided with the distribution. | 14 | * the documentation and/or other materials provided with the |
31 | * 3. All advertising materials mentioning features or use of this software | 15 | * distribution. |
32 | * must display the following acknowledgement: | 16 | * |
33 | * "This product includes cryptographic software written by | 17 | * 3. All advertising materials mentioning features or use of this |
34 | * Eric Young (eay@cryptsoft.com)" | 18 | * software must display the following acknowledgment: |
35 | * The word 'cryptographic' can be left out if the rouines from the library | 19 | * "This product includes software developed by the OpenSSL Project |
36 | * being used are not cryptographic related :-). | 20 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" |
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | 21 | * |
38 | * the apps directory (application code) you must include an acknowledgement: | 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to |
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | 23 | * endorse or promote products derived from this software without |
40 | * | 24 | * prior written permission. For written permission, please contact |
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | 25 | * openssl-core@OpenSSL.org. |
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 26 | * |
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 27 | * 5. Products derived from this software may not be called "OpenSSL" |
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 28 | * nor may "OpenSSL" appear in their names without prior written |
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 29 | * permission of the OpenSSL Project. |
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 30 | * |
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 31 | * 6. Redistributions of any form whatsoever must retain the following |
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 32 | * acknowledgment: |
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 33 | * "This product includes software developed by the OpenSSL Project |
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 34 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" |
51 | * SUCH DAMAGE. | 35 | * |
52 | * | 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY |
53 | * The licence and distribution terms for any publically available version or | 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
55 | * copied and put under another distribution licence | 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR |
56 | * [including the GNU Public Licence.] | 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 | * | ||
57 | */ | 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 | |||
58 | #include <stdio.h> | 61 | #include <stdio.h> |
59 | #include "err.h" | 62 | #include <openssl/err.h> |
60 | #include "objects.h" | 63 | #include <openssl/objects.h> |
61 | 64 | ||
62 | /* BEGIN ERROR CODES */ | 65 | /* BEGIN ERROR CODES */ |
63 | #ifndef NO_ERR | 66 | #ifndef OPENSSL_NO_ERR |
64 | static ERR_STRING_DATA OBJ_str_functs[]= | 67 | static ERR_STRING_DATA OBJ_str_functs[]= |
65 | { | 68 | { |
66 | {ERR_PACK(0,OBJ_F_OBJ_CREATE,0), "OBJ_create"}, | 69 | {ERR_PACK(0,OBJ_F_OBJ_CREATE,0), "OBJ_create"}, |
@@ -68,26 +71,26 @@ static ERR_STRING_DATA OBJ_str_functs[]= | |||
68 | {ERR_PACK(0,OBJ_F_OBJ_NID2LN,0), "OBJ_nid2ln"}, | 71 | {ERR_PACK(0,OBJ_F_OBJ_NID2LN,0), "OBJ_nid2ln"}, |
69 | {ERR_PACK(0,OBJ_F_OBJ_NID2OBJ,0), "OBJ_nid2obj"}, | 72 | {ERR_PACK(0,OBJ_F_OBJ_NID2OBJ,0), "OBJ_nid2obj"}, |
70 | {ERR_PACK(0,OBJ_F_OBJ_NID2SN,0), "OBJ_nid2sn"}, | 73 | {ERR_PACK(0,OBJ_F_OBJ_NID2SN,0), "OBJ_nid2sn"}, |
71 | {0,NULL}, | 74 | {0,NULL} |
72 | }; | 75 | }; |
73 | 76 | ||
74 | static ERR_STRING_DATA OBJ_str_reasons[]= | 77 | static ERR_STRING_DATA OBJ_str_reasons[]= |
75 | { | 78 | { |
76 | {OBJ_R_MALLOC_FAILURE ,"malloc failure"}, | 79 | {OBJ_R_MALLOC_FAILURE ,"malloc failure"}, |
77 | {OBJ_R_UNKNOWN_NID ,"unknown nid"}, | 80 | {OBJ_R_UNKNOWN_NID ,"unknown nid"}, |
78 | {0,NULL}, | 81 | {0,NULL} |
79 | }; | 82 | }; |
80 | 83 | ||
81 | #endif | 84 | #endif |
82 | 85 | ||
83 | void ERR_load_OBJ_strings() | 86 | void ERR_load_OBJ_strings(void) |
84 | { | 87 | { |
85 | static int init=1; | 88 | static int init=1; |
86 | 89 | ||
87 | if (init); | 90 | if (init) |
88 | {; | 91 | { |
89 | init=0; | 92 | init=0; |
90 | #ifndef NO_ERR | 93 | #ifndef OPENSSL_NO_ERR |
91 | ERR_load_strings(ERR_LIB_OBJ,OBJ_str_functs); | 94 | ERR_load_strings(ERR_LIB_OBJ,OBJ_str_functs); |
92 | ERR_load_strings(ERR_LIB_OBJ,OBJ_str_reasons); | 95 | ERR_load_strings(ERR_LIB_OBJ,OBJ_str_reasons); |
93 | #endif | 96 | #endif |
diff --git a/src/lib/libcrypto/objects/obj_lib.c b/src/lib/libcrypto/objects/obj_lib.c index 0a9c756197..b0b0f2ff24 100644 --- a/src/lib/libcrypto/objects/obj_lib.c +++ b/src/lib/libcrypto/objects/obj_lib.c | |||
@@ -58,27 +58,28 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "lhash.h" | 61 | #include <openssl/lhash.h> |
62 | #include "objects.h" | 62 | #include <openssl/objects.h> |
63 | #include "buffer.h" | 63 | #include <openssl/buffer.h> |
64 | 64 | ||
65 | ASN1_OBJECT *OBJ_dup(o) | 65 | ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o) |
66 | ASN1_OBJECT *o; | ||
67 | { | 66 | { |
68 | ASN1_OBJECT *r; | 67 | ASN1_OBJECT *r; |
69 | int i; | 68 | int i; |
69 | char *ln=NULL; | ||
70 | 70 | ||
71 | if (o == NULL) return(NULL); | 71 | if (o == NULL) return(NULL); |
72 | if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC)) | 72 | if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC)) |
73 | return(o); | 73 | return((ASN1_OBJECT *)o); /* XXX: ugh! Why? What kind of |
74 | duplication is this??? */ | ||
74 | 75 | ||
75 | r=(ASN1_OBJECT *)ASN1_OBJECT_new(); | 76 | r=ASN1_OBJECT_new(); |
76 | if (r == NULL) | 77 | if (r == NULL) |
77 | { | 78 | { |
78 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_ASN1_LIB); | 79 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_ASN1_LIB); |
79 | return(NULL); | 80 | return(NULL); |
80 | } | 81 | } |
81 | r->data=(unsigned char *)Malloc(o->length); | 82 | r->data=OPENSSL_malloc(o->length); |
82 | if (r->data == NULL) | 83 | if (r->data == NULL) |
83 | goto err; | 84 | goto err; |
84 | memcpy(r->data,o->data,o->length); | 85 | memcpy(r->data,o->data,o->length); |
@@ -88,35 +89,35 @@ ASN1_OBJECT *o; | |||
88 | if (o->ln != NULL) | 89 | if (o->ln != NULL) |
89 | { | 90 | { |
90 | i=strlen(o->ln)+1; | 91 | i=strlen(o->ln)+1; |
91 | r->ln=(char *)Malloc(i); | 92 | r->ln=ln=OPENSSL_malloc(i); |
92 | if (r->ln == NULL) goto err; | 93 | if (r->ln == NULL) goto err; |
93 | memcpy(r->ln,o->ln,i); | 94 | memcpy(ln,o->ln,i); |
94 | } | 95 | } |
95 | 96 | ||
96 | if (o->sn != NULL) | 97 | if (o->sn != NULL) |
97 | { | 98 | { |
99 | char *s; | ||
100 | |||
98 | i=strlen(o->sn)+1; | 101 | i=strlen(o->sn)+1; |
99 | r->sn=(char *)Malloc(i); | 102 | r->sn=s=OPENSSL_malloc(i); |
100 | if (r->sn == NULL) goto err; | 103 | if (r->sn == NULL) goto err; |
101 | memcpy(r->sn,o->sn,i); | 104 | memcpy(s,o->sn,i); |
102 | } | 105 | } |
103 | r->flags=o->flags|(ASN1_OBJECT_FLAG_DYNAMIC| | 106 | r->flags=o->flags|(ASN1_OBJECT_FLAG_DYNAMIC| |
104 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS); | 107 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS|ASN1_OBJECT_FLAG_DYNAMIC_DATA); |
105 | return(r); | 108 | return(r); |
106 | err: | 109 | err: |
107 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_MALLOC_FAILURE); | 110 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_MALLOC_FAILURE); |
108 | if (r != NULL) | 111 | if (r != NULL) |
109 | { | 112 | { |
110 | if (r->ln != NULL) Free(r->ln); | 113 | if (ln != NULL) OPENSSL_free(ln); |
111 | if (r->data != NULL) Free(r->data); | 114 | if (r->data != NULL) OPENSSL_free(r->data); |
112 | Free(r); | 115 | OPENSSL_free(r); |
113 | } | 116 | } |
114 | return(NULL); | 117 | return(NULL); |
115 | } | 118 | } |
116 | 119 | ||
117 | int OBJ_cmp(a,b) | 120 | int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b) |
118 | ASN1_OBJECT *a; | ||
119 | ASN1_OBJECT *b; | ||
120 | { | 121 | { |
121 | int ret; | 122 | int ret; |
122 | 123 | ||
diff --git a/src/lib/libcrypto/objects/obj_mac.num b/src/lib/libcrypto/objects/obj_mac.num index d73a51370f..02b39062fe 100644 --- a/src/lib/libcrypto/objects/obj_mac.num +++ b/src/lib/libcrypto/objects/obj_mac.num | |||
@@ -30,8 +30,8 @@ dhKeyAgreement 28 | |||
30 | des_ecb 29 | 30 | des_ecb 29 |
31 | des_cfb64 30 | 31 | des_cfb64 30 |
32 | des_cbc 31 | 32 | des_cbc 31 |
33 | des_ede 32 | 33 | des_ede_ecb 32 |
34 | des_ede3 33 | 34 | des_ede3_ecb 33 |
35 | idea_cbc 34 | 35 | idea_cbc 34 |
36 | idea_cfb64 35 | 36 | idea_cfb64 35 |
37 | idea_ecb 36 | 37 | idea_ecb 36 |
@@ -390,3 +390,120 @@ Enterprises 389 | |||
390 | dcObject 390 | 390 | dcObject 390 |
391 | domainComponent 391 | 391 | domainComponent 391 |
392 | Domain 392 | 392 | Domain 392 |
393 | joint_iso_ccitt 393 | ||
394 | selected_attribute_types 394 | ||
395 | clearance 395 | ||
396 | md4WithRSAEncryption 396 | ||
397 | ac_proxying 397 | ||
398 | sinfo_access 398 | ||
399 | id_aca_encAttrs 399 | ||
400 | role 400 | ||
401 | policy_constraints 401 | ||
402 | target_information 402 | ||
403 | no_rev_avail 403 | ||
404 | ccitt 404 | ||
405 | ansi_X9_62 405 | ||
406 | X9_62_prime_field 406 | ||
407 | X9_62_characteristic_two_field 407 | ||
408 | X9_62_id_ecPublicKey 408 | ||
409 | X9_62_prime192v1 409 | ||
410 | X9_62_prime192v2 410 | ||
411 | X9_62_prime192v3 411 | ||
412 | X9_62_prime239v1 412 | ||
413 | X9_62_prime239v2 413 | ||
414 | X9_62_prime239v3 414 | ||
415 | X9_62_prime256v1 415 | ||
416 | ecdsa_with_SHA1 416 | ||
417 | ms_csp_name 417 | ||
418 | aes_128_ecb 418 | ||
419 | aes_128_cbc 419 | ||
420 | aes_128_ofb128 420 | ||
421 | aes_128_cfb128 421 | ||
422 | aes_192_ecb 422 | ||
423 | aes_192_cbc 423 | ||
424 | aes_192_ofb128 424 | ||
425 | aes_192_cfb128 425 | ||
426 | aes_256_ecb 426 | ||
427 | aes_256_cbc 427 | ||
428 | aes_256_ofb128 428 | ||
429 | aes_256_cfb128 429 | ||
430 | hold_instruction_code 430 | ||
431 | hold_instruction_none 431 | ||
432 | hold_instruction_call_issuer 432 | ||
433 | hold_instruction_reject 433 | ||
434 | data 434 | ||
435 | pss 435 | ||
436 | ucl 436 | ||
437 | pilot 437 | ||
438 | pilotAttributeType 438 | ||
439 | pilotAttributeSyntax 439 | ||
440 | pilotObjectClass 440 | ||
441 | pilotGroups 441 | ||
442 | iA5StringSyntax 442 | ||
443 | caseIgnoreIA5StringSyntax 443 | ||
444 | pilotObject 444 | ||
445 | pilotPerson 445 | ||
446 | account 446 | ||
447 | document 447 | ||
448 | room 448 | ||
449 | documentSeries 449 | ||
450 | rFC822localPart 450 | ||
451 | dNSDomain 451 | ||
452 | domainRelatedObject 452 | ||
453 | friendlyCountry 453 | ||
454 | simpleSecurityObject 454 | ||
455 | pilotOrganization 455 | ||
456 | pilotDSA 456 | ||
457 | qualityLabelledData 457 | ||
458 | userId 458 | ||
459 | textEncodedORAddress 459 | ||
460 | rfc822Mailbox 460 | ||
461 | info 461 | ||
462 | favouriteDrink 462 | ||
463 | roomNumber 463 | ||
464 | photo 464 | ||
465 | userClass 465 | ||
466 | host 466 | ||
467 | manager 467 | ||
468 | documentIdentifier 468 | ||
469 | documentTitle 469 | ||
470 | documentVersion 470 | ||
471 | documentAuthor 471 | ||
472 | documentLocation 472 | ||
473 | homeTelephoneNumber 473 | ||
474 | secretary 474 | ||
475 | otherMailbox 475 | ||
476 | lastModifiedTime 476 | ||
477 | lastModifiedBy 477 | ||
478 | aRecord 478 | ||
479 | pilotAttributeType27 479 | ||
480 | mXRecord 480 | ||
481 | nSRecord 481 | ||
482 | sOARecord 482 | ||
483 | cNAMERecord 483 | ||
484 | associatedDomain 484 | ||
485 | associatedName 485 | ||
486 | homePostalAddress 486 | ||
487 | personalTitle 487 | ||
488 | mobileTelephoneNumber 488 | ||
489 | pagerTelephoneNumber 489 | ||
490 | friendlyCountryName 490 | ||
491 | organizationalStatus 491 | ||
492 | janetMailbox 492 | ||
493 | mailPreferenceOption 493 | ||
494 | buildingName 494 | ||
495 | dSAQuality 495 | ||
496 | singleLevelQuality 496 | ||
497 | subtreeMinimumQuality 497 | ||
498 | subtreeMaximumQuality 498 | ||
499 | personalSignature 499 | ||
500 | dITRedirect 500 | ||
501 | audio 501 | ||
502 | documentPublisher 502 | ||
503 | x500UniqueIdentifier 503 | ||
504 | mime_mhs 504 | ||
505 | mime_mhs_headings 505 | ||
506 | mime_mhs_bodies 506 | ||
507 | id_hex_partial_message 507 | ||
508 | id_hex_multipart_message 508 | ||
509 | generationQualifier 509 | ||
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h index e1d555b47c..de10532813 100644 --- a/src/lib/libcrypto/objects/objects.h +++ b/src/lib/libcrypto/objects/objects.h | |||
@@ -59,13 +59,15 @@ | |||
59 | #ifndef HEADER_OBJECTS_H | 59 | #ifndef HEADER_OBJECTS_H |
60 | #define HEADER_OBJECTS_H | 60 | #define HEADER_OBJECTS_H |
61 | 61 | ||
62 | #ifdef __cplusplus | 62 | #define USE_OBJ_MAC |
63 | extern "C" { | ||
64 | #endif | ||
65 | 63 | ||
64 | #ifdef USE_OBJ_MAC | ||
65 | #include <openssl/obj_mac.h> | ||
66 | #else | ||
66 | #define SN_undef "UNDEF" | 67 | #define SN_undef "UNDEF" |
67 | #define LN_undef "undefined" | 68 | #define LN_undef "undefined" |
68 | #define NID_undef 0 | 69 | #define NID_undef 0 |
70 | #define OBJ_undef 0L | ||
69 | 71 | ||
70 | #define SN_Algorithm "Algorithm" | 72 | #define SN_Algorithm "Algorithm" |
71 | #define LN_algorithm "algorithm" | 73 | #define LN_algorithm "algorithm" |
@@ -109,10 +111,12 @@ extern "C" { | |||
109 | #define NID_md5WithRSAEncryption 8 | 111 | #define NID_md5WithRSAEncryption 8 |
110 | #define OBJ_md5WithRSAEncryption OBJ_pkcs,1L,4L | 112 | #define OBJ_md5WithRSAEncryption OBJ_pkcs,1L,4L |
111 | 113 | ||
114 | #define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" | ||
112 | #define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" | 115 | #define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" |
113 | #define NID_pbeWithMD2AndDES_CBC 9 | 116 | #define NID_pbeWithMD2AndDES_CBC 9 |
114 | #define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs,5L,1L | 117 | #define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs,5L,1L |
115 | 118 | ||
119 | #define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" | ||
116 | #define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" | 120 | #define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" |
117 | #define NID_pbeWithMD5AndDES_CBC 10 | 121 | #define NID_pbeWithMD5AndDES_CBC 10 |
118 | #define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs,5L,3L | 122 | #define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs,5L,3L |
@@ -229,6 +233,7 @@ extern "C" { | |||
229 | #define SN_idea_cbc "IDEA-CBC" | 233 | #define SN_idea_cbc "IDEA-CBC" |
230 | #define LN_idea_cbc "idea-cbc" | 234 | #define LN_idea_cbc "idea-cbc" |
231 | #define NID_idea_cbc 34 | 235 | #define NID_idea_cbc 34 |
236 | #define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L | ||
232 | 237 | ||
233 | #define SN_idea_cfb64 "IDEA-CFB" | 238 | #define SN_idea_cfb64 "IDEA-CFB" |
234 | #define LN_idea_cfb64 "idea-cfb" | 239 | #define LN_idea_cfb64 "idea-cfb" |
@@ -379,17 +384,21 @@ extern "C" { | |||
379 | #define OBJ_dsa_2 OBJ_algorithm,12L | 384 | #define OBJ_dsa_2 OBJ_algorithm,12L |
380 | 385 | ||
381 | /* proposed by microsoft to RSA */ | 386 | /* proposed by microsoft to RSA */ |
387 | #define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" | ||
382 | #define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" | 388 | #define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" |
383 | #define NID_pbeWithSHA1AndRC2_CBC 68 | 389 | #define NID_pbeWithSHA1AndRC2_CBC 68 |
384 | #define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L | 390 | #define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L |
385 | 391 | ||
386 | /* proposed by microsoft to RSA */ | 392 | /* proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now |
387 | #define LN_pbeWithSHA1AndRC4 "pbeWithSHA1AndRC4" | 393 | * defined explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something |
388 | #define NID_pbeWithSHA1AndRC4 69 | 394 | * completely different. |
389 | #define OBJ_pbeWithSHA1AndRC4 OBJ_pkcs,5L,12L | 395 | */ |
396 | #define LN_id_pbkdf2 "PBKDF2" | ||
397 | #define NID_id_pbkdf2 69 | ||
398 | #define OBJ_id_pbkdf2 OBJ_pkcs,5L,12L | ||
390 | 399 | ||
391 | #define SN_dsaWithSHA1_2 "DSA-SHA1-old" | 400 | #define SN_dsaWithSHA1_2 "DSA-SHA1-old" |
392 | #define LN_dsaWithSHA1_2 "dsaWithSHA1" | 401 | #define LN_dsaWithSHA1_2 "dsaWithSHA1-old" |
393 | #define NID_dsaWithSHA1_2 70 | 402 | #define NID_dsaWithSHA1_2 70 |
394 | /* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */ | 403 | /* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */ |
395 | #define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L | 404 | #define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L |
@@ -443,58 +452,59 @@ extern "C" { | |||
443 | #define LN_desx_cbc "desx-cbc" | 452 | #define LN_desx_cbc "desx-cbc" |
444 | #define NID_desx_cbc 80 | 453 | #define NID_desx_cbc 80 |
445 | 454 | ||
446 | #define SN_ld_ce "ld-ce" | 455 | #define SN_id_ce "id-ce" |
447 | #define NID_ld_ce 81 | 456 | #define NID_id_ce 81 |
448 | #define OBJ_ld_ce 2L,5L,29L | 457 | #define OBJ_id_ce 2L,5L,29L |
449 | 458 | ||
450 | #define SN_subject_key_identifier "subjectKeyIdentifier" | 459 | #define SN_subject_key_identifier "subjectKeyIdentifier" |
451 | #define LN_subject_key_identifier "X509v3 Subject Key Identifier" | 460 | #define LN_subject_key_identifier "X509v3 Subject Key Identifier" |
452 | #define NID_subject_key_identifier 82 | 461 | #define NID_subject_key_identifier 82 |
453 | #define OBJ_subject_key_identifier OBJ_ld_ce,14L | 462 | #define OBJ_subject_key_identifier OBJ_id_ce,14L |
454 | 463 | ||
455 | #define SN_key_usage "keyUsage" | 464 | #define SN_key_usage "keyUsage" |
456 | #define LN_key_usage "X509v3 Key Usage" | 465 | #define LN_key_usage "X509v3 Key Usage" |
457 | #define NID_key_usage 83 | 466 | #define NID_key_usage 83 |
458 | #define OBJ_key_usage OBJ_ld_ce,15L | 467 | #define OBJ_key_usage OBJ_id_ce,15L |
459 | 468 | ||
460 | #define SN_private_key_usage_period "privateKeyUsagePeriod" | 469 | #define SN_private_key_usage_period "privateKeyUsagePeriod" |
461 | #define LN_private_key_usage_period "X509v3 Private Key Usage Period" | 470 | #define LN_private_key_usage_period "X509v3 Private Key Usage Period" |
462 | #define NID_private_key_usage_period 84 | 471 | #define NID_private_key_usage_period 84 |
463 | #define OBJ_private_key_usage_period OBJ_ld_ce,16L | 472 | #define OBJ_private_key_usage_period OBJ_id_ce,16L |
464 | 473 | ||
465 | #define SN_subject_alt_name "subjectAltName" | 474 | #define SN_subject_alt_name "subjectAltName" |
466 | #define LN_subject_alt_name "X509v3 Subject Alternative Name" | 475 | #define LN_subject_alt_name "X509v3 Subject Alternative Name" |
467 | #define NID_subject_alt_name 85 | 476 | #define NID_subject_alt_name 85 |
468 | #define OBJ_subject_alt_name OBJ_ld_ce,17L | 477 | #define OBJ_subject_alt_name OBJ_id_ce,17L |
469 | 478 | ||
470 | #define SN_issuer_alt_name "issuerAltName" | 479 | #define SN_issuer_alt_name "issuerAltName" |
471 | #define LN_issuer_alt_name "X509v3 Issuer Alternative Name" | 480 | #define LN_issuer_alt_name "X509v3 Issuer Alternative Name" |
472 | #define NID_issuer_alt_name 86 | 481 | #define NID_issuer_alt_name 86 |
473 | #define OBJ_issuer_alt_name OBJ_ld_ce,18L | 482 | #define OBJ_issuer_alt_name OBJ_id_ce,18L |
474 | 483 | ||
475 | #define SN_basic_constraints "basicConstraints" | 484 | #define SN_basic_constraints "basicConstraints" |
476 | #define LN_basic_constraints "X509v3 Basic Constraints" | 485 | #define LN_basic_constraints "X509v3 Basic Constraints" |
477 | #define NID_basic_constraints 87 | 486 | #define NID_basic_constraints 87 |
478 | #define OBJ_basic_constraints OBJ_ld_ce,19L | 487 | #define OBJ_basic_constraints OBJ_id_ce,19L |
479 | 488 | ||
480 | #define SN_crl_number "crlNumber" | 489 | #define SN_crl_number "crlNumber" |
481 | #define LN_crl_number "X509v3 CRL Number" | 490 | #define LN_crl_number "X509v3 CRL Number" |
482 | #define NID_crl_number 88 | 491 | #define NID_crl_number 88 |
483 | #define OBJ_crl_number OBJ_ld_ce,20L | 492 | #define OBJ_crl_number OBJ_id_ce,20L |
484 | 493 | ||
485 | #define SN_certificate_policies "certificatePolicies" | 494 | #define SN_certificate_policies "certificatePolicies" |
486 | #define LN_certificate_policies "X509v3 Certificate Policies" | 495 | #define LN_certificate_policies "X509v3 Certificate Policies" |
487 | #define NID_certificate_policies 89 | 496 | #define NID_certificate_policies 89 |
488 | #define OBJ_certificate_policies OBJ_ld_ce,32L | 497 | #define OBJ_certificate_policies OBJ_id_ce,32L |
489 | 498 | ||
490 | #define SN_authority_key_identifier "authorityKeyIdentifier" | 499 | #define SN_authority_key_identifier "authorityKeyIdentifier" |
491 | #define LN_authority_key_identifier "X509v3 Authority Key Identifier" | 500 | #define LN_authority_key_identifier "X509v3 Authority Key Identifier" |
492 | #define NID_authority_key_identifier 90 | 501 | #define NID_authority_key_identifier 90 |
493 | #define OBJ_authority_key_identifier OBJ_ld_ce,35L | 502 | #define OBJ_authority_key_identifier OBJ_id_ce,35L |
494 | 503 | ||
495 | #define SN_bf_cbc "BF-CBC" | 504 | #define SN_bf_cbc "BF-CBC" |
496 | #define LN_bf_cbc "bf-cbc" | 505 | #define LN_bf_cbc "bf-cbc" |
497 | #define NID_bf_cbc 91 | 506 | #define NID_bf_cbc 91 |
507 | #define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L | ||
498 | 508 | ||
499 | #define SN_bf_ecb "BF-ECB" | 509 | #define SN_bf_ecb "BF-ECB" |
500 | #define LN_bf_ecb "bf-ecb" | 510 | #define LN_bf_ecb "bf-ecb" |
@@ -550,7 +560,7 @@ extern "C" { | |||
550 | #define SN_crl_distribution_points "crlDistributionPoints" | 560 | #define SN_crl_distribution_points "crlDistributionPoints" |
551 | #define LN_crl_distribution_points "X509v3 CRL Distribution Points" | 561 | #define LN_crl_distribution_points "X509v3 CRL Distribution Points" |
552 | #define NID_crl_distribution_points 103 | 562 | #define NID_crl_distribution_points 103 |
553 | #define OBJ_crl_distribution_points OBJ_ld_ce,31L | 563 | #define OBJ_crl_distribution_points OBJ_id_ce,31L |
554 | 564 | ||
555 | #define SN_md5WithRSA "RSA-NP-MD5" | 565 | #define SN_md5WithRSA "RSA-NP-MD5" |
556 | #define LN_md5WithRSA "md5WithRSA" | 566 | #define LN_md5WithRSA "md5WithRSA" |
@@ -623,7 +633,7 @@ extern "C" { | |||
623 | #define OBJ_ripemd160 1L,3L,36L,3L,2L,1L | 633 | #define OBJ_ripemd160 1L,3L,36L,3L,2L,1L |
624 | 634 | ||
625 | /* The name should actually be rsaSignatureWithripemd160, but I'm going | 635 | /* The name should actually be rsaSignatureWithripemd160, but I'm going |
626 | * to contiune using the convention I'm using with the other ciphers */ | 636 | * to continue using the convention I'm using with the other ciphers */ |
627 | #define SN_ripemd160WithRSA "RSA-RIPEMD160" | 637 | #define SN_ripemd160WithRSA "RSA-RIPEMD160" |
628 | #define LN_ripemd160WithRSA "ripemd160WithRSA" | 638 | #define LN_ripemd160WithRSA "ripemd160WithRSA" |
629 | #define NID_ripemd160WithRSA 119 | 639 | #define NID_ripemd160WithRSA 119 |
@@ -654,56 +664,365 @@ extern "C" { | |||
654 | #define LN_rc5_ofb64 "rc5-ofb" | 664 | #define LN_rc5_ofb64 "rc5-ofb" |
655 | #define NID_rc5_ofb64 123 | 665 | #define NID_rc5_ofb64 123 |
656 | 666 | ||
657 | #include "bio.h" | 667 | #define SN_rle_compression "RLE" |
658 | #include "asn1.h" | 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_id_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_id_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_id_ce,21L | ||
659 | 760 | ||
660 | #define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) | 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_id_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 | ||
661 | 775 | ||
662 | #ifndef NOPROTO | 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 | ||
663 | 780 | ||
664 | ASN1_OBJECT * OBJ_dup(ASN1_OBJECT *o); | 781 | #define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" |
665 | ASN1_OBJECT * OBJ_nid2obj(int n); | 782 | #define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" |
666 | char * OBJ_nid2ln(int n); | 783 | #define NID_pbe_WithSHA1And40BitRC4 145 |
667 | char * OBJ_nid2sn(int n); | 784 | #define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids, 2L |
668 | int OBJ_obj2nid(ASN1_OBJECT *o); | ||
669 | int OBJ_txt2nid(char *s); | ||
670 | int OBJ_ln2nid(char *s); | ||
671 | int OBJ_sn2nid(char *s); | ||
672 | int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b); | ||
673 | char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)()); | ||
674 | 785 | ||
675 | void ERR_load_OBJ_strings(void ); | 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 | ||
676 | 809 | ||
677 | int OBJ_new_nid(int num); | 810 | #define LN_keyBag "keyBag" |
678 | int OBJ_add_object(ASN1_OBJECT *obj); | 811 | #define NID_keyBag 150 |
679 | int OBJ_create(char *oid,char *sn,char *ln); | 812 | #define OBJ_keyBag OBJ_pkcs12_BagIds, 1L |
680 | void OBJ_cleanup(void ); | 813 | |
681 | int OBJ_create_objects(BIO *in); | 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 | ||
682 | 833 | ||
683 | #else | 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 | ||
684 | 914 | ||
685 | ASN1_OBJECT * OBJ_dup(); | 915 | #define LN_ext_req "Extension Request" |
686 | ASN1_OBJECT * OBJ_nid2obj(); | 916 | #define SN_ext_req "extReq" |
687 | char * OBJ_nid2ln(); | 917 | #define NID_ext_req 172 |
688 | char * OBJ_nid2sn(); | 918 | #define OBJ_ext_req OBJ_pkcs9,14L |
689 | int OBJ_obj2nid(); | ||
690 | int OBJ_txt2nid(); | ||
691 | int OBJ_ln2nid(); | ||
692 | int OBJ_sn2nid(); | ||
693 | int OBJ_cmp(); | ||
694 | char * OBJ_bsearch(); | ||
695 | |||
696 | void ERR_load_OBJ_strings(); | ||
697 | |||
698 | int OBJ_new_nid(); | ||
699 | int OBJ_add_object(); | ||
700 | int OBJ_create(); | ||
701 | void OBJ_cleanup(); | ||
702 | int OBJ_create_objects(); | ||
703 | 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" { | ||
704 | #endif | 974 | #endif |
705 | 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 *), | ||
989 | int (*cmp_func)(const char *, const char *), | ||
990 | void (*free_func)(const char *, int, const char *)); | ||
991 | const char *OBJ_NAME_get(const char *name,int type); | ||
992 | int OBJ_NAME_add(const char *name,int type,const char *data); | ||
993 | int OBJ_NAME_remove(const char *name,int type); | ||
994 | void OBJ_NAME_cleanup(int type); /* -1 for everything */ | ||
995 | void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg), | ||
996 | void *arg); | ||
997 | void OBJ_NAME_do_all_sorted(int type,void (*fn)(const OBJ_NAME *,void *arg), | ||
998 | void *arg); | ||
999 | |||
1000 | ASN1_OBJECT * OBJ_dup(const ASN1_OBJECT *o); | ||
1001 | ASN1_OBJECT * OBJ_nid2obj(int n); | ||
1002 | const char * OBJ_nid2ln(int n); | ||
1003 | const char * OBJ_nid2sn(int n); | ||
1004 | int OBJ_obj2nid(const ASN1_OBJECT *o); | ||
1005 | ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name); | ||
1006 | int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name); | ||
1007 | int OBJ_txt2nid(const char *s); | ||
1008 | int OBJ_ln2nid(const char *s); | ||
1009 | int OBJ_sn2nid(const char *s); | ||
1010 | int OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b); | ||
1011 | const char * OBJ_bsearch(const char *key,const char *base,int num,int size, | ||
1012 | int (*cmp)(const void *, const void *)); | ||
1013 | |||
1014 | int OBJ_new_nid(int num); | ||
1015 | int OBJ_add_object(const ASN1_OBJECT *obj); | ||
1016 | int OBJ_create(const char *oid,const char *sn,const char *ln); | ||
1017 | void OBJ_cleanup(void ); | ||
1018 | int OBJ_create_objects(BIO *in); | ||
1019 | |||
706 | /* BEGIN ERROR CODES */ | 1020 | /* BEGIN ERROR CODES */ |
1021 | /* The following lines are auto generated by the script mkerr.pl. Any changes | ||
1022 | * made after this point may be overwritten when the script is next run. | ||
1023 | */ | ||
1024 | void ERR_load_OBJ_strings(void); | ||
1025 | |||
707 | /* Error codes for the OBJ functions. */ | 1026 | /* Error codes for the OBJ functions. */ |
708 | 1027 | ||
709 | /* Function codes. */ | 1028 | /* Function codes. */ |
@@ -716,9 +1035,8 @@ int OBJ_create_objects(); | |||
716 | /* Reason codes. */ | 1035 | /* Reason codes. */ |
717 | #define OBJ_R_MALLOC_FAILURE 100 | 1036 | #define OBJ_R_MALLOC_FAILURE 100 |
718 | #define OBJ_R_UNKNOWN_NID 101 | 1037 | #define OBJ_R_UNKNOWN_NID 101 |
719 | 1038 | ||
720 | #ifdef __cplusplus | 1039 | #ifdef __cplusplus |
721 | } | 1040 | } |
722 | #endif | 1041 | #endif |
723 | #endif | 1042 | #endif |
724 | |||
diff --git a/src/lib/libcrypto/objects/objects.pl b/src/lib/libcrypto/objects/objects.pl index c956bbb841..76c06cc8f9 100644 --- a/src/lib/libcrypto/objects/objects.pl +++ b/src/lib/libcrypto/objects/objects.pl | |||
@@ -9,7 +9,9 @@ while(<NUMIN>) | |||
9 | $o++; | 9 | $o++; |
10 | s/#.*$//; | 10 | s/#.*$//; |
11 | next if /^\s*$/; | 11 | next if /^\s*$/; |
12 | $_ = 'X'.$_; | ||
12 | ($Cname,$mynum) = split; | 13 | ($Cname,$mynum) = split; |
14 | $Cname =~ s/^X//; | ||
13 | if (defined($nidn{$mynum})) | 15 | if (defined($nidn{$mynum})) |
14 | { die "$ARGV[1]:$o:There's already an object with NID ",$mynum," on line ",$order{$mynum},"\n"; } | 16 | { die "$ARGV[1]:$o:There's already an object with NID ",$mynum," on line ",$order{$mynum},"\n"; } |
15 | $nid{$Cname} = $mynum; | 17 | $nid{$Cname} = $mynum; |
@@ -114,7 +116,13 @@ close NUMOUT; | |||
114 | 116 | ||
115 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; | 117 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; |
116 | print OUT <<'EOF'; | 118 | print OUT <<'EOF'; |
117 | /* lib/obj/obj_mac.h */ | 119 | /* crypto/objects/obj_mac.h */ |
120 | |||
121 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
122 | * following command: | ||
123 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
124 | */ | ||
125 | |||
118 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 126 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
119 | * All rights reserved. | 127 | * All rights reserved. |
120 | * | 128 | * |
@@ -172,11 +180,6 @@ print OUT <<'EOF'; | |||
172 | * [including the GNU Public Licence.] | 180 | * [including the GNU Public Licence.] |
173 | */ | 181 | */ |
174 | 182 | ||
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" | 183 | #define SN_undef "UNDEF" |
181 | #define LN_undef "undefined" | 184 | #define LN_undef "undefined" |
182 | #define NID_undef 0 | 185 | #define NID_undef 0 |
@@ -207,6 +210,8 @@ sub process_oid | |||
207 | if (!($a[0] =~ /^[0-9]+$/)) | 210 | if (!($a[0] =~ /^[0-9]+$/)) |
208 | { | 211 | { |
209 | $a[0] =~ s/-/_/g; | 212 | $a[0] =~ s/-/_/g; |
213 | if (!defined($obj{$a[0]})) | ||
214 | { die "$ARGV[0]:$o:Undefined identifier ",$a[0],"\n"; } | ||
210 | $pref_oid = "OBJ_" . $a[0]; | 215 | $pref_oid = "OBJ_" . $a[0]; |
211 | $pref_sep = ","; | 216 | $pref_sep = ","; |
212 | shift @a; | 217 | shift @a; |
diff --git a/src/lib/libcrypto/objects/objects.txt b/src/lib/libcrypto/objects/objects.txt index cb276e90e9..65d0b15629 100644 --- a/src/lib/libcrypto/objects/objects.txt +++ b/src/lib/libcrypto/objects/objects.txt | |||
@@ -1,40 +1,764 @@ | |||
1 | 1 2 : ISO member bodies | 1 | 0 : CCITT : ccitt |
2 | 1 2 840 : US (ANSI) | 2 | |
3 | 1 2 840 113549 : rsadsi : RSA Data Security, Inc. | 3 | 1 : ISO : iso |
4 | 1 2 840 113549 1 : pkcs : RSA Data Security, Inc. PKCS | 4 | |
5 | 1 2 840 113549 1 1 1 : rsaEncryption | 5 | 2 : JOINT-ISO-CCITT : joint-iso-ccitt |
6 | 1 2 840 113549 1 1 2 : md2withRSAEncryption | 6 | |
7 | 1 2 840 113549 1 1 4 : md5withRSAEncryption | 7 | iso 2 : member-body : ISO Member Body |
8 | 1 2 840 113549 1 7 : pkcs-7 | 8 | |
9 | 1 2 840 113549 1 7 1 : pkcs-7-data | 9 | joint-iso-ccitt 5 1 5 : selected-attribute-types : Selected Attribute Types |
10 | 1 2 840 113549 1 7 2 : pkcs-7-signedData | 10 | |
11 | 1 2 840 113549 1 7 3 : pkcs-7-envelopedData | 11 | selected-attribute-types 55 : clearance |
12 | 1 2 840 113549 1 7 4 : pkcs-7-signedAndEnvelopedData | 12 | |
13 | 1 2 840 113549 1 7 5 : pkcs-7-digestData | 13 | member-body 840 : ISO-US : ISO US Member Body |
14 | 1 2 840 113549 1 7 6 : pkcs-7-encryptedData | 14 | ISO-US 10040 : X9-57 : X9.57 |
15 | 1 2 840 113549 2 2 : md2 | 15 | X9-57 4 : X9cm : X9.57 CM ? |
16 | 1 2 840 113549 2 4 : md4 | 16 | |
17 | 1 2 840 113549 2 5 : md5 | 17 | !Cname dsa |
18 | 1 2 840 113549 3 4 : rc4 | 18 | X9cm 1 : DSA : dsaEncryption |
19 | 1 2 840 113549 5 1 : pbeWithMD2AndDES_CBC | 19 | X9cm 3 : DSA-SHA1 : dsaWithSHA1 |
20 | 1 2 840 113549 5 3 : pbeWithMD5AndDES_CBC | 20 | |
21 | 2 5 : X500 : directory services (X.500) | 21 | |
22 | 2 5 4 : X509 | 22 | ISO-US 10045 : ansi-X9-62 : ANSI X9.62 |
23 | 2 5 4 3 : commonName | 23 | !module X9-62 |
24 | 2 5 4 6 : countryName | 24 | !Alias id-fieldType ansi-X9-62 1 |
25 | 2 5 4 7 : localityName | 25 | X9-62_id-fieldType 1 : prime-field |
26 | 2 5 4 8 : stateOrProvinceName | 26 | X9-62_id-fieldType 2 : characteristic-two-field |
27 | 2 5 4 10 : organizationName | 27 | # ... characteristic-two-field OID subtree |
28 | 2 5 4 11 : organizationalUnitName | 28 | !Alias id-publicKeyType ansi-X9-62 2 |
29 | 2 5 8 : directory services - algorithms | 29 | X9-62_id-publicKeyType 1 : id-ecPublicKey |
30 | 2 5 8 1 1 : rsa | 30 | !Alias ellipticCurve ansi-X9-62 3 |
31 | 31 | !Alias c-TwoCurve X9-62_ellipticCurve 0 | |
32 | algorithm 18 : sha | 32 | # ... characteristic 2 curve OIDs |
33 | encryptionAlgorithm 1 : rsa | 33 | !Alias primeCurve X9-62_ellipticCurve 1 |
34 | X9-62_primeCurve 1 : prime192v1 | ||
35 | X9-62_primeCurve 2 : prime192v2 | ||
36 | X9-62_primeCurve 3 : prime192v3 | ||
37 | X9-62_primeCurve 4 : prime239v1 | ||
38 | X9-62_primeCurve 5 : prime239v2 | ||
39 | X9-62_primeCurve 6 : prime239v3 | ||
40 | X9-62_primeCurve 7 : prime256v1 | ||
41 | !Alias id-ecSigType ansi-X9-62 4 | ||
42 | !global | ||
43 | X9-62_id-ecSigType 1 : ecdsa-with-SHA1 | ||
44 | |||
45 | |||
46 | |||
47 | ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc | ||
48 | : CAST5-ECB : cast5-ecb | ||
49 | !Cname cast5-cfb64 | ||
50 | : CAST5-CFB : cast5-cfb | ||
51 | !Cname cast5-ofb64 | ||
52 | : CAST5-OFB : cast5-ofb | ||
53 | !Cname pbeWithMD5AndCast5-CBC | ||
54 | ISO-US 113533 7 66 12 : : pbeWithMD5AndCast5CBC | ||
55 | |||
56 | ISO-US 113549 : rsadsi : RSA Data Security, Inc. | ||
57 | |||
58 | rsadsi 1 : pkcs : RSA Data Security, Inc. PKCS | ||
59 | |||
60 | pkcs 1 : pkcs1 | ||
61 | pkcs1 1 : : rsaEncryption | ||
62 | pkcs1 2 : RSA-MD2 : md2WithRSAEncryption | ||
63 | pkcs1 3 : RSA-MD4 : md4WithRSAEncryption | ||
64 | pkcs1 4 : RSA-MD5 : md5WithRSAEncryption | ||
65 | pkcs1 5 : RSA-SHA1 : sha1WithRSAEncryption | ||
66 | |||
67 | pkcs 3 : pkcs3 | ||
68 | pkcs3 1 : : dhKeyAgreement | ||
69 | |||
70 | pkcs 5 : pkcs5 | ||
71 | pkcs5 1 : PBE-MD2-DES : pbeWithMD2AndDES-CBC | ||
72 | pkcs5 3 : PBE-MD5-DES : pbeWithMD5AndDES-CBC | ||
73 | pkcs5 4 : PBE-MD2-RC2-64 : pbeWithMD2AndRC2-CBC | ||
74 | pkcs5 6 : PBE-MD5-RC2-64 : pbeWithMD5AndRC2-CBC | ||
75 | pkcs5 10 : PBE-SHA1-DES : pbeWithSHA1AndDES-CBC | ||
76 | pkcs5 11 : PBE-SHA1-RC2-64 : pbeWithSHA1AndRC2-CBC | ||
77 | !Cname id_pbkdf2 | ||
78 | pkcs5 12 : : PBKDF2 | ||
79 | !Cname pbes2 | ||
80 | pkcs5 13 : : PBES2 | ||
81 | !Cname pbmac1 | ||
82 | pkcs5 14 : : PBMAC1 | ||
83 | |||
84 | pkcs 7 : pkcs7 | ||
85 | pkcs7 1 : : pkcs7-data | ||
86 | !Cname pkcs7-signed | ||
87 | pkcs7 2 : : pkcs7-signedData | ||
88 | !Cname pkcs7-enveloped | ||
89 | pkcs7 3 : : pkcs7-envelopedData | ||
90 | !Cname pkcs7-signedAndEnveloped | ||
91 | pkcs7 4 : : pkcs7-signedAndEnvelopedData | ||
92 | !Cname pkcs7-digest | ||
93 | pkcs7 5 : : pkcs7-digestData | ||
94 | !Cname pkcs7-encrypted | ||
95 | pkcs7 6 : : pkcs7-encryptedData | ||
96 | |||
97 | pkcs 9 : pkcs9 | ||
98 | !module pkcs9 | ||
99 | pkcs9 1 : : emailAddress | ||
100 | pkcs9 2 : : unstructuredName | ||
101 | pkcs9 3 : : contentType | ||
102 | pkcs9 4 : : messageDigest | ||
103 | pkcs9 5 : : signingTime | ||
104 | pkcs9 6 : : countersignature | ||
105 | pkcs9 7 : : challengePassword | ||
106 | pkcs9 8 : : unstructuredAddress | ||
107 | !Cname extCertAttributes | ||
108 | pkcs9 9 : : extendedCertificateAttributes | ||
109 | !global | ||
110 | |||
111 | !Cname ext-req | ||
112 | pkcs9 14 : extReq : Extension Request | ||
113 | |||
114 | !Cname SMIMECapabilities | ||
115 | pkcs9 15 : SMIME-CAPS : S/MIME Capabilities | ||
116 | |||
117 | # S/MIME | ||
118 | !Cname SMIME | ||
119 | pkcs9 16 : SMIME : S/MIME | ||
120 | SMIME 0 : id-smime-mod | ||
121 | SMIME 1 : id-smime-ct | ||
122 | SMIME 2 : id-smime-aa | ||
123 | SMIME 3 : id-smime-alg | ||
124 | SMIME 4 : id-smime-cd | ||
125 | SMIME 5 : id-smime-spq | ||
126 | SMIME 6 : id-smime-cti | ||
127 | |||
128 | # S/MIME Modules | ||
129 | id-smime-mod 1 : id-smime-mod-cms | ||
130 | id-smime-mod 2 : id-smime-mod-ess | ||
131 | id-smime-mod 3 : id-smime-mod-oid | ||
132 | id-smime-mod 4 : id-smime-mod-msg-v3 | ||
133 | id-smime-mod 5 : id-smime-mod-ets-eSignature-88 | ||
134 | id-smime-mod 6 : id-smime-mod-ets-eSignature-97 | ||
135 | id-smime-mod 7 : id-smime-mod-ets-eSigPolicy-88 | ||
136 | id-smime-mod 8 : id-smime-mod-ets-eSigPolicy-97 | ||
137 | |||
138 | # S/MIME Content Types | ||
139 | id-smime-ct 1 : id-smime-ct-receipt | ||
140 | id-smime-ct 2 : id-smime-ct-authData | ||
141 | id-smime-ct 3 : id-smime-ct-publishCert | ||
142 | id-smime-ct 4 : id-smime-ct-TSTInfo | ||
143 | id-smime-ct 5 : id-smime-ct-TDTInfo | ||
144 | id-smime-ct 6 : id-smime-ct-contentInfo | ||
145 | id-smime-ct 7 : id-smime-ct-DVCSRequestData | ||
146 | id-smime-ct 8 : id-smime-ct-DVCSResponseData | ||
147 | |||
148 | # S/MIME Attributes | ||
149 | id-smime-aa 1 : id-smime-aa-receiptRequest | ||
150 | id-smime-aa 2 : id-smime-aa-securityLabel | ||
151 | id-smime-aa 3 : id-smime-aa-mlExpandHistory | ||
152 | id-smime-aa 4 : id-smime-aa-contentHint | ||
153 | id-smime-aa 5 : id-smime-aa-msgSigDigest | ||
154 | # obsolete | ||
155 | id-smime-aa 6 : id-smime-aa-encapContentType | ||
156 | id-smime-aa 7 : id-smime-aa-contentIdentifier | ||
157 | # obsolete | ||
158 | id-smime-aa 8 : id-smime-aa-macValue | ||
159 | id-smime-aa 9 : id-smime-aa-equivalentLabels | ||
160 | id-smime-aa 10 : id-smime-aa-contentReference | ||
161 | id-smime-aa 11 : id-smime-aa-encrypKeyPref | ||
162 | id-smime-aa 12 : id-smime-aa-signingCertificate | ||
163 | id-smime-aa 13 : id-smime-aa-smimeEncryptCerts | ||
164 | id-smime-aa 14 : id-smime-aa-timeStampToken | ||
165 | id-smime-aa 15 : id-smime-aa-ets-sigPolicyId | ||
166 | id-smime-aa 16 : id-smime-aa-ets-commitmentType | ||
167 | id-smime-aa 17 : id-smime-aa-ets-signerLocation | ||
168 | id-smime-aa 18 : id-smime-aa-ets-signerAttr | ||
169 | id-smime-aa 19 : id-smime-aa-ets-otherSigCert | ||
170 | id-smime-aa 20 : id-smime-aa-ets-contentTimestamp | ||
171 | id-smime-aa 21 : id-smime-aa-ets-CertificateRefs | ||
172 | id-smime-aa 22 : id-smime-aa-ets-RevocationRefs | ||
173 | id-smime-aa 23 : id-smime-aa-ets-certValues | ||
174 | id-smime-aa 24 : id-smime-aa-ets-revocationValues | ||
175 | id-smime-aa 25 : id-smime-aa-ets-escTimeStamp | ||
176 | id-smime-aa 26 : id-smime-aa-ets-certCRLTimestamp | ||
177 | id-smime-aa 27 : id-smime-aa-ets-archiveTimeStamp | ||
178 | id-smime-aa 28 : id-smime-aa-signatureType | ||
179 | id-smime-aa 29 : id-smime-aa-dvcs-dvc | ||
180 | |||
181 | # S/MIME Algorithm Identifiers | ||
182 | # obsolete | ||
183 | id-smime-alg 1 : id-smime-alg-ESDHwith3DES | ||
184 | # obsolete | ||
185 | id-smime-alg 2 : id-smime-alg-ESDHwithRC2 | ||
186 | # obsolete | ||
187 | id-smime-alg 3 : id-smime-alg-3DESwrap | ||
188 | # obsolete | ||
189 | id-smime-alg 4 : id-smime-alg-RC2wrap | ||
190 | id-smime-alg 5 : id-smime-alg-ESDH | ||
191 | id-smime-alg 6 : id-smime-alg-CMS3DESwrap | ||
192 | id-smime-alg 7 : id-smime-alg-CMSRC2wrap | ||
193 | |||
194 | # S/MIME Certificate Distribution | ||
195 | id-smime-cd 1 : id-smime-cd-ldap | ||
196 | |||
197 | # S/MIME Signature Policy Qualifier | ||
198 | id-smime-spq 1 : id-smime-spq-ets-sqt-uri | ||
199 | id-smime-spq 2 : id-smime-spq-ets-sqt-unotice | ||
200 | |||
201 | # S/MIME Commitment Type Identifier | ||
202 | id-smime-cti 1 : id-smime-cti-ets-proofOfOrigin | ||
203 | id-smime-cti 2 : id-smime-cti-ets-proofOfReceipt | ||
204 | id-smime-cti 3 : id-smime-cti-ets-proofOfDelivery | ||
205 | id-smime-cti 4 : id-smime-cti-ets-proofOfSender | ||
206 | id-smime-cti 5 : id-smime-cti-ets-proofOfApproval | ||
207 | id-smime-cti 6 : id-smime-cti-ets-proofOfCreation | ||
208 | |||
209 | pkcs9 20 : : friendlyName | ||
210 | pkcs9 21 : : localKeyID | ||
211 | !Cname ms-csp-name | ||
212 | 1 3 6 1 4 1 311 17 1 : CSPName : Microsoft CSP Name | ||
213 | !Alias certTypes pkcs9 22 | ||
214 | certTypes 1 : : x509Certificate | ||
215 | certTypes 2 : : sdsiCertificate | ||
216 | !Alias crlTypes pkcs9 23 | ||
217 | crlTypes 1 : : x509Crl | ||
218 | |||
219 | !Alias pkcs12 pkcs 12 | ||
220 | !Alias pkcs12-pbeids pkcs12 1 | ||
221 | |||
222 | !Cname pbe-WithSHA1And128BitRC4 | ||
223 | pkcs12-pbeids 1 : PBE-SHA1-RC4-128 : pbeWithSHA1And128BitRC4 | ||
224 | !Cname pbe-WithSHA1And40BitRC4 | ||
225 | pkcs12-pbeids 2 : PBE-SHA1-RC4-40 : pbeWithSHA1And40BitRC4 | ||
226 | !Cname pbe-WithSHA1And3_Key_TripleDES-CBC | ||
227 | pkcs12-pbeids 3 : PBE-SHA1-3DES : pbeWithSHA1And3-KeyTripleDES-CBC | ||
228 | !Cname pbe-WithSHA1And2_Key_TripleDES-CBC | ||
229 | pkcs12-pbeids 4 : PBE-SHA1-2DES : pbeWithSHA1And2-KeyTripleDES-CBC | ||
230 | !Cname pbe-WithSHA1And128BitRC2-CBC | ||
231 | pkcs12-pbeids 5 : PBE-SHA1-RC2-128 : pbeWithSHA1And128BitRC2-CBC | ||
232 | !Cname pbe-WithSHA1And40BitRC2-CBC | ||
233 | pkcs12-pbeids 6 : PBE-SHA1-RC2-40 : pbeWithSHA1And40BitRC2-CBC | ||
234 | |||
235 | !Alias pkcs12-Version1 pkcs12 10 | ||
236 | !Alias pkcs12-BagIds pkcs12-Version1 1 | ||
237 | pkcs12-BagIds 1 : : keyBag | ||
238 | pkcs12-BagIds 2 : : pkcs8ShroudedKeyBag | ||
239 | pkcs12-BagIds 3 : : certBag | ||
240 | pkcs12-BagIds 4 : : crlBag | ||
241 | pkcs12-BagIds 5 : : secretBag | ||
242 | pkcs12-BagIds 6 : : safeContentsBag | ||
243 | |||
244 | rsadsi 2 2 : MD2 : md2 | ||
245 | rsadsi 2 4 : MD4 : md4 | ||
246 | rsadsi 2 5 : MD5 : md5 | ||
247 | : MD5-SHA1 : md5-sha1 | ||
248 | rsadsi 2 7 : : hmacWithSHA1 | ||
249 | rsadsi 3 2 : RC2-CBC : rc2-cbc | ||
250 | : RC2-ECB : rc2-ecb | ||
251 | !Cname rc2-cfb64 | ||
252 | : RC2-CFB : rc2-cfb | ||
253 | !Cname rc2-ofb64 | ||
254 | : RC2-OFB : rc2-ofb | ||
255 | : RC2-40-CBC : rc2-40-cbc | ||
256 | : RC2-64-CBC : rc2-64-cbc | ||
257 | rsadsi 3 4 : RC4 : rc4 | ||
258 | : RC4-40 : rc4-40 | ||
259 | rsadsi 3 7 : DES-EDE3-CBC : des-ede3-cbc | ||
260 | rsadsi 3 8 : RC5-CBC : rc5-cbc | ||
261 | : RC5-ECB : rc5-ecb | ||
262 | !Cname rc5-cfb64 | ||
263 | : RC5-CFB : rc5-cfb | ||
264 | !Cname rc5-ofb64 | ||
265 | : RC5-OFB : rc5-ofb | ||
266 | |||
267 | !Cname ms-ext-req | ||
268 | 1 3 6 1 4 1 311 2 1 14 : msExtReq : Microsoft Extension Request | ||
269 | !Cname ms-code-ind | ||
270 | 1 3 6 1 4 1 311 2 1 21 : msCodeInd : Microsoft Individual Code Signing | ||
271 | !Cname ms-code-com | ||
272 | 1 3 6 1 4 1 311 2 1 22 : msCodeCom : Microsoft Commercial Code Signing | ||
273 | !Cname ms-ctl-sign | ||
274 | 1 3 6 1 4 1 311 10 3 1 : msCTLSign : Microsoft Trust List Signing | ||
275 | !Cname ms-sgc | ||
276 | 1 3 6 1 4 1 311 10 3 3 : msSGC : Microsoft Server Gated Crypto | ||
277 | !Cname ms-efs | ||
278 | 1 3 6 1 4 1 311 10 3 4 : msEFS : Microsoft Encrypted File System | ||
279 | |||
280 | 1 3 6 1 4 1 188 7 1 1 2 : IDEA-CBC : idea-cbc | ||
281 | : IDEA-ECB : idea-ecb | ||
282 | !Cname idea-cfb64 | ||
283 | : IDEA-CFB : idea-cfb | ||
284 | !Cname idea-ofb64 | ||
285 | : IDEA-OFB : idea-ofb | ||
286 | |||
287 | 1 3 6 1 4 1 3029 1 2 : BF-CBC : bf-cbc | ||
288 | : BF-ECB : bf-ecb | ||
289 | !Cname bf-cfb64 | ||
290 | : BF-CFB : bf-cfb | ||
291 | !Cname bf-ofb64 | ||
292 | : BF-OFB : bf-ofb | ||
293 | |||
294 | !Cname id-pkix | ||
295 | 1 3 6 1 5 5 7 : PKIX | ||
296 | |||
297 | # PKIX Arcs | ||
298 | id-pkix 0 : id-pkix-mod | ||
299 | id-pkix 1 : id-pe | ||
300 | id-pkix 2 : id-qt | ||
301 | id-pkix 3 : id-kp | ||
302 | id-pkix 4 : id-it | ||
303 | id-pkix 5 : id-pkip | ||
304 | id-pkix 6 : id-alg | ||
305 | id-pkix 7 : id-cmc | ||
306 | id-pkix 8 : id-on | ||
307 | id-pkix 9 : id-pda | ||
308 | id-pkix 10 : id-aca | ||
309 | id-pkix 11 : id-qcs | ||
310 | id-pkix 12 : id-cct | ||
311 | id-pkix 48 : id-ad | ||
312 | |||
313 | # PKIX Modules | ||
314 | id-pkix-mod 1 : id-pkix1-explicit-88 | ||
315 | id-pkix-mod 2 : id-pkix1-implicit-88 | ||
316 | id-pkix-mod 3 : id-pkix1-explicit-93 | ||
317 | id-pkix-mod 4 : id-pkix1-implicit-93 | ||
318 | id-pkix-mod 5 : id-mod-crmf | ||
319 | id-pkix-mod 6 : id-mod-cmc | ||
320 | id-pkix-mod 7 : id-mod-kea-profile-88 | ||
321 | id-pkix-mod 8 : id-mod-kea-profile-93 | ||
322 | id-pkix-mod 9 : id-mod-cmp | ||
323 | id-pkix-mod 10 : id-mod-qualified-cert-88 | ||
324 | id-pkix-mod 11 : id-mod-qualified-cert-93 | ||
325 | id-pkix-mod 12 : id-mod-attribute-cert | ||
326 | id-pkix-mod 13 : id-mod-timestamp-protocol | ||
327 | id-pkix-mod 14 : id-mod-ocsp | ||
328 | id-pkix-mod 15 : id-mod-dvcs | ||
329 | id-pkix-mod 16 : id-mod-cmp2000 | ||
330 | |||
331 | # PKIX Private Extensions | ||
332 | !Cname info-access | ||
333 | id-pe 1 : authorityInfoAccess : Authority Information Access | ||
334 | id-pe 2 : biometricInfo : Biometric Info | ||
335 | id-pe 3 : qcStatements | ||
336 | id-pe 4 : ac-auditEntity | ||
337 | id-pe 5 : ac-targeting | ||
338 | id-pe 6 : aaControls | ||
339 | id-pe 7 : sbqp-ipAddrBlock | ||
340 | id-pe 8 : sbqp-autonomousSysNum | ||
341 | id-pe 9 : sbqp-routerIdentifier | ||
342 | id-pe 10 : ac-proxying | ||
343 | !Cname sinfo-access | ||
344 | id-pe 11 : subjectInfoAccess : Subject Information Access | ||
345 | |||
346 | # PKIX policyQualifiers for Internet policy qualifiers | ||
347 | id-qt 1 : id-qt-cps : Policy Qualifier CPS | ||
348 | id-qt 2 : id-qt-unotice : Policy Qualifier User Notice | ||
349 | id-qt 3 : textNotice | ||
350 | |||
351 | # PKIX key purpose identifiers | ||
352 | !Cname server-auth | ||
353 | id-kp 1 : serverAuth : TLS Web Server Authentication | ||
354 | !Cname client-auth | ||
355 | id-kp 2 : clientAuth : TLS Web Client Authentication | ||
356 | !Cname code-sign | ||
357 | id-kp 3 : codeSigning : Code Signing | ||
358 | !Cname email-protect | ||
359 | id-kp 4 : emailProtection : E-mail Protection | ||
360 | id-kp 5 : ipsecEndSystem : IPSec End System | ||
361 | id-kp 6 : ipsecTunnel : IPSec Tunnel | ||
362 | id-kp 7 : ipsecUser : IPSec User | ||
363 | !Cname time-stamp | ||
364 | id-kp 8 : timeStamping : Time Stamping | ||
365 | # From OCSP spec RFC2560 | ||
366 | !Cname OCSP-sign | ||
367 | id-kp 9 : OCSPSigning : OCSP Signing | ||
368 | id-kp 10 : DVCS : dvcs | ||
369 | |||
370 | # CMP information types | ||
371 | id-it 1 : id-it-caProtEncCert | ||
372 | id-it 2 : id-it-signKeyPairTypes | ||
373 | id-it 3 : id-it-encKeyPairTypes | ||
374 | id-it 4 : id-it-preferredSymmAlg | ||
375 | id-it 5 : id-it-caKeyUpdateInfo | ||
376 | id-it 6 : id-it-currentCRL | ||
377 | id-it 7 : id-it-unsupportedOIDs | ||
378 | # obsolete | ||
379 | id-it 8 : id-it-subscriptionRequest | ||
380 | # obsolete | ||
381 | id-it 9 : id-it-subscriptionResponse | ||
382 | id-it 10 : id-it-keyPairParamReq | ||
383 | id-it 11 : id-it-keyPairParamRep | ||
384 | id-it 12 : id-it-revPassphrase | ||
385 | id-it 13 : id-it-implicitConfirm | ||
386 | id-it 14 : id-it-confirmWaitTime | ||
387 | id-it 15 : id-it-origPKIMessage | ||
388 | |||
389 | # CRMF registration | ||
390 | id-pkip 1 : id-regCtrl | ||
391 | id-pkip 2 : id-regInfo | ||
392 | |||
393 | # CRMF registration controls | ||
394 | id-regCtrl 1 : id-regCtrl-regToken | ||
395 | id-regCtrl 2 : id-regCtrl-authenticator | ||
396 | id-regCtrl 3 : id-regCtrl-pkiPublicationInfo | ||
397 | id-regCtrl 4 : id-regCtrl-pkiArchiveOptions | ||
398 | id-regCtrl 5 : id-regCtrl-oldCertID | ||
399 | id-regCtrl 6 : id-regCtrl-protocolEncrKey | ||
400 | |||
401 | # CRMF registration information | ||
402 | id-regInfo 1 : id-regInfo-utf8Pairs | ||
403 | id-regInfo 2 : id-regInfo-certReq | ||
404 | |||
405 | # algorithms | ||
406 | id-alg 1 : id-alg-des40 | ||
407 | id-alg 2 : id-alg-noSignature | ||
408 | id-alg 3 : id-alg-dh-sig-hmac-sha1 | ||
409 | id-alg 4 : id-alg-dh-pop | ||
410 | |||
411 | # CMC controls | ||
412 | id-cmc 1 : id-cmc-statusInfo | ||
413 | id-cmc 2 : id-cmc-identification | ||
414 | id-cmc 3 : id-cmc-identityProof | ||
415 | id-cmc 4 : id-cmc-dataReturn | ||
416 | id-cmc 5 : id-cmc-transactionId | ||
417 | id-cmc 6 : id-cmc-senderNonce | ||
418 | id-cmc 7 : id-cmc-recipientNonce | ||
419 | id-cmc 8 : id-cmc-addExtensions | ||
420 | id-cmc 9 : id-cmc-encryptedPOP | ||
421 | id-cmc 10 : id-cmc-decryptedPOP | ||
422 | id-cmc 11 : id-cmc-lraPOPWitness | ||
423 | id-cmc 15 : id-cmc-getCert | ||
424 | id-cmc 16 : id-cmc-getCRL | ||
425 | id-cmc 17 : id-cmc-revokeRequest | ||
426 | id-cmc 18 : id-cmc-regInfo | ||
427 | id-cmc 19 : id-cmc-responseInfo | ||
428 | id-cmc 21 : id-cmc-queryPending | ||
429 | id-cmc 22 : id-cmc-popLinkRandom | ||
430 | id-cmc 23 : id-cmc-popLinkWitness | ||
431 | id-cmc 24 : id-cmc-confirmCertAcceptance | ||
432 | |||
433 | # other names | ||
434 | id-on 1 : id-on-personalData | ||
435 | |||
436 | # personal data attributes | ||
437 | id-pda 1 : id-pda-dateOfBirth | ||
438 | id-pda 2 : id-pda-placeOfBirth | ||
439 | id-pda 3 : id-pda-gender | ||
440 | id-pda 4 : id-pda-countryOfCitizenship | ||
441 | id-pda 5 : id-pda-countryOfResidence | ||
442 | |||
443 | # attribute certificate attributes | ||
444 | id-aca 1 : id-aca-authenticationInfo | ||
445 | id-aca 2 : id-aca-accessIdentity | ||
446 | id-aca 3 : id-aca-chargingIdentity | ||
447 | id-aca 4 : id-aca-group | ||
448 | # attention : the following seems to be obsolete, replace by 'role' | ||
449 | id-aca 5 : id-aca-role | ||
450 | id-aca 6 : id-aca-encAttrs | ||
451 | |||
452 | # qualified certificate statements | ||
453 | id-qcs 1 : id-qcs-pkixQCSyntax-v1 | ||
454 | |||
455 | # CMC content types | ||
456 | id-cct 1 : id-cct-crs | ||
457 | id-cct 2 : id-cct-PKIData | ||
458 | id-cct 3 : id-cct-PKIResponse | ||
459 | |||
460 | # access descriptors for authority info access extension | ||
461 | !Cname ad-OCSP | ||
462 | id-ad 1 : OCSP : OCSP | ||
463 | !Cname ad-ca-issuers | ||
464 | id-ad 2 : caIssuers : CA Issuers | ||
465 | !Cname ad-timeStamping | ||
466 | id-ad 3 : ad_timestamping : AD Time Stamping | ||
467 | !Cname ad-dvcs | ||
468 | id-ad 4 : AD_DVCS : ad dvcs | ||
469 | |||
470 | |||
471 | !Alias id-pkix-OCSP ad-OCSP | ||
472 | !module id-pkix-OCSP | ||
473 | !Cname basic | ||
474 | id-pkix-OCSP 1 : basicOCSPResponse : Basic OCSP Response | ||
475 | id-pkix-OCSP 2 : Nonce : OCSP Nonce | ||
476 | id-pkix-OCSP 3 : CrlID : OCSP CRL ID | ||
477 | id-pkix-OCSP 4 : acceptableResponses : Acceptable OCSP Responses | ||
478 | id-pkix-OCSP 5 : noCheck : OCSP No Check | ||
479 | id-pkix-OCSP 6 : archiveCutoff : OCSP Archive Cutoff | ||
480 | id-pkix-OCSP 7 : serviceLocator : OCSP Service Locator | ||
481 | id-pkix-OCSP 8 : extendedStatus : Extended OCSP Status | ||
482 | id-pkix-OCSP 9 : valid | ||
483 | id-pkix-OCSP 10 : path | ||
484 | id-pkix-OCSP 11 : trustRoot : Trust Root | ||
485 | !global | ||
486 | |||
487 | 1 3 14 3 2 : algorithm : algorithm | ||
488 | algorithm 3 : RSA-NP-MD5 : md5WithRSA | ||
489 | algorithm 6 : DES-ECB : des-ecb | ||
490 | algorithm 7 : DES-CBC : des-cbc | ||
491 | !Cname des-ofb64 | ||
492 | algorithm 8 : DES-OFB : des-ofb | ||
493 | !Cname des-cfb64 | ||
494 | algorithm 9 : DES-CFB : des-cfb | ||
34 | algorithm 11 : rsaSignature | 495 | algorithm 11 : rsaSignature |
496 | !Cname dsa-2 | ||
497 | algorithm 12 : DSA-old : dsaEncryption-old | ||
498 | algorithm 13 : DSA-SHA : dsaWithSHA | ||
499 | algorithm 15 : RSA-SHA : shaWithRSAEncryption | ||
500 | !Cname des-ede-ecb | ||
501 | algorithm 17 : DES-EDE : des-ede | ||
502 | !Cname des-ede3-ecb | ||
503 | : DES-EDE3 : des-ede3 | ||
504 | : DES-EDE-CBC : des-ede-cbc | ||
505 | !Cname des-ede-cfb64 | ||
506 | : DES-EDE-CFB : des-ede-cfb | ||
507 | !Cname des-ede3-cfb64 | ||
508 | : DES-EDE3-CFB : des-ede3-cfb | ||
509 | !Cname des-ede-ofb64 | ||
510 | : DES-EDE-OFB : des-ede-ofb | ||
511 | !Cname des-ede3-ofb64 | ||
512 | : DES-EDE3-OFB : des-ede3-ofb | ||
513 | : DESX-CBC : desx-cbc | ||
514 | algorithm 18 : SHA : sha | ||
515 | algorithm 26 : SHA1 : sha1 | ||
516 | !Cname dsaWithSHA1-2 | ||
517 | algorithm 27 : DSA-SHA1-old : dsaWithSHA1-old | ||
518 | algorithm 29 : RSA-SHA1-2 : sha1WithRSA | ||
519 | |||
520 | 1 3 36 3 2 1 : RIPEMD160 : ripemd160 | ||
521 | 1 3 36 3 3 1 2 : RSA-RIPEMD160 : ripemd160WithRSA | ||
522 | |||
523 | !Cname sxnet | ||
524 | 1 3 101 1 4 1 : SXNetID : Strong Extranet ID | ||
525 | |||
526 | 2 5 : X500 : directory services (X.500) | ||
527 | |||
528 | X500 4 : X509 | ||
529 | X509 3 : CN : commonName | ||
530 | X509 4 : SN : surname | ||
531 | X509 5 : : serialNumber | ||
532 | X509 6 : C : countryName | ||
533 | X509 7 : L : localityName | ||
534 | X509 8 : ST : stateOrProvinceName | ||
535 | X509 10 : O : organizationName | ||
536 | X509 11 : OU : organizationalUnitName | ||
537 | X509 12 : : title | ||
538 | X509 13 : : description | ||
539 | X509 41 : name : name | ||
540 | X509 42 : gn : givenName | ||
541 | X509 43 : : initials | ||
542 | X509 44 : : generationQualifier | ||
543 | X509 45 : : x500UniqueIdentifier | ||
544 | X509 46 : dnQualifier : dnQualifier | ||
545 | X509 72 : role : role | ||
546 | |||
547 | X500 8 : X500algorithms : directory services - algorithms | ||
548 | X500algorithms 1 1 : RSA : rsa | ||
549 | X500algorithms 3 100 : RSA-MDC2 : mdc2WithRSA | ||
550 | X500algorithms 3 101 : MDC2 : mdc2 | ||
551 | |||
552 | X500 29 : id-ce | ||
553 | !Cname subject-key-identifier | ||
554 | id-ce 14 : subjectKeyIdentifier : X509v3 Subject Key Identifier | ||
555 | !Cname key-usage | ||
556 | id-ce 15 : keyUsage : X509v3 Key Usage | ||
557 | !Cname private-key-usage-period | ||
558 | id-ce 16 : privateKeyUsagePeriod : X509v3 Private Key Usage Period | ||
559 | !Cname subject-alt-name | ||
560 | id-ce 17 : subjectAltName : X509v3 Subject Alternative Name | ||
561 | !Cname issuer-alt-name | ||
562 | id-ce 18 : issuerAltName : X509v3 Issuer Alternative Name | ||
563 | !Cname basic-constraints | ||
564 | id-ce 19 : basicConstraints : X509v3 Basic Constraints | ||
565 | !Cname crl-number | ||
566 | id-ce 20 : crlNumber : X509v3 CRL Number | ||
567 | !Cname crl-reason | ||
568 | id-ce 21 : CRLReason : X509v3 CRL Reason Code | ||
569 | !Cname invalidity-date | ||
570 | id-ce 24 : invalidityDate : Invalidity Date | ||
571 | !Cname delta-crl | ||
572 | id-ce 27 : deltaCRL : X509v3 Delta CRL Indicator | ||
573 | !Cname crl-distribution-points | ||
574 | id-ce 31 : crlDistributionPoints : X509v3 CRL Distribution Points | ||
575 | !Cname certificate-policies | ||
576 | id-ce 32 : certificatePolicies : X509v3 Certificate Policies | ||
577 | !Cname authority-key-identifier | ||
578 | id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier | ||
579 | !Cname policy-constraints | ||
580 | id-ce 36 : policyConstraints : X509v3 Policy Constraints | ||
581 | !Cname ext-key-usage | ||
582 | id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage | ||
583 | !Cname target-information | ||
584 | id-ce 55 : targetInformation : X509v3 AC Targeting | ||
585 | !Cname no-rev-avail | ||
586 | id-ce 56 : noRevAvail : X509v3 No Revocation Available | ||
587 | |||
588 | !Cname netscape | ||
589 | 2 16 840 1 113730 : Netscape : Netscape Communications Corp. | ||
590 | !Cname netscape-cert-extension | ||
591 | netscape 1 : nsCertExt : Netscape Certificate Extension | ||
592 | !Cname netscape-data-type | ||
593 | netscape 2 : nsDataType : Netscape Data Type | ||
594 | !Cname netscape-cert-type | ||
595 | netscape-cert-extension 1 : nsCertType : Netscape Cert Type | ||
596 | !Cname netscape-base-url | ||
597 | netscape-cert-extension 2 : nsBaseUrl : Netscape Base Url | ||
598 | !Cname netscape-revocation-url | ||
599 | netscape-cert-extension 3 : nsRevocationUrl : Netscape Revocation Url | ||
600 | !Cname netscape-ca-revocation-url | ||
601 | netscape-cert-extension 4 : nsCaRevocationUrl : Netscape CA Revocation Url | ||
602 | !Cname netscape-renewal-url | ||
603 | netscape-cert-extension 7 : nsRenewalUrl : Netscape Renewal Url | ||
604 | !Cname netscape-ca-policy-url | ||
605 | netscape-cert-extension 8 : nsCaPolicyUrl : Netscape CA Policy Url | ||
606 | !Cname netscape-ssl-server-name | ||
607 | netscape-cert-extension 12 : nsSslServerName : Netscape SSL Server Name | ||
608 | !Cname netscape-comment | ||
609 | netscape-cert-extension 13 : nsComment : Netscape Comment | ||
610 | !Cname netscape-cert-sequence | ||
611 | netscape-data-type 5 : nsCertSequence : Netscape Certificate Sequence | ||
612 | !Cname ns-sgc | ||
613 | netscape 4 1 : nsSGC : Netscape Server Gated Crypto | ||
614 | |||
615 | # iso(1) | ||
616 | iso 3 : ORG : org | ||
617 | org 6 : DOD : dod | ||
618 | dod 1 : IANA : iana | ||
619 | !Alias internet iana | ||
620 | |||
621 | internet 1 : directory : Directory | ||
622 | internet 2 : mgmt : Management | ||
623 | internet 3 : experimental : Experimental | ||
624 | internet 4 : private : Private | ||
625 | internet 5 : security : Security | ||
626 | internet 6 : snmpv2 : SNMPv2 | ||
627 | # Documents refer to "internet 7" as "mail". This however leads to ambiguities | ||
628 | # with RFC2798, Section 9.1.3, where "mail" is defined as the short name for | ||
629 | # rfc822Mailbox. The short name is therefore here left out for a reason. | ||
630 | # Subclasses of "mail", e.g. "MIME MHS" don't consitute a problem, as | ||
631 | # references are realized via long name "Mail" (with capital M). | ||
632 | internet 7 : : Mail | ||
633 | |||
634 | Private 1 : enterprises : Enterprises | ||
635 | |||
636 | # RFC 2247 | ||
637 | Enterprises 1466 344 : dcobject : dcObject | ||
638 | |||
639 | # RFC 1495 | ||
640 | Mail 1 : mime-mhs : MIME MHS | ||
641 | mime-mhs 1 : mime-mhs-headings : mime-mhs-headings | ||
642 | mime-mhs 2 : mime-mhs-bodies : mime-mhs-bodies | ||
643 | mime-mhs-headings 1 : id-hex-partial-message : id-hex-partial-message | ||
644 | mime-mhs-headings 2 : id-hex-multipart-message : id-hex-multipart-message | ||
645 | |||
646 | # What the hell are these OIDs, really? | ||
647 | !Cname rle-compression | ||
648 | 1 1 1 1 666 1 : RLE : run length compression | ||
649 | !Cname zlib-compression | ||
650 | 1 1 1 1 666 2 : ZLIB : zlib compression | ||
651 | |||
652 | # AES aka Rijndael | ||
653 | |||
654 | !Alias csor 2 16 840 1 101 3 | ||
655 | !Alias nistAlgorithms csor 4 | ||
656 | !Alias aes nistAlgorithms 1 | ||
657 | |||
658 | aes 1 : AES-128-ECB : aes-128-ecb | ||
659 | aes 2 : AES-128-CBC : aes-128-cbc | ||
660 | !Cname aes-128-ofb128 | ||
661 | aes 3 : AES-128-OFB : aes-128-ofb | ||
662 | !Cname aes-128-cfb128 | ||
663 | aes 4 : AES-128-CFB : aes-128-cfb | ||
664 | |||
665 | aes 21 : AES-192-ECB : aes-192-ecb | ||
666 | aes 22 : AES-192-CBC : aes-192-cbc | ||
667 | !Cname aes-192-ofb128 | ||
668 | aes 23 : AES-192-OFB : aes-192-ofb | ||
669 | !Cname aes-192-cfb128 | ||
670 | aes 24 : AES-192-CFB : aes-192-cfb | ||
671 | |||
672 | aes 41 : AES-256-ECB : aes-256-ecb | ||
673 | aes 42 : AES-256-CBC : aes-256-cbc | ||
674 | !Cname aes-256-ofb128 | ||
675 | aes 43 : AES-256-OFB : aes-256-ofb | ||
676 | !Cname aes-256-cfb128 | ||
677 | aes 44 : AES-256-CFB : aes-256-cfb | ||
678 | |||
679 | # Hold instruction CRL entry extension | ||
680 | !Cname hold-instruction-code | ||
681 | id-ce 23 : holdInstructionCode : Hold Instruction Code | ||
682 | !Alias holdInstruction X9-57 2 | ||
683 | !Cname hold-instruction-none | ||
684 | holdInstruction 1 : holdInstructionNone : Hold Instruction None | ||
685 | !Cname hold-instruction-call-issuer | ||
686 | holdInstruction 2 : holdInstructionCallIssuer : Hold Instruction Call Issuer | ||
687 | !Cname hold-instruction-reject | ||
688 | holdInstruction 3 : holdInstructionReject : Hold Instruction Reject | ||
35 | 689 | ||
36 | algorithm 6 : desECB | 690 | # OID's from CCITT. Most of this is defined in RFC 1274. A couple of |
37 | algorithm 7 : desCBC | 691 | # them are also mentioned in RFC 2247 |
38 | algorithm 8 : desOFB | 692 | ccitt 9 : data |
39 | algorithm 9 : desCFB | 693 | data 2342 : pss |
40 | algorithm 17 : desEDE2 | 694 | pss 19200300 : ucl |
695 | ucl 100 : pilot | ||
696 | pilot 1 : : pilotAttributeType | ||
697 | pilot 3 : : pilotAttributeSyntax | ||
698 | pilot 4 : : pilotObjectClass | ||
699 | pilot 10 : : pilotGroups | ||
700 | pilotAttributeSyntax 4 : : iA5StringSyntax | ||
701 | pilotAttributeSyntax 5 : : caseIgnoreIA5StringSyntax | ||
702 | pilotObjectClass 3 : : pilotObject | ||
703 | pilotObjectClass 4 : : pilotPerson | ||
704 | pilotObjectClass 5 : account | ||
705 | pilotObjectClass 6 : document | ||
706 | pilotObjectClass 7 : room | ||
707 | pilotObjectClass 9 : : documentSeries | ||
708 | pilotObjectClass 13 : domain : Domain | ||
709 | pilotObjectClass 14 : : rFC822localPart | ||
710 | pilotObjectClass 15 : : dNSDomain | ||
711 | pilotObjectClass 17 : : domainRelatedObject | ||
712 | pilotObjectClass 18 : : friendlyCountry | ||
713 | pilotObjectClass 19 : : simpleSecurityObject | ||
714 | pilotObjectClass 20 : : pilotOrganization | ||
715 | pilotObjectClass 21 : : pilotDSA | ||
716 | pilotObjectClass 22 : : qualityLabelledData | ||
717 | pilotAttributeType 1 : UID : userId | ||
718 | pilotAttributeType 2 : : textEncodedORAddress | ||
719 | pilotAttributeType 3 : mail : rfc822Mailbox | ||
720 | pilotAttributeType 4 : info | ||
721 | pilotAttributeType 5 : : favouriteDrink | ||
722 | pilotAttributeType 6 : : roomNumber | ||
723 | pilotAttributeType 7 : photo | ||
724 | pilotAttributeType 8 : : userClass | ||
725 | pilotAttributeType 9 : host | ||
726 | pilotAttributeType 10 : manager | ||
727 | pilotAttributeType 11 : : documentIdentifier | ||
728 | pilotAttributeType 12 : : documentTitle | ||
729 | pilotAttributeType 13 : : documentVersion | ||
730 | pilotAttributeType 14 : : documentAuthor | ||
731 | pilotAttributeType 15 : : documentLocation | ||
732 | pilotAttributeType 20 : : homeTelephoneNumber | ||
733 | pilotAttributeType 21 : secretary | ||
734 | pilotAttributeType 22 : : otherMailbox | ||
735 | pilotAttributeType 23 : : lastModifiedTime | ||
736 | pilotAttributeType 24 : : lastModifiedBy | ||
737 | pilotAttributeType 25 : DC : domainComponent | ||
738 | pilotAttributeType 26 : : aRecord | ||
739 | pilotAttributeType 27 : : pilotAttributeType27 | ||
740 | pilotAttributeType 28 : : mXRecord | ||
741 | pilotAttributeType 29 : : nSRecord | ||
742 | pilotAttributeType 30 : : sOARecord | ||
743 | pilotAttributeType 31 : : cNAMERecord | ||
744 | pilotAttributeType 37 : : associatedDomain | ||
745 | pilotAttributeType 38 : : associatedName | ||
746 | pilotAttributeType 39 : : homePostalAddress | ||
747 | pilotAttributeType 40 : : personalTitle | ||
748 | pilotAttributeType 41 : : mobileTelephoneNumber | ||
749 | pilotAttributeType 42 : : pagerTelephoneNumber | ||
750 | pilotAttributeType 43 : : friendlyCountryName | ||
751 | # The following clashes with 2.5.4.45, so commented away | ||
752 | #pilotAttributeType 44 : uid : uniqueIdentifier | ||
753 | pilotAttributeType 45 : : organizationalStatus | ||
754 | pilotAttributeType 46 : : janetMailbox | ||
755 | pilotAttributeType 47 : : mailPreferenceOption | ||
756 | pilotAttributeType 48 : : buildingName | ||
757 | pilotAttributeType 49 : : dSAQuality | ||
758 | pilotAttributeType 50 : : singleLevelQuality | ||
759 | pilotAttributeType 51 : : subtreeMinimumQuality | ||
760 | pilotAttributeType 52 : : subtreeMaximumQuality | ||
761 | pilotAttributeType 53 : : personalSignature | ||
762 | pilotAttributeType 54 : : dITRedirect | ||
763 | pilotAttributeType 55 : audio | ||
764 | pilotAttributeType 56 : : documentPublisher | ||