summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/objects
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/objects')
-rw-r--r--src/lib/libcrypto/objects/Makefile119
-rw-r--r--src/lib/libcrypto/objects/Makefile.ssl123
-rw-r--r--src/lib/libcrypto/objects/o_names.c6
-rw-r--r--src/lib/libcrypto/objects/obj_dat.c254
-rw-r--r--src/lib/libcrypto/objects/obj_dat.pl4
-rw-r--r--src/lib/libcrypto/objects/obj_err.c9
-rw-r--r--src/lib/libcrypto/objects/obj_lib.c3
-rw-r--r--src/lib/libcrypto/objects/obj_mac.num115
-rw-r--r--src/lib/libcrypto/objects/objects.h7
-rw-r--r--src/lib/libcrypto/objects/objects.pl13
-rw-r--r--src/lib/libcrypto/objects/objects.txt185
11 files changed, 339 insertions, 499 deletions
diff --git a/src/lib/libcrypto/objects/Makefile b/src/lib/libcrypto/objects/Makefile
new file mode 100644
index 0000000000..9c5615099c
--- /dev/null
+++ b/src/lib/libcrypto/objects/Makefile
@@ -0,0 +1,119 @@
1#
2# OpenSSL/crypto/objects/Makefile
3#
4
5DIR= objects
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10MAKEFILE= Makefile
11AR= ar r
12PERL= perl
13
14CFLAGS= $(INCLUDES) $(CFLAG)
15
16GENERAL=Makefile README
17TEST=
18APPS=
19
20LIB=$(TOP)/libcrypto.a
21LIBSRC= o_names.c obj_dat.c obj_lib.c obj_err.c
22LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o
23
24SRC= $(LIBSRC)
25
26EXHEADER= objects.h obj_mac.h
27HEADER= $(EXHEADER) obj_dat.h
28
29ALL= $(GENERAL) $(SRC) $(HEADER)
30
31top:
32 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
33
34all: obj_dat.h lib
35
36lib: $(LIBOBJ)
37 $(AR) $(LIB) $(LIBOBJ)
38 $(RANLIB) $(LIB) || echo Never mind.
39 @touch lib
40
41obj_dat.h: obj_dat.pl obj_mac.h
42 $(PERL) obj_dat.pl obj_mac.h obj_dat.h
43
44# objects.pl both reads and writes obj_mac.num
45obj_mac.h: objects.pl objects.txt obj_mac.num
46 $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
47 @sleep 1; touch obj_mac.h; sleep 1
48
49files:
50 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
51
52links:
53 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
54 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
55 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
56
57install:
58 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
59 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
60 do \
61 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
62 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
63 done;
64
65tags:
66 ctags $(SRC)
67
68tests:
69
70lint:
71 lint -DLINT $(INCLUDES) $(SRC)>fluff
72
73depend:
74 @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
75 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
76
77dclean:
78 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
79 mv -f Makefile.new $(MAKEFILE)
80
81clean:
82 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
83
84# DO NOT DELETE THIS LINE -- make depend depends on it.
85
86o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
87o_names.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
88o_names.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
89o_names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
90o_names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
91o_names.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
92o_names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
93o_names.o: o_names.c
94obj_dat.o: ../../e_os.h ../../include/openssl/asn1.h
95obj_dat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
96obj_dat.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
97obj_dat.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
98obj_dat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
99obj_dat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
100obj_dat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
101obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
102obj_dat.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_dat.c obj_dat.h
103obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
104obj_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
105obj_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
106obj_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
107obj_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
108obj_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
109obj_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
110obj_err.o: obj_err.c
111obj_lib.o: ../../e_os.h ../../include/openssl/asn1.h
112obj_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
113obj_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
114obj_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
115obj_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
116obj_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
117obj_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
118obj_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
119obj_lib.o: ../cryptlib.h obj_lib.c
diff --git a/src/lib/libcrypto/objects/Makefile.ssl b/src/lib/libcrypto/objects/Makefile.ssl
new file mode 100644
index 0000000000..3e7a194cf9
--- /dev/null
+++ b/src/lib/libcrypto/objects/Makefile.ssl
@@ -0,0 +1,123 @@
1#
2# SSLeay/crypto/objects/Makefile
3#
4
5DIR= objects
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10INSTALL_PREFIX=
11OPENSSLDIR= /usr/local/ssl
12INSTALLTOP=/usr/local/ssl
13MAKE= make -f Makefile.ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile.ssl
17AR= ar r
18PERL= perl
19
20CFLAGS= $(INCLUDES) $(CFLAG)
21
22GENERAL=Makefile README
23TEST=
24APPS=
25
26LIB=$(TOP)/libcrypto.a
27LIBSRC= o_names.c obj_dat.c obj_lib.c obj_err.c
28LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o
29
30SRC= $(LIBSRC)
31
32EXHEADER= objects.h obj_mac.h
33HEADER= $(EXHEADER) obj_dat.h
34
35ALL= $(GENERAL) $(SRC) $(HEADER)
36
37top:
38 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
39
40all: obj_dat.h lib
41
42lib: $(LIBOBJ)
43 $(AR) $(LIB) $(LIBOBJ)
44 $(RANLIB) $(LIB) || echo Never mind.
45 @touch lib
46
47obj_dat.h: obj_dat.pl obj_mac.h
48 $(PERL) obj_dat.pl obj_mac.h obj_dat.h
49
50# objects.pl both reads and writes obj_mac.num
51obj_mac.h: objects.pl objects.txt obj_mac.num
52 $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
53
54files:
55 $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
56
57links:
58 @sh $(TOP)/util/point.sh Makefile.ssl Makefile
59 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
60 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
61 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
62
63install:
64 @for i in $(EXHEADER) ; \
65 do \
66 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
67 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
68 done;
69
70tags:
71 ctags $(SRC)
72
73tests:
74
75lint:
76 lint -DLINT $(INCLUDES) $(SRC)>fluff
77
78depend:
79 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
80
81dclean:
82 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
83 mv -f Makefile.new $(MAKEFILE)
84
85clean:
86 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
87
88# DO NOT DELETE THIS LINE -- make depend depends on it.
89
90o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
91o_names.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
92o_names.o: ../../include/openssl/e_os2.h ../../include/openssl/lhash.h
93o_names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
94o_names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
95o_names.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
96o_names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
97o_names.o: o_names.c
98obj_dat.o: ../../e_os.h ../../include/openssl/asn1.h
99obj_dat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
100obj_dat.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
101obj_dat.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
102obj_dat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
103obj_dat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
104obj_dat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
105obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
106obj_dat.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_dat.c obj_dat.h
107obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
108obj_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
109obj_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
110obj_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
111obj_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
112obj_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
113obj_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
114obj_err.o: ../../include/openssl/symhacks.h obj_err.c
115obj_lib.o: ../../e_os.h ../../include/openssl/asn1.h
116obj_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
117obj_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
118obj_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
119obj_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
120obj_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
121obj_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
122obj_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
123obj_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_lib.c
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c
index adb5731f76..28c9370ca3 100644
--- a/src/lib/libcrypto/objects/o_names.c
+++ b/src/lib/libcrypto/objects/o_names.c
@@ -111,8 +111,8 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
111static int obj_name_cmp(const void *a_void, const void *b_void) 111static int obj_name_cmp(const void *a_void, const void *b_void)
112 { 112 {
113 int ret; 113 int ret;
114 const OBJ_NAME *a = (const OBJ_NAME *)a_void; 114 OBJ_NAME *a = (OBJ_NAME *)a_void;
115 const OBJ_NAME *b = (const OBJ_NAME *)b_void; 115 OBJ_NAME *b = (OBJ_NAME *)b_void;
116 116
117 ret=a->type-b->type; 117 ret=a->type-b->type;
118 if (ret == 0) 118 if (ret == 0)
@@ -133,7 +133,7 @@ static int obj_name_cmp(const void *a_void, const void *b_void)
133static unsigned long obj_name_hash(const void *a_void) 133static unsigned long obj_name_hash(const void *a_void)
134 { 134 {
135 unsigned long ret; 135 unsigned long ret;
136 const OBJ_NAME *a = (const OBJ_NAME *)a_void; 136 OBJ_NAME *a = (OBJ_NAME *)a_void;
137 137
138 if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) 138 if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type))
139 { 139 {
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c
index 7fd7433241..f549d078ef 100644
--- a/src/lib/libcrypto/objects/obj_dat.c
+++ b/src/lib/libcrypto/objects/obj_dat.c
@@ -58,12 +58,10 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <ctype.h> 60#include <ctype.h>
61#include <limits.h>
62#include "cryptlib.h" 61#include "cryptlib.h"
63#include <openssl/lhash.h> 62#include <openssl/lhash.h>
64#include <openssl/asn1.h> 63#include <openssl/asn1.h>
65#include <openssl/objects.h> 64#include <openssl/objects.h>
66#include <openssl/bn.h>
67 65
68/* 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 */
69#ifndef OPENSSL_NO_OBJECT 67#ifndef OPENSSL_NO_OBJECT
@@ -117,7 +115,7 @@ static unsigned long add_hash(const void *ca_void)
117 int i; 115 int i;
118 unsigned long ret=0; 116 unsigned long ret=0;
119 unsigned char *p; 117 unsigned char *p;
120 const ADDED_OBJ *ca = (const ADDED_OBJ *)ca_void; 118 ADDED_OBJ *ca = (ADDED_OBJ *)ca_void;
121 119
122 a=ca->obj; 120 a=ca->obj;
123 switch (ca->type) 121 switch (ca->type)
@@ -151,8 +149,8 @@ static int add_cmp(const void *ca_void, const void *cb_void)
151 { 149 {
152 ASN1_OBJECT *a,*b; 150 ASN1_OBJECT *a,*b;
153 int i; 151 int i;
154 const ADDED_OBJ *ca = (const ADDED_OBJ *)ca_void; 152 ADDED_OBJ *ca = (ADDED_OBJ *)ca_void;
155 const ADDED_OBJ *cb = (const ADDED_OBJ *)cb_void; 153 ADDED_OBJ *cb = (ADDED_OBJ *)cb_void;
156 154
157 i=ca->type-cb->type; 155 i=ca->type-cb->type;
158 if (i) return(i); 156 if (i) return(i);
@@ -163,7 +161,7 @@ static int add_cmp(const void *ca_void, const void *cb_void)
163 case ADDED_DATA: 161 case ADDED_DATA:
164 i=(a->length - b->length); 162 i=(a->length - b->length);
165 if (i) return(i); 163 if (i) return(i);
166 return(memcmp(a->data,b->data,(size_t)a->length)); 164 return(memcmp(a->data,b->data,a->length));
167 case ADDED_SNAME: 165 case ADDED_SNAME:
168 if (a->sn == NULL) return(-1); 166 if (a->sn == NULL) return(-1);
169 else if (b->sn == NULL) return(1); 167 else if (b->sn == NULL) return(1);
@@ -384,8 +382,8 @@ int OBJ_obj2nid(const ASN1_OBJECT *a)
384 adp=(ADDED_OBJ *)lh_retrieve(added,&ad); 382 adp=(ADDED_OBJ *)lh_retrieve(added,&ad);
385 if (adp != NULL) return (adp->obj->nid); 383 if (adp != NULL) return (adp->obj->nid);
386 } 384 }
387 op=(ASN1_OBJECT **)OBJ_bsearch((const char *)&a,(const char *)obj_objs, 385 op=(ASN1_OBJECT **)OBJ_bsearch((char *)&a,(char *)obj_objs,NUM_OBJ,
388 NUM_OBJ, sizeof(ASN1_OBJECT *),obj_cmp); 386 sizeof(ASN1_OBJECT *),obj_cmp);
389 if (op == NULL) 387 if (op == NULL)
390 return(NID_undef); 388 return(NID_undef);
391 return((*op)->nid); 389 return((*op)->nid);
@@ -401,9 +399,7 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name)
401 { 399 {
402 int nid = NID_undef; 400 int nid = NID_undef;
403 ASN1_OBJECT *op=NULL; 401 ASN1_OBJECT *op=NULL;
404 unsigned char *buf; 402 unsigned char *buf,*p;
405 unsigned char *p;
406 const unsigned char *cp;
407 int i, j; 403 int i, j;
408 404
409 if(!no_name) { 405 if(!no_name) {
@@ -415,8 +411,8 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name)
415 /* Work out size of content octets */ 411 /* Work out size of content octets */
416 i=a2d_ASN1_OBJECT(NULL,0,s,-1); 412 i=a2d_ASN1_OBJECT(NULL,0,s,-1);
417 if (i <= 0) { 413 if (i <= 0) {
418 /* Don't clear the error */ 414 /* Clear the error */
419 /*ERR_clear_error();*/ 415 ERR_get_error();
420 return NULL; 416 return NULL;
421 } 417 }
422 /* Work out total size */ 418 /* Work out total size */
@@ -429,170 +425,75 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name)
429 ASN1_put_object(&p,0,i,V_ASN1_OBJECT,V_ASN1_UNIVERSAL); 425 ASN1_put_object(&p,0,i,V_ASN1_OBJECT,V_ASN1_UNIVERSAL);
430 /* Write out contents */ 426 /* Write out contents */
431 a2d_ASN1_OBJECT(p,i,s,-1); 427 a2d_ASN1_OBJECT(p,i,s,-1);
432 428
433 cp=buf; 429 p=buf;
434 op=d2i_ASN1_OBJECT(NULL,&cp,j); 430 op=d2i_ASN1_OBJECT(NULL,&p,j);
435 OPENSSL_free(buf); 431 OPENSSL_free(buf);
436 return op; 432 return op;
437 } 433 }
438 434
439int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) 435int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
440{ 436{
441 int i,n=0,len,nid, first, use_bn; 437 int i,idx=0,n=0,len,nid;
442 BIGNUM *bl;
443 unsigned long l; 438 unsigned long l;
444 unsigned char *p; 439 unsigned char *p;
440 const char *s;
445 char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; 441 char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2];
446 442
443 if (buf_len <= 0) return(0);
444
447 if ((a == NULL) || (a->data == NULL)) { 445 if ((a == NULL) || (a->data == NULL)) {
448 buf[0]='\0'; 446 buf[0]='\0';
449 return(0); 447 return(0);
450 } 448 }
451 449
450 if (no_name || (nid=OBJ_obj2nid(a)) == NID_undef) {
451 len=a->length;
452 p=a->data;
452 453
453 if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) 454 idx=0;
454 { 455 l=0;
455 const char *s; 456 while (idx < a->length) {
456 s=OBJ_nid2ln(nid); 457 l|=(p[idx]&0x7f);
457 if (s == NULL) 458 if (!(p[idx] & 0x80)) break;
458 s=OBJ_nid2sn(nid); 459 l<<=7L;
459 if (buf) 460 idx++;
460 BUF_strlcpy(buf,s,buf_len);
461 n=strlen(s);
462 return n;
463 } 461 }
462 idx++;
463 i=(int)(l/40);
464 if (i > 2) i=2;
465 l-=(long)(i*40);
466
467 BIO_snprintf(tbuf,sizeof tbuf,"%d.%lu",i,l);
468 i=strlen(tbuf);
469 BUF_strlcpy(buf,tbuf,buf_len);
470 buf_len-=i;
471 buf+=i;
472 n+=i;
464 473
465
466 len=a->length;
467 p=a->data;
468
469 first = 1;
470 bl = NULL;
471
472 while (len > 0)
473 {
474 l=0; 474 l=0;
475 use_bn = 0; 475 for (; idx<len; idx++) {
476 for (;;) 476 l|=p[idx]&0x7f;
477 { 477 if (!(p[idx] & 0x80)) {
478 unsigned char c = *p++; 478 BIO_snprintf(tbuf,sizeof tbuf,".%lu",l);
479 len--; 479 i=strlen(tbuf);
480 if ((len == 0) && (c & 0x80))
481 goto err;
482 if (use_bn)
483 {
484 if (!BN_add_word(bl, c & 0x7f))
485 goto err;
486 }
487 else
488 l |= c & 0x7f;
489 if (!(c & 0x80))
490 break;
491 if (!use_bn && (l > (ULONG_MAX >> 7L)))
492 {
493 if (!bl && !(bl = BN_new()))
494 goto err;
495 if (!BN_set_word(bl, l))
496 goto err;
497 use_bn = 1;
498 }
499 if (use_bn)
500 {
501 if (!BN_lshift(bl, bl, 7))
502 goto err;
503 }
504 else
505 l<<=7L;
506 }
507
508 if (first)
509 {
510 first = 0;
511 if (l >= 80)
512 {
513 i = 2;
514 if (use_bn)
515 {
516 if (!BN_sub_word(bl, 80))
517 goto err;
518 }
519 else
520 l -= 80;
521 }
522 else
523 {
524 i=(int)(l/40);
525 l-=(long)(i*40);
526 }
527 if (buf && (buf_len > 0))
528 {
529 *buf++ = i + '0';
530 buf_len--;
531 }
532 n++;
533 }
534
535 if (use_bn)
536 {
537 char *bndec;
538 bndec = BN_bn2dec(bl);
539 if (!bndec)
540 goto err;
541 i = strlen(bndec);
542 if (buf)
543 {
544 if (buf_len > 0) 480 if (buf_len > 0)
545 { 481 BUF_strlcpy(buf,tbuf,buf_len);
546 *buf++ = '.'; 482 buf_len-=i;
547 buf_len--; 483 buf+=i;
548 } 484 n+=i;
549 BUF_strlcpy(buf,bndec,buf_len); 485 l=0;
550 if (i > buf_len)
551 {
552 buf += buf_len;
553 buf_len = 0;
554 }
555 else
556 {
557 buf+=i;
558 buf_len-=i;
559 }
560 }
561 n++;
562 n += i;
563 OPENSSL_free(bndec);
564 }
565 else
566 {
567 BIO_snprintf(tbuf,sizeof tbuf,".%lu",l);
568 i=strlen(tbuf);
569 if (buf && (buf_len > 0))
570 {
571 BUF_strlcpy(buf,tbuf,buf_len);
572 if (i > buf_len)
573 {
574 buf += buf_len;
575 buf_len = 0;
576 }
577 else
578 {
579 buf+=i;
580 buf_len-=i;
581 }
582 }
583 n+=i;
584 l=0;
585 } 486 }
487 l<<=7L;
586 } 488 }
587 489 } else {
588 if (bl) 490 s=OBJ_nid2ln(nid);
589 BN_free(bl); 491 if (s == NULL)
590 return n; 492 s=OBJ_nid2sn(nid);
591 493 BUF_strlcpy(buf,s,buf_len);
592 err: 494 n=strlen(s);
593 if (bl) 495 }
594 BN_free(bl); 496 return(n);
595 return -1;
596} 497}
597 498
598int OBJ_txt2nid(const char *s) 499int OBJ_txt2nid(const char *s)
@@ -618,7 +519,7 @@ int OBJ_ln2nid(const char *s)
618 adp=(ADDED_OBJ *)lh_retrieve(added,&ad); 519 adp=(ADDED_OBJ *)lh_retrieve(added,&ad);
619 if (adp != NULL) return (adp->obj->nid); 520 if (adp != NULL) return (adp->obj->nid);
620 } 521 }
621 op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)ln_objs, NUM_LN, 522 op=(ASN1_OBJECT **)OBJ_bsearch((char *)&oo,(char *)ln_objs,NUM_LN,
622 sizeof(ASN1_OBJECT *),ln_cmp); 523 sizeof(ASN1_OBJECT *),ln_cmp);
623 if (op == NULL) return(NID_undef); 524 if (op == NULL) return(NID_undef);
624 return((*op)->nid); 525 return((*op)->nid);
@@ -646,8 +547,8 @@ int OBJ_sn2nid(const char *s)
646static int obj_cmp(const void *ap, const void *bp) 547static int obj_cmp(const void *ap, const void *bp)
647 { 548 {
648 int j; 549 int j;
649 const ASN1_OBJECT *a= *(ASN1_OBJECT * const *)ap; 550 ASN1_OBJECT *a= *(ASN1_OBJECT **)ap;
650 const ASN1_OBJECT *b= *(ASN1_OBJECT * const *)bp; 551 ASN1_OBJECT *b= *(ASN1_OBJECT **)bp;
651 552
652 j=(a->length - b->length); 553 j=(a->length - b->length);
653 if (j) return(j); 554 if (j) return(j);
@@ -657,14 +558,8 @@ static int obj_cmp(const void *ap, const void *bp)
657const char *OBJ_bsearch(const char *key, const char *base, int num, int size, 558const char *OBJ_bsearch(const char *key, const char *base, int num, int size,
658 int (*cmp)(const void *, const void *)) 559 int (*cmp)(const void *, const void *))
659 { 560 {
660 return OBJ_bsearch_ex(key, base, num, size, cmp, 0); 561 int l,h,i,c;
661 } 562 const char *p;
662
663const char *OBJ_bsearch_ex(const char *key, const char *base, int num,
664 int size, int (*cmp)(const void *, const void *), int flags)
665 {
666 int l,h,i=0,c=0;
667 const char *p = NULL;
668 563
669 if (num == 0) return(NULL); 564 if (num == 0) return(NULL);
670 l=0; 565 l=0;
@@ -679,33 +574,20 @@ const char *OBJ_bsearch_ex(const char *key, const char *base, int num,
679 else if (c > 0) 574 else if (c > 0)
680 l=i+1; 575 l=i+1;
681 else 576 else
682 break; 577 return(p);
683 } 578 }
684#ifdef CHARSET_EBCDIC 579#ifdef CHARSET_EBCDIC
685/* THIS IS A KLUDGE - Because the *_obj is sorted in ASCII order, and 580/* THIS IS A KLUDGE - Because the *_obj is sorted in ASCII order, and
686 * I don't have perl (yet), we revert to a *LINEAR* search 581 * I don't have perl (yet), we revert to a *LINEAR* search
687 * when the object wasn't found in the binary search. 582 * when the object wasn't found in the binary search.
688 */ 583 */
689 if (c != 0) 584 for (i=0; i<num; ++i) {
690 { 585 p= &(base[i*size]);
691 for (i=0; i<num; ++i) 586 if ((*cmp)(key,p) == 0)
692 { 587 return p;
693 p= &(base[i*size]); 588 }
694 c = (*cmp)(key,p);
695 if (c == 0 || (c < 0 && (flags & OBJ_BSEARCH_VALUE_ON_NOMATCH)))
696 return p;
697 }
698 }
699#endif 589#endif
700 if (c != 0 && !(flags & OBJ_BSEARCH_VALUE_ON_NOMATCH)) 590 return(NULL);
701 p = NULL;
702 else if (c == 0 && (flags & OBJ_BSEARCH_FIRST_VALUE_ON_MATCH))
703 {
704 while(i > 0 && (*cmp)(key,&(base[(i-1)*size])) == 0)
705 i--;
706 p = &(base[i*size]);
707 }
708 return(p);
709 } 591 }
710 592
711int OBJ_create_objects(BIO *in) 593int OBJ_create_objects(BIO *in)
diff --git a/src/lib/libcrypto/objects/obj_dat.pl b/src/lib/libcrypto/objects/obj_dat.pl
index 8a09a46ee6..d0371661f9 100644
--- a/src/lib/libcrypto/objects/obj_dat.pl
+++ b/src/lib/libcrypto/objects/obj_dat.pl
@@ -94,7 +94,7 @@ for ($i=0; $i<$n; $i++)
94 { 94 {
95 if (!defined($nid{$i})) 95 if (!defined($nid{$i}))
96 { 96 {
97 push(@out,"{NULL,NULL,NID_undef,0,NULL,0},\n"); 97 push(@out,"{NULL,NULL,NID_undef,0,NULL},\n");
98 } 98 }
99 else 99 else
100 { 100 {
@@ -138,7 +138,7 @@ for ($i=0; $i<$n; $i++)
138 } 138 }
139 else 139 else
140 { 140 {
141 $out.="0,NULL,0"; 141 $out.="0,NULL";
142 } 142 }
143 $out.="},\n"; 143 $out.="},\n";
144 push(@out,$out); 144 push(@out,$out);
diff --git a/src/lib/libcrypto/objects/obj_err.c b/src/lib/libcrypto/objects/obj_err.c
index 12b48850c6..0682979b38 100644
--- a/src/lib/libcrypto/objects/obj_err.c
+++ b/src/lib/libcrypto/objects/obj_err.c
@@ -91,12 +91,15 @@ static ERR_STRING_DATA OBJ_str_reasons[]=
91 91
92void ERR_load_OBJ_strings(void) 92void ERR_load_OBJ_strings(void)
93 { 93 {
94#ifndef OPENSSL_NO_ERR 94 static int init=1;
95 95
96 if (ERR_func_error_string(OBJ_str_functs[0].error) == NULL) 96 if (init)
97 { 97 {
98 init=0;
99#ifndef OPENSSL_NO_ERR
98 ERR_load_strings(0,OBJ_str_functs); 100 ERR_load_strings(0,OBJ_str_functs);
99 ERR_load_strings(0,OBJ_str_reasons); 101 ERR_load_strings(0,OBJ_str_reasons);
100 }
101#endif 102#endif
103
104 }
102 } 105 }
diff --git a/src/lib/libcrypto/objects/obj_lib.c b/src/lib/libcrypto/objects/obj_lib.c
index 706fa0b0e7..b0b0f2ff24 100644
--- a/src/lib/libcrypto/objects/obj_lib.c
+++ b/src/lib/libcrypto/objects/obj_lib.c
@@ -82,8 +82,7 @@ ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o)
82 r->data=OPENSSL_malloc(o->length); 82 r->data=OPENSSL_malloc(o->length);
83 if (r->data == NULL) 83 if (r->data == NULL)
84 goto err; 84 goto err;
85 if (o->data != NULL) 85 memcpy(r->data,o->data,o->length);
86 memcpy(r->data,o->data,o->length);
87 r->length=o->length; 86 r->length=o->length;
88 r->nid=o->nid; 87 r->nid=o->nid;
89 r->ln=r->sn=NULL; 88 r->ln=r->sn=NULL;
diff --git a/src/lib/libcrypto/objects/obj_mac.num b/src/lib/libcrypto/objects/obj_mac.num
index 47815b1e4e..84555d936e 100644
--- a/src/lib/libcrypto/objects/obj_mac.num
+++ b/src/lib/libcrypto/objects/obj_mac.num
@@ -673,118 +673,3 @@ sha256 672
673sha384 673 673sha384 673
674sha512 674 674sha512 674
675sha224 675 675sha224 675
676identified_organization 676
677certicom_arc 677
678wap 678
679wap_wsg 679
680X9_62_id_characteristic_two_basis 680
681X9_62_onBasis 681
682X9_62_tpBasis 682
683X9_62_ppBasis 683
684X9_62_c2pnb163v1 684
685X9_62_c2pnb163v2 685
686X9_62_c2pnb163v3 686
687X9_62_c2pnb176v1 687
688X9_62_c2tnb191v1 688
689X9_62_c2tnb191v2 689
690X9_62_c2tnb191v3 690
691X9_62_c2onb191v4 691
692X9_62_c2onb191v5 692
693X9_62_c2pnb208w1 693
694X9_62_c2tnb239v1 694
695X9_62_c2tnb239v2 695
696X9_62_c2tnb239v3 696
697X9_62_c2onb239v4 697
698X9_62_c2onb239v5 698
699X9_62_c2pnb272w1 699
700X9_62_c2pnb304w1 700
701X9_62_c2tnb359v1 701
702X9_62_c2pnb368w1 702
703X9_62_c2tnb431r1 703
704secp112r1 704
705secp112r2 705
706secp128r1 706
707secp128r2 707
708secp160k1 708
709secp160r1 709
710secp160r2 710
711secp192k1 711
712secp224k1 712
713secp224r1 713
714secp256k1 714
715secp384r1 715
716secp521r1 716
717sect113r1 717
718sect113r2 718
719sect131r1 719
720sect131r2 720
721sect163k1 721
722sect163r1 722
723sect163r2 723
724sect193r1 724
725sect193r2 725
726sect233k1 726
727sect233r1 727
728sect239k1 728
729sect283k1 729
730sect283r1 730
731sect409k1 731
732sect409r1 732
733sect571k1 733
734sect571r1 734
735wap_wsg_idm_ecid_wtls1 735
736wap_wsg_idm_ecid_wtls3 736
737wap_wsg_idm_ecid_wtls4 737
738wap_wsg_idm_ecid_wtls5 738
739wap_wsg_idm_ecid_wtls6 739
740wap_wsg_idm_ecid_wtls7 740
741wap_wsg_idm_ecid_wtls8 741
742wap_wsg_idm_ecid_wtls9 742
743wap_wsg_idm_ecid_wtls10 743
744wap_wsg_idm_ecid_wtls11 744
745wap_wsg_idm_ecid_wtls12 745
746any_policy 746
747policy_mappings 747
748inhibit_any_policy 748
749ipsec3 749
750ipsec4 750
751camellia_128_cbc 751
752camellia_192_cbc 752
753camellia_256_cbc 753
754camellia_128_ecb 754
755camellia_192_ecb 755
756camellia_256_ecb 756
757camellia_128_cfb128 757
758camellia_192_cfb128 758
759camellia_256_cfb128 759
760camellia_128_cfb1 760
761camellia_192_cfb1 761
762camellia_256_cfb1 762
763camellia_128_cfb8 763
764camellia_192_cfb8 764
765camellia_256_cfb8 765
766camellia_128_ofb128 766
767camellia_192_ofb128 767
768camellia_256_ofb128 768
769subject_directory_attributes 769
770issuing_distribution_point 770
771certificate_issuer 771
772korea 772
773kisa 773
774kftc 774
775npki_alg 775
776seed_ecb 776
777seed_cbc 777
778seed_ofb128 778
779seed_cfb128 779
780hmac_md5 780
781hmac_sha1 781
782id_PasswordBasedMAC 782
783id_DHBasedMac 783
784id_it_suppLangTags 784
785caRepository 785
786id_smime_ct_compressedData 786
787id_ct_asciiTextWithCRLF 787
788id_aes128_wrap 788
789id_aes192_wrap 789
790id_aes256_wrap 790
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h
index 7242f76fb0..f859d859b8 100644
--- a/src/lib/libcrypto/objects/objects.h
+++ b/src/lib/libcrypto/objects/objects.h
@@ -966,10 +966,7 @@
966#define OBJ_NAME_TYPE_COMP_METH 0x04 966#define OBJ_NAME_TYPE_COMP_METH 0x04
967#define OBJ_NAME_TYPE_NUM 0x05 967#define OBJ_NAME_TYPE_NUM 0x05
968 968
969#define OBJ_NAME_ALIAS 0x8000 969#define OBJ_NAME_ALIAS 0x8000
970
971#define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01
972#define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
973 970
974 971
975#ifdef __cplusplus 972#ifdef __cplusplus
@@ -1013,8 +1010,6 @@ int OBJ_sn2nid(const char *s);
1013int OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b); 1010int OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b);
1014const char * OBJ_bsearch(const char *key,const char *base,int num,int size, 1011const char * OBJ_bsearch(const char *key,const char *base,int num,int size,
1015 int (*cmp)(const void *, const void *)); 1012 int (*cmp)(const void *, const void *));
1016const char * OBJ_bsearch_ex(const char *key,const char *base,int num,
1017 int size, int (*cmp)(const void *, const void *), int flags);
1018 1013
1019int OBJ_new_nid(int num); 1014int OBJ_new_nid(int num);
1020int OBJ_add_object(const ASN1_OBJECT *obj); 1015int OBJ_add_object(const ASN1_OBJECT *obj);
diff --git a/src/lib/libcrypto/objects/objects.pl b/src/lib/libcrypto/objects/objects.pl
index 76c06cc8f9..76bb8da677 100644
--- a/src/lib/libcrypto/objects/objects.pl
+++ b/src/lib/libcrypto/objects/objects.pl
@@ -107,12 +107,13 @@ while (<IN>)
107 } 107 }
108close IN; 108close IN;
109 109
110open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; 110#XXX don't modify input files
111foreach (sort { $a <=> $b } keys %nidn) 111#open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]";
112 { 112#foreach (sort { $a <=> $b } keys %nidn)
113 print NUMOUT $nidn{$_},"\t\t",$_,"\n"; 113# {
114 } 114# print NUMOUT $nidn{$_},"\t\t",$_,"\n";
115close NUMOUT; 115# }
116#close NUMOUT;
116 117
117open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; 118open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]";
118print OUT <<'EOF'; 119print OUT <<'EOF';
diff --git a/src/lib/libcrypto/objects/objects.txt b/src/lib/libcrypto/objects/objects.txt
index 34c8d1d647..2635c4e667 100644
--- a/src/lib/libcrypto/objects/objects.txt
+++ b/src/lib/libcrypto/objects/objects.txt
@@ -1,28 +1,12 @@
1# CCITT was renamed to ITU-T quite some time ago 10 : CCITT : ccitt
20 : ITU-T : itu-t
3!Alias ccitt itu-t
4 2
51 : ISO : iso 31 : ISO : iso
6 4
72 : JOINT-ISO-ITU-T : joint-iso-itu-t 52 : JOINT-ISO-CCITT : joint-iso-ccitt
8!Alias joint-iso-ccitt joint-iso-itu-t
9 6
10iso 2 : member-body : ISO Member Body 7iso 2 : member-body : ISO Member Body
11 8
12iso 3 : identified-organization 9joint-iso-ccitt 5 1 5 : selected-attribute-types : Selected Attribute Types
13
14# HMAC OIDs
15identified-organization 6 1 5 5 8 1 1 : HMAC-MD5 : hmac-md5
16identified-organization 6 1 5 5 8 1 2 : HMAC-SHA1 : hmac-sha1
17
18identified-organization 132 : certicom-arc
19
20joint-iso-itu-t 23 : international-organizations : International Organizations
21
22international-organizations 43 : wap
23wap 13 : wap-wsg
24
25joint-iso-itu-t 5 1 5 : selected-attribute-types : Selected Attribute Types
26 10
27selected-attribute-types 55 : clearance 11selected-attribute-types 55 : clearance
28 12
@@ -40,34 +24,12 @@ ISO-US 10045 : ansi-X9-62 : ANSI X9.62
40!Alias id-fieldType ansi-X9-62 1 24!Alias id-fieldType ansi-X9-62 1
41X9-62_id-fieldType 1 : prime-field 25X9-62_id-fieldType 1 : prime-field
42X9-62_id-fieldType 2 : characteristic-two-field 26X9-62_id-fieldType 2 : characteristic-two-field
43X9-62_characteristic-two-field 3 : id-characteristic-two-basis 27# ... characteristic-two-field OID subtree
44X9-62_id-characteristic-two-basis 1 : onBasis
45X9-62_id-characteristic-two-basis 2 : tpBasis
46X9-62_id-characteristic-two-basis 3 : ppBasis
47!Alias id-publicKeyType ansi-X9-62 2 28!Alias id-publicKeyType ansi-X9-62 2
48X9-62_id-publicKeyType 1 : id-ecPublicKey 29X9-62_id-publicKeyType 1 : id-ecPublicKey
49!Alias ellipticCurve ansi-X9-62 3 30!Alias ellipticCurve ansi-X9-62 3
50!Alias c-TwoCurve X9-62_ellipticCurve 0 31!Alias c-TwoCurve X9-62_ellipticCurve 0
51X9-62_c-TwoCurve 1 : c2pnb163v1 32# ... characteristic 2 curve OIDs
52X9-62_c-TwoCurve 2 : c2pnb163v2
53X9-62_c-TwoCurve 3 : c2pnb163v3
54X9-62_c-TwoCurve 4 : c2pnb176v1
55X9-62_c-TwoCurve 5 : c2tnb191v1
56X9-62_c-TwoCurve 6 : c2tnb191v2
57X9-62_c-TwoCurve 7 : c2tnb191v3
58X9-62_c-TwoCurve 8 : c2onb191v4
59X9-62_c-TwoCurve 9 : c2onb191v5
60X9-62_c-TwoCurve 10 : c2pnb208w1
61X9-62_c-TwoCurve 11 : c2tnb239v1
62X9-62_c-TwoCurve 12 : c2tnb239v2
63X9-62_c-TwoCurve 13 : c2tnb239v3
64X9-62_c-TwoCurve 14 : c2onb239v4
65X9-62_c-TwoCurve 15 : c2onb239v5
66X9-62_c-TwoCurve 16 : c2pnb272w1
67X9-62_c-TwoCurve 17 : c2pnb304w1
68X9-62_c-TwoCurve 18 : c2tnb359v1
69X9-62_c-TwoCurve 19 : c2pnb368w1
70X9-62_c-TwoCurve 20 : c2tnb431r1
71!Alias primeCurve X9-62_ellipticCurve 1 33!Alias primeCurve X9-62_ellipticCurve 1
72X9-62_primeCurve 1 : prime192v1 34X9-62_primeCurve 1 : prime192v1
73X9-62_primeCurve 2 : prime192v2 35X9-62_primeCurve 2 : prime192v2
@@ -80,60 +42,6 @@ X9-62_primeCurve 7 : prime256v1
80!global 42!global
81X9-62_id-ecSigType 1 : ecdsa-with-SHA1 43X9-62_id-ecSigType 1 : ecdsa-with-SHA1
82 44
83# SECG curve OIDs from "SEC 2: Recommended Elliptic Curve Domain Parameters"
84# (http://www.secg.org/)
85!Alias secg_ellipticCurve certicom-arc 0
86# SECG prime curves OIDs
87secg-ellipticCurve 6 : secp112r1
88secg-ellipticCurve 7 : secp112r2
89secg-ellipticCurve 28 : secp128r1
90secg-ellipticCurve 29 : secp128r2
91secg-ellipticCurve 9 : secp160k1
92secg-ellipticCurve 8 : secp160r1
93secg-ellipticCurve 30 : secp160r2
94secg-ellipticCurve 31 : secp192k1
95# NOTE: the curve secp192r1 is the same as prime192v1 defined above
96# and is therefore omitted
97secg-ellipticCurve 32 : secp224k1
98secg-ellipticCurve 33 : secp224r1
99secg-ellipticCurve 10 : secp256k1
100# NOTE: the curve secp256r1 is the same as prime256v1 defined above
101# and is therefore omitted
102secg-ellipticCurve 34 : secp384r1
103secg-ellipticCurve 35 : secp521r1
104# SECG characteristic two curves OIDs
105secg-ellipticCurve 4 : sect113r1
106secg-ellipticCurve 5 : sect113r2
107secg-ellipticCurve 22 : sect131r1
108secg-ellipticCurve 23 : sect131r2
109secg-ellipticCurve 1 : sect163k1
110secg-ellipticCurve 2 : sect163r1
111secg-ellipticCurve 15 : sect163r2
112secg-ellipticCurve 24 : sect193r1
113secg-ellipticCurve 25 : sect193r2
114secg-ellipticCurve 26 : sect233k1
115secg-ellipticCurve 27 : sect233r1
116secg-ellipticCurve 3 : sect239k1
117secg-ellipticCurve 16 : sect283k1
118secg-ellipticCurve 17 : sect283r1
119secg-ellipticCurve 36 : sect409k1
120secg-ellipticCurve 37 : sect409r1
121secg-ellipticCurve 38 : sect571k1
122secg-ellipticCurve 39 : sect571r1
123
124# WAP/TLS curve OIDs (http://www.wapforum.org/)
125!Alias wap-wsg-idm-ecid wap-wsg 4
126wap-wsg-idm-ecid 1 : wap-wsg-idm-ecid-wtls1
127wap-wsg-idm-ecid 3 : wap-wsg-idm-ecid-wtls3
128wap-wsg-idm-ecid 4 : wap-wsg-idm-ecid-wtls4
129wap-wsg-idm-ecid 5 : wap-wsg-idm-ecid-wtls5
130wap-wsg-idm-ecid 6 : wap-wsg-idm-ecid-wtls6
131wap-wsg-idm-ecid 7 : wap-wsg-idm-ecid-wtls7
132wap-wsg-idm-ecid 8 : wap-wsg-idm-ecid-wtls8
133wap-wsg-idm-ecid 9 : wap-wsg-idm-ecid-wtls9
134wap-wsg-idm-ecid 10 : wap-wsg-idm-ecid-wtls10
135wap-wsg-idm-ecid 11 : wap-wsg-idm-ecid-wtls11
136wap-wsg-idm-ecid 12 : wap-wsg-idm-ecid-wtls12
137 45
138 46
139ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc 47ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc
@@ -145,10 +53,6 @@ ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc
145!Cname pbeWithMD5AndCast5-CBC 53!Cname pbeWithMD5AndCast5-CBC
146ISO-US 113533 7 66 12 : : pbeWithMD5AndCast5CBC 54ISO-US 113533 7 66 12 : : pbeWithMD5AndCast5CBC
147 55
148# Macs for CMP and CRMF
149ISO-US 113533 7 66 13 : id-PasswordBasedMAC : password based MAC
150ISO-US 113533 7 66 30 : id-DHBasedMac : Diffie-Hellman based MAC
151
152ISO-US 113549 : rsadsi : RSA Data Security, Inc. 56ISO-US 113549 : rsadsi : RSA Data Security, Inc.
153 57
154rsadsi 1 : pkcs : RSA Data Security, Inc. PKCS 58rsadsi 1 : pkcs : RSA Data Security, Inc. PKCS
@@ -245,8 +149,6 @@ id-smime-ct 5 : id-smime-ct-TDTInfo
245id-smime-ct 6 : id-smime-ct-contentInfo 149id-smime-ct 6 : id-smime-ct-contentInfo
246id-smime-ct 7 : id-smime-ct-DVCSRequestData 150id-smime-ct 7 : id-smime-ct-DVCSRequestData
247id-smime-ct 8 : id-smime-ct-DVCSResponseData 151id-smime-ct 8 : id-smime-ct-DVCSResponseData
248id-smime-ct 9 : id-smime-ct-compressedData
249id-smime-ct 27 : id-ct-asciiTextWithCRLF
250 152
251# S/MIME Attributes 153# S/MIME Attributes
252id-smime-aa 1 : id-smime-aa-receiptRequest 154id-smime-aa 1 : id-smime-aa-receiptRequest
@@ -494,7 +396,6 @@ id-it 12 : id-it-revPassphrase
494id-it 13 : id-it-implicitConfirm 396id-it 13 : id-it-implicitConfirm
495id-it 14 : id-it-confirmWaitTime 397id-it 14 : id-it-confirmWaitTime
496id-it 15 : id-it-origPKIMessage 398id-it 15 : id-it-origPKIMessage
497id-it 16 : id-it-suppLangTags
498 399
499# CRMF registration 400# CRMF registration
500id-pkip 1 : id-regCtrl 401id-pkip 1 : id-regCtrl
@@ -581,7 +482,6 @@ id-ad 2 : caIssuers : CA Issuers
581id-ad 3 : ad_timestamping : AD Time Stamping 482id-ad 3 : ad_timestamping : AD Time Stamping
582!Cname ad-dvcs 483!Cname ad-dvcs
583id-ad 4 : AD_DVCS : ad dvcs 484id-ad 4 : AD_DVCS : ad dvcs
584id-ad 5 : caRepository : CA Repository
585 485
586 486
587!Alias id-pkix-OCSP ad-OCSP 487!Alias id-pkix-OCSP ad-OCSP
@@ -669,8 +569,6 @@ X500algorithms 3 100 : RSA-MDC2 : mdc2WithRSA
669X500algorithms 3 101 : MDC2 : mdc2 569X500algorithms 3 101 : MDC2 : mdc2
670 570
671X500 29 : id-ce 571X500 29 : id-ce
672!Cname subject-directory-attributes
673id-ce 9 : subjectDirectoryAttributes : X509v3 Subject Directory Attributes
674!Cname subject-key-identifier 572!Cname subject-key-identifier
675id-ce 14 : subjectKeyIdentifier : X509v3 Subject Key Identifier 573id-ce 14 : subjectKeyIdentifier : X509v3 Subject Key Identifier
676!Cname key-usage 574!Cname key-usage
@@ -691,28 +589,18 @@ id-ce 21 : CRLReason : X509v3 CRL Reason Code
691id-ce 24 : invalidityDate : Invalidity Date 589id-ce 24 : invalidityDate : Invalidity Date
692!Cname delta-crl 590!Cname delta-crl
693id-ce 27 : deltaCRL : X509v3 Delta CRL Indicator 591id-ce 27 : deltaCRL : X509v3 Delta CRL Indicator
694!Cname issuing-distribution-point
695id-ce 28 : issuingDistributionPoint : X509v3 Issuing Distrubution Point
696!Cname certificate-issuer
697id-ce 29 : certificateIssuer : X509v3 Certificate Issuer
698!Cname name-constraints 592!Cname name-constraints
699id-ce 30 : nameConstraints : X509v3 Name Constraints 593id-ce 30 : nameConstraints : X509v3 Name Constraints
700!Cname crl-distribution-points 594!Cname crl-distribution-points
701id-ce 31 : crlDistributionPoints : X509v3 CRL Distribution Points 595id-ce 31 : crlDistributionPoints : X509v3 CRL Distribution Points
702!Cname certificate-policies 596!Cname certificate-policies
703id-ce 32 : certificatePolicies : X509v3 Certificate Policies 597id-ce 32 : certificatePolicies : X509v3 Certificate Policies
704!Cname any-policy
705certificate-policies 0 : anyPolicy : X509v3 Any Policy
706!Cname policy-mappings
707id-ce 33 : policyMappings : X509v3 Policy Mappings
708!Cname authority-key-identifier 598!Cname authority-key-identifier
709id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier 599id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier
710!Cname policy-constraints 600!Cname policy-constraints
711id-ce 36 : policyConstraints : X509v3 Policy Constraints 601id-ce 36 : policyConstraints : X509v3 Policy Constraints
712!Cname ext-key-usage 602!Cname ext-key-usage
713id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage 603id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage
714!Cname inhibit-any-policy
715id-ce 54 : inhibitAnyPolicy : X509v3 Inhibit Any Policy
716!Cname target-information 604!Cname target-information
717id-ce 55 : targetInformation : X509v3 AC Targeting 605id-ce 55 : targetInformation : X509v3 AC Targeting
718!Cname no-rev-avail 606!Cname no-rev-avail
@@ -780,7 +668,7 @@ mime-mhs-headings 2 : id-hex-multipart-message : id-hex-multipart-message
780!Cname rle-compression 668!Cname rle-compression
7811 1 1 1 666 1 : RLE : run length compression 6691 1 1 1 666 1 : RLE : run length compression
782!Cname zlib-compression 670!Cname zlib-compression
783id-smime-alg 8 : ZLIB : zlib compression 6711 1 1 1 666 2 : ZLIB : zlib compression
784 672
785# AES aka Rijndael 673# AES aka Rijndael
786 674
@@ -822,10 +710,6 @@ aes 44 : AES-256-CFB : aes-256-cfb
822 : DES-EDE3-CFB1 : des-ede3-cfb1 710 : DES-EDE3-CFB1 : des-ede3-cfb1
823 : DES-EDE3-CFB8 : des-ede3-cfb8 711 : DES-EDE3-CFB8 : des-ede3-cfb8
824 712
825aes 5 : id-aes128-wrap
826aes 25 : id-aes192-wrap
827aes 45 : id-aes256-wrap
828
829# OIDs for SHA224, SHA256, SHA385 and SHA512, according to x9.84. 713# OIDs for SHA224, SHA256, SHA385 and SHA512, according to x9.84.
830!Alias nist_hashalgs nistAlgorithms 2 714!Alias nist_hashalgs nistAlgorithms 2
831nist_hashalgs 1 : SHA256 : sha256 715nist_hashalgs 1 : SHA256 : sha256
@@ -844,9 +728,9 @@ holdInstruction 2 : holdInstructionCallIssuer : Hold Instruction Call Issuer
844!Cname hold-instruction-reject 728!Cname hold-instruction-reject
845holdInstruction 3 : holdInstructionReject : Hold Instruction Reject 729holdInstruction 3 : holdInstructionReject : Hold Instruction Reject
846 730
847# OID's from ITU-T. Most of this is defined in RFC 1274. A couple of 731# OID's from CCITT. Most of this is defined in RFC 1274. A couple of
848# them are also mentioned in RFC 2247 732# them are also mentioned in RFC 2247
849itu-t 9 : data 733ccitt 9 : data
850data 2342 : pss 734data 2342 : pss
851pss 19200300 : ucl 735pss 19200300 : ucl
852ucl 100 : pilot 736ucl 100 : pilot
@@ -920,7 +804,7 @@ pilotAttributeType 54 : : dITRedirect
920pilotAttributeType 55 : audio 804pilotAttributeType 55 : audio
921pilotAttributeType 56 : : documentPublisher 805pilotAttributeType 56 : : documentPublisher
922 806
923international-organizations 42 : id-set : Secure Electronic Transactions 8072 23 42 : id-set : Secure Electronic Transactions
924 808
925id-set 0 : set-ctype : content types 809id-set 0 : set-ctype : content types
926id-set 1 : set-msgExt : message extensions 810id-set 1 : set-msgExt : message extensions
@@ -1066,54 +950,3 @@ set-brand 6011 : set-brand-Novus
1066 950
1067rsadsi 3 10 : DES-CDMF : des-cdmf 951rsadsi 3 10 : DES-CDMF : des-cdmf
1068rsadsi 1 1 6 : rsaOAEPEncryptionSET 952rsadsi 1 1 6 : rsaOAEPEncryptionSET
1069
1070 : Oakley-EC2N-3 : ipsec3
1071 : Oakley-EC2N-4 : ipsec4
1072
1073
1074# Definitions for Camellia cipher - CBC MODE
10751 2 392 200011 61 1 1 1 2 : CAMELLIA-128-CBC : camellia-128-cbc
10761 2 392 200011 61 1 1 1 3 : CAMELLIA-192-CBC : camellia-192-cbc
10771 2 392 200011 61 1 1 1 4 : CAMELLIA-256-CBC : camellia-256-cbc
1078
1079# Definitions for Camellia cipher - ECB, CFB, OFB MODE
1080!Alias ntt-ds 0 3 4401 5
1081!Alias camellia ntt-ds 3 1 9
1082
1083camellia 1 : CAMELLIA-128-ECB : camellia-128-ecb
1084!Cname camellia-128-ofb128
1085camellia 3 : CAMELLIA-128-OFB : camellia-128-ofb
1086!Cname camellia-128-cfb128
1087camellia 4 : CAMELLIA-128-CFB : camellia-128-cfb
1088
1089camellia 21 : CAMELLIA-192-ECB : camellia-192-ecb
1090!Cname camellia-192-ofb128
1091camellia 23 : CAMELLIA-192-OFB : camellia-192-ofb
1092!Cname camellia-192-cfb128
1093camellia 24 : CAMELLIA-192-CFB : camellia-192-cfb
1094
1095camellia 41 : CAMELLIA-256-ECB : camellia-256-ecb
1096!Cname camellia-256-ofb128
1097camellia 43 : CAMELLIA-256-OFB : camellia-256-ofb
1098!Cname camellia-256-cfb128
1099camellia 44 : CAMELLIA-256-CFB : camellia-256-cfb
1100
1101# There are no OIDs for these modes...
1102
1103 : CAMELLIA-128-CFB1 : camellia-128-cfb1
1104 : CAMELLIA-192-CFB1 : camellia-192-cfb1
1105 : CAMELLIA-256-CFB1 : camellia-256-cfb1
1106 : CAMELLIA-128-CFB8 : camellia-128-cfb8
1107 : CAMELLIA-192-CFB8 : camellia-192-cfb8
1108 : CAMELLIA-256-CFB8 : camellia-256-cfb8
1109
1110
1111# Definitions for SEED cipher - ECB, CBC, OFB mode
1112
1113member-body 410 200004 : KISA : kisa
1114kisa 1 3 : SEED-ECB : seed-ecb
1115kisa 1 4 : SEED-CBC : seed-cbc
1116!Cname seed-cfb128
1117kisa 1 5 : SEED-CFB : seed-cfb
1118!Cname seed-ofb128
1119kisa 1 6 : SEED-OFB : seed-ofb