diff options
Diffstat (limited to 'src/lib/libcrypto/objects')
| -rw-r--r-- | src/lib/libcrypto/objects/Makefile (renamed from src/lib/libcrypto/objects/Makefile.ssl) | 71 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/o_names.c | 372 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 810 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_dat.pl | 307 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_err.c | 102 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_lib.c | 129 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_mac.num | 919 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_xref.c | 234 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_xref.h | 77 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/obj_xref.txt | 46 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/objects.README | 44 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/objects.h | 1138 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/objects.pl | 233 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/objects.txt | 1292 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/objxref.pl | 107 |
15 files changed, 5849 insertions, 32 deletions
diff --git a/src/lib/libcrypto/objects/Makefile.ssl b/src/lib/libcrypto/objects/Makefile index 3e7a194cf9..a8aedbd422 100644 --- a/src/lib/libcrypto/objects/Makefile.ssl +++ b/src/lib/libcrypto/objects/Makefile | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # | 1 | # |
| 2 | # SSLeay/crypto/objects/Makefile | 2 | # OpenSSL/crypto/objects/Makefile |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | DIR= objects | 5 | DIR= objects |
| @@ -7,13 +7,7 @@ TOP= ../.. | |||
| 7 | CC= cc | 7 | CC= cc |
| 8 | INCLUDES= -I.. -I$(TOP) -I../../include | 8 | INCLUDES= -I.. -I$(TOP) -I../../include |
| 9 | CFLAG=-g | 9 | CFLAG=-g |
| 10 | INSTALL_PREFIX= | 10 | MAKEFILE= Makefile |
| 11 | OPENSSLDIR= /usr/local/ssl | ||
| 12 | INSTALLTOP=/usr/local/ssl | ||
| 13 | MAKE= make -f Makefile.ssl | ||
| 14 | MAKEDEPPROG= makedepend | ||
| 15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) | ||
| 16 | MAKEFILE= Makefile.ssl | ||
| 17 | AR= ar r | 11 | AR= ar r |
| 18 | PERL= perl | 12 | PERL= perl |
| 19 | 13 | ||
| @@ -24,20 +18,20 @@ TEST= | |||
| 24 | APPS= | 18 | APPS= |
| 25 | 19 | ||
| 26 | LIB=$(TOP)/libcrypto.a | 20 | LIB=$(TOP)/libcrypto.a |
| 27 | LIBSRC= o_names.c obj_dat.c obj_lib.c obj_err.c | 21 | LIBSRC= o_names.c obj_dat.c obj_lib.c obj_err.c obj_xref.c |
| 28 | LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o | 22 | LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o obj_xref.o |
| 29 | 23 | ||
| 30 | SRC= $(LIBSRC) | 24 | SRC= $(LIBSRC) |
| 31 | 25 | ||
| 32 | EXHEADER= objects.h obj_mac.h | 26 | EXHEADER= objects.h obj_mac.h |
| 33 | HEADER= $(EXHEADER) obj_dat.h | 27 | HEADER= $(EXHEADER) obj_dat.h obj_xref.h |
| 34 | 28 | ||
| 35 | ALL= $(GENERAL) $(SRC) $(HEADER) | 29 | ALL= $(GENERAL) $(SRC) $(HEADER) |
| 36 | 30 | ||
| 37 | top: | 31 | top: |
| 38 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | 32 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) |
| 39 | 33 | ||
| 40 | all: obj_dat.h lib | 34 | all: obj_dat.h obj_xref.h lib |
| 41 | 35 | ||
| 42 | lib: $(LIBOBJ) | 36 | lib: $(LIBOBJ) |
| 43 | $(AR) $(LIB) $(LIBOBJ) | 37 | $(AR) $(LIB) $(LIBOBJ) |
| @@ -50,18 +44,23 @@ obj_dat.h: obj_dat.pl obj_mac.h | |||
| 50 | # objects.pl both reads and writes obj_mac.num | 44 | # objects.pl both reads and writes obj_mac.num |
| 51 | obj_mac.h: objects.pl objects.txt obj_mac.num | 45 | obj_mac.h: objects.pl objects.txt obj_mac.num |
| 52 | $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h | 46 | $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h |
| 47 | @sleep 1; touch obj_mac.h; sleep 1 | ||
| 48 | |||
| 49 | obj_xref.h: objxref.pl obj_xref.txt obj_mac.num | ||
| 50 | $(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h | ||
| 51 | @sleep 1; touch obj_xref.h; sleep 1 | ||
| 53 | 52 | ||
| 54 | files: | 53 | files: |
| 55 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | 54 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |
| 56 | 55 | ||
| 57 | links: | 56 | links: |
| 58 | @sh $(TOP)/util/point.sh Makefile.ssl Makefile | ||
| 59 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | 57 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) |
| 60 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | 58 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) |
| 61 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | 59 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) |
| 62 | 60 | ||
| 63 | install: | 61 | install: |
| 64 | @for i in $(EXHEADER) ; \ | 62 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... |
| 63 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ | ||
| 65 | do \ | 64 | do \ |
| 66 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | 65 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
| 67 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | 66 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ |
| @@ -76,6 +75,7 @@ lint: | |||
| 76 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 75 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
| 77 | 76 | ||
| 78 | depend: | 77 | depend: |
| 78 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... | ||
| 79 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) | 79 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) |
| 80 | 80 | ||
| 81 | dclean: | 81 | dclean: |
| @@ -88,8 +88,8 @@ clean: | |||
| 88 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 88 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 89 | 89 | ||
| 90 | o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 90 | o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 91 | o_names.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 91 | o_names.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
| 92 | o_names.o: ../../include/openssl/e_os2.h ../../include/openssl/lhash.h | 92 | o_names.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 93 | o_names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 93 | o_names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 94 | o_names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 94 | o_names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 95 | o_names.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | 95 | o_names.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
| @@ -105,19 +105,26 @@ obj_dat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | |||
| 105 | obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 105 | obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
| 106 | obj_dat.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_dat.c obj_dat.h | 106 | obj_dat.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_dat.c obj_dat.h |
| 107 | obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 107 | obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 108 | obj_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h | 108 | obj_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
| 109 | obj_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 109 | obj_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 110 | obj_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | 110 | obj_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 111 | obj_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 111 | obj_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 112 | obj_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 112 | obj_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
| 113 | obj_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 113 | obj_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 114 | obj_err.o: ../../include/openssl/symhacks.h obj_err.c | 114 | obj_err.o: obj_err.c |
| 115 | obj_lib.o: ../../e_os.h ../../include/openssl/asn1.h | 115 | obj_lib.o: ../../e_os.h ../../include/openssl/asn1.h |
| 116 | obj_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | 116 | obj_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
| 117 | obj_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 117 | obj_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
| 118 | obj_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 118 | obj_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
| 119 | obj_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | 119 | obj_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 120 | obj_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 120 | obj_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 121 | obj_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 121 | obj_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h |
| 122 | obj_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 122 | obj_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 123 | obj_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_lib.c | 123 | obj_lib.o: ../cryptlib.h obj_lib.c |
| 124 | obj_xref.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 125 | obj_xref.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 126 | obj_xref.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 127 | obj_xref.o: ../../include/openssl/opensslconf.h | ||
| 128 | obj_xref.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 129 | obj_xref.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 130 | obj_xref.o: ../../include/openssl/symhacks.h obj_xref.c obj_xref.h | ||
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c new file mode 100644 index 0000000000..84380a96a9 --- /dev/null +++ b/src/lib/libcrypto/objects/o_names.c | |||
| @@ -0,0 +1,372 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | #include <stdlib.h> | ||
| 3 | #include <string.h> | ||
| 4 | |||
| 5 | #include <openssl/err.h> | ||
| 6 | #include <openssl/lhash.h> | ||
| 7 | #include <openssl/objects.h> | ||
| 8 | #include <openssl/safestack.h> | ||
| 9 | #include <openssl/e_os2.h> | ||
| 10 | |||
| 11 | /* Later versions of DEC C has started to add lnkage information to certain | ||
| 12 | * functions, which makes it tricky to use them as values to regular function | ||
| 13 | * pointers. One way is to define a macro that takes care of casting them | ||
| 14 | * correctly. | ||
| 15 | */ | ||
| 16 | #ifdef OPENSSL_SYS_VMS_DECC | ||
| 17 | # define OPENSSL_strcmp (int (*)(const char *,const char *))strcmp | ||
| 18 | #else | ||
| 19 | # define OPENSSL_strcmp strcmp | ||
| 20 | #endif | ||
| 21 | |||
| 22 | /* I use the ex_data stuff to manage the identifiers for the obj_name_types | ||
| 23 | * that applications may define. I only really use the free function field. | ||
| 24 | */ | ||
| 25 | DECLARE_LHASH_OF(OBJ_NAME); | ||
| 26 | static LHASH_OF(OBJ_NAME) *names_lh=NULL; | ||
| 27 | static int names_type_num=OBJ_NAME_TYPE_NUM; | ||
| 28 | |||
| 29 | typedef struct name_funcs_st | ||
| 30 | { | ||
| 31 | unsigned long (*hash_func)(const char *name); | ||
| 32 | int (*cmp_func)(const char *a,const char *b); | ||
| 33 | void (*free_func)(const char *, int, const char *); | ||
| 34 | } NAME_FUNCS; | ||
| 35 | |||
| 36 | DECLARE_STACK_OF(NAME_FUNCS) | ||
| 37 | IMPLEMENT_STACK_OF(NAME_FUNCS) | ||
| 38 | |||
| 39 | static STACK_OF(NAME_FUNCS) *name_funcs_stack; | ||
| 40 | |||
| 41 | /* The LHASH callbacks now use the raw "void *" prototypes and do per-variable | ||
| 42 | * casting in the functions. This prevents function pointer casting without the | ||
| 43 | * need for macro-generated wrapper functions. */ | ||
| 44 | |||
| 45 | /* static unsigned long obj_name_hash(OBJ_NAME *a); */ | ||
| 46 | static unsigned long obj_name_hash(const void *a_void); | ||
| 47 | /* static int obj_name_cmp(OBJ_NAME *a,OBJ_NAME *b); */ | ||
| 48 | static int obj_name_cmp(const void *a_void,const void *b_void); | ||
| 49 | |||
| 50 | static IMPLEMENT_LHASH_HASH_FN(obj_name, OBJ_NAME) | ||
| 51 | static IMPLEMENT_LHASH_COMP_FN(obj_name, OBJ_NAME) | ||
| 52 | |||
| 53 | int OBJ_NAME_init(void) | ||
| 54 | { | ||
| 55 | if (names_lh != NULL) return(1); | ||
| 56 | MemCheck_off(); | ||
| 57 | names_lh=lh_OBJ_NAME_new(); | ||
| 58 | MemCheck_on(); | ||
| 59 | return(names_lh != NULL); | ||
| 60 | } | ||
| 61 | |||
| 62 | int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), | ||
| 63 | int (*cmp_func)(const char *, const char *), | ||
| 64 | void (*free_func)(const char *, int, const char *)) | ||
| 65 | { | ||
| 66 | int ret; | ||
| 67 | int i; | ||
| 68 | NAME_FUNCS *name_funcs; | ||
| 69 | |||
| 70 | if (name_funcs_stack == NULL) | ||
| 71 | { | ||
| 72 | MemCheck_off(); | ||
| 73 | name_funcs_stack=sk_NAME_FUNCS_new_null(); | ||
| 74 | MemCheck_on(); | ||
| 75 | } | ||
| 76 | if ((name_funcs_stack == NULL)) | ||
| 77 | { | ||
| 78 | /* ERROR */ | ||
| 79 | return(0); | ||
| 80 | } | ||
| 81 | ret=names_type_num; | ||
| 82 | names_type_num++; | ||
| 83 | for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++) | ||
| 84 | { | ||
| 85 | MemCheck_off(); | ||
| 86 | name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); | ||
| 87 | MemCheck_on(); | ||
| 88 | if (!name_funcs) | ||
| 89 | { | ||
| 90 | OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX,ERR_R_MALLOC_FAILURE); | ||
| 91 | return(0); | ||
| 92 | } | ||
| 93 | name_funcs->hash_func = lh_strhash; | ||
| 94 | name_funcs->cmp_func = OPENSSL_strcmp; | ||
| 95 | name_funcs->free_func = 0; /* NULL is often declared to | ||
| 96 | * ((void *)0), which according | ||
| 97 | * to Compaq C is not really | ||
| 98 | * compatible with a function | ||
| 99 | * pointer. -- Richard Levitte*/ | ||
| 100 | MemCheck_off(); | ||
| 101 | sk_NAME_FUNCS_push(name_funcs_stack,name_funcs); | ||
| 102 | MemCheck_on(); | ||
| 103 | } | ||
| 104 | name_funcs = sk_NAME_FUNCS_value(name_funcs_stack, ret); | ||
| 105 | if (hash_func != NULL) | ||
| 106 | name_funcs->hash_func = hash_func; | ||
| 107 | if (cmp_func != NULL) | ||
| 108 | name_funcs->cmp_func = cmp_func; | ||
| 109 | if (free_func != NULL) | ||
| 110 | name_funcs->free_func = free_func; | ||
| 111 | return(ret); | ||
| 112 | } | ||
| 113 | |||
| 114 | /* static int obj_name_cmp(OBJ_NAME *a, OBJ_NAME *b) */ | ||
| 115 | static int obj_name_cmp(const void *a_void, const void *b_void) | ||
| 116 | { | ||
| 117 | int ret; | ||
| 118 | const OBJ_NAME *a = (const OBJ_NAME *)a_void; | ||
| 119 | const OBJ_NAME *b = (const OBJ_NAME *)b_void; | ||
| 120 | |||
| 121 | ret=a->type-b->type; | ||
| 122 | if (ret == 0) | ||
| 123 | { | ||
| 124 | if ((name_funcs_stack != NULL) | ||
| 125 | && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) | ||
| 126 | { | ||
| 127 | ret=sk_NAME_FUNCS_value(name_funcs_stack, | ||
| 128 | a->type)->cmp_func(a->name,b->name); | ||
| 129 | } | ||
| 130 | else | ||
| 131 | ret=strcmp(a->name,b->name); | ||
| 132 | } | ||
| 133 | return(ret); | ||
| 134 | } | ||
| 135 | |||
| 136 | /* static unsigned long obj_name_hash(OBJ_NAME *a) */ | ||
| 137 | static unsigned long obj_name_hash(const void *a_void) | ||
| 138 | { | ||
| 139 | unsigned long ret; | ||
| 140 | const OBJ_NAME *a = (const OBJ_NAME *)a_void; | ||
| 141 | |||
| 142 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) | ||
| 143 | { | ||
| 144 | ret=sk_NAME_FUNCS_value(name_funcs_stack, | ||
| 145 | a->type)->hash_func(a->name); | ||
| 146 | } | ||
| 147 | else | ||
| 148 | { | ||
| 149 | ret=lh_strhash(a->name); | ||
| 150 | } | ||
| 151 | ret^=a->type; | ||
| 152 | return(ret); | ||
| 153 | } | ||
| 154 | |||
| 155 | const char *OBJ_NAME_get(const char *name, int type) | ||
| 156 | { | ||
| 157 | OBJ_NAME on,*ret; | ||
| 158 | int num=0,alias; | ||
| 159 | |||
| 160 | if (name == NULL) return(NULL); | ||
| 161 | if ((names_lh == NULL) && !OBJ_NAME_init()) return(NULL); | ||
| 162 | |||
| 163 | alias=type&OBJ_NAME_ALIAS; | ||
| 164 | type&= ~OBJ_NAME_ALIAS; | ||
| 165 | |||
| 166 | on.name=name; | ||
| 167 | on.type=type; | ||
| 168 | |||
| 169 | for (;;) | ||
| 170 | { | ||
| 171 | ret=lh_OBJ_NAME_retrieve(names_lh,&on); | ||
| 172 | if (ret == NULL) return(NULL); | ||
| 173 | if ((ret->alias) && !alias) | ||
| 174 | { | ||
| 175 | if (++num > 10) return(NULL); | ||
| 176 | on.name=ret->data; | ||
| 177 | } | ||
| 178 | else | ||
| 179 | { | ||
| 180 | return(ret->data); | ||
| 181 | } | ||
| 182 | } | ||
| 183 | } | ||
| 184 | |||
| 185 | int OBJ_NAME_add(const char *name, int type, const char *data) | ||
| 186 | { | ||
| 187 | OBJ_NAME *onp,*ret; | ||
| 188 | int alias; | ||
| 189 | |||
| 190 | if ((names_lh == NULL) && !OBJ_NAME_init()) return(0); | ||
| 191 | |||
| 192 | alias=type&OBJ_NAME_ALIAS; | ||
| 193 | type&= ~OBJ_NAME_ALIAS; | ||
| 194 | |||
| 195 | onp=(OBJ_NAME *)OPENSSL_malloc(sizeof(OBJ_NAME)); | ||
| 196 | if (onp == NULL) | ||
| 197 | { | ||
| 198 | /* ERROR */ | ||
| 199 | return(0); | ||
| 200 | } | ||
| 201 | |||
| 202 | onp->name=name; | ||
| 203 | onp->alias=alias; | ||
| 204 | onp->type=type; | ||
| 205 | onp->data=data; | ||
| 206 | |||
| 207 | ret=lh_OBJ_NAME_insert(names_lh,onp); | ||
| 208 | if (ret != NULL) | ||
| 209 | { | ||
| 210 | /* free things */ | ||
| 211 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) | ||
| 212 | { | ||
| 213 | /* XXX: I'm not sure I understand why the free | ||
| 214 | * function should get three arguments... | ||
| 215 | * -- Richard Levitte | ||
| 216 | */ | ||
| 217 | sk_NAME_FUNCS_value(name_funcs_stack, | ||
| 218 | ret->type)->free_func(ret->name,ret->type,ret->data); | ||
| 219 | } | ||
| 220 | OPENSSL_free(ret); | ||
| 221 | } | ||
| 222 | else | ||
| 223 | { | ||
| 224 | if (lh_OBJ_NAME_error(names_lh)) | ||
| 225 | { | ||
| 226 | /* ERROR */ | ||
| 227 | return(0); | ||
| 228 | } | ||
| 229 | } | ||
| 230 | return(1); | ||
| 231 | } | ||
| 232 | |||
| 233 | int OBJ_NAME_remove(const char *name, int type) | ||
| 234 | { | ||
| 235 | OBJ_NAME on,*ret; | ||
| 236 | |||
| 237 | if (names_lh == NULL) return(0); | ||
| 238 | |||
| 239 | type&= ~OBJ_NAME_ALIAS; | ||
| 240 | on.name=name; | ||
| 241 | on.type=type; | ||
| 242 | ret=lh_OBJ_NAME_delete(names_lh,&on); | ||
| 243 | if (ret != NULL) | ||
| 244 | { | ||
| 245 | /* free things */ | ||
| 246 | if ((name_funcs_stack != NULL) && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) | ||
| 247 | { | ||
| 248 | /* XXX: I'm not sure I understand why the free | ||
| 249 | * function should get three arguments... | ||
| 250 | * -- Richard Levitte | ||
| 251 | */ | ||
| 252 | sk_NAME_FUNCS_value(name_funcs_stack, | ||
| 253 | ret->type)->free_func(ret->name,ret->type,ret->data); | ||
| 254 | } | ||
| 255 | OPENSSL_free(ret); | ||
| 256 | return(1); | ||
| 257 | } | ||
| 258 | else | ||
| 259 | return(0); | ||
| 260 | } | ||
| 261 | |||
| 262 | struct doall | ||
| 263 | { | ||
| 264 | int type; | ||
| 265 | void (*fn)(const OBJ_NAME *,void *arg); | ||
| 266 | void *arg; | ||
| 267 | }; | ||
| 268 | |||
| 269 | static void do_all_fn_doall_arg(const OBJ_NAME *name,struct doall *d) | ||
| 270 | { | ||
| 271 | if(name->type == d->type) | ||
| 272 | d->fn(name,d->arg); | ||
| 273 | } | ||
| 274 | |||
| 275 | static IMPLEMENT_LHASH_DOALL_ARG_FN(do_all_fn, const OBJ_NAME, struct doall) | ||
| 276 | |||
| 277 | void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg),void *arg) | ||
| 278 | { | ||
| 279 | struct doall d; | ||
| 280 | |||
| 281 | d.type=type; | ||
| 282 | d.fn=fn; | ||
| 283 | d.arg=arg; | ||
| 284 | |||
| 285 | lh_OBJ_NAME_doall_arg(names_lh, LHASH_DOALL_ARG_FN(do_all_fn), | ||
| 286 | struct doall, &d); | ||
| 287 | } | ||
| 288 | |||
| 289 | struct doall_sorted | ||
| 290 | { | ||
| 291 | int type; | ||
| 292 | int n; | ||
| 293 | const OBJ_NAME **names; | ||
| 294 | }; | ||
| 295 | |||
| 296 | static void do_all_sorted_fn(const OBJ_NAME *name,void *d_) | ||
| 297 | { | ||
| 298 | struct doall_sorted *d=d_; | ||
| 299 | |||
| 300 | if(name->type != d->type) | ||
| 301 | return; | ||
| 302 | |||
| 303 | d->names[d->n++]=name; | ||
| 304 | } | ||
| 305 | |||
| 306 | static int do_all_sorted_cmp(const void *n1_,const void *n2_) | ||
| 307 | { | ||
| 308 | const OBJ_NAME * const *n1=n1_; | ||
| 309 | const OBJ_NAME * const *n2=n2_; | ||
| 310 | |||
| 311 | return strcmp((*n1)->name,(*n2)->name); | ||
| 312 | } | ||
| 313 | |||
| 314 | void OBJ_NAME_do_all_sorted(int type,void (*fn)(const OBJ_NAME *,void *arg), | ||
| 315 | void *arg) | ||
| 316 | { | ||
| 317 | struct doall_sorted d; | ||
| 318 | int n; | ||
| 319 | |||
| 320 | d.type=type; | ||
| 321 | d.names=OPENSSL_malloc(lh_OBJ_NAME_num_items(names_lh)*sizeof *d.names); | ||
| 322 | d.n=0; | ||
| 323 | OBJ_NAME_do_all(type,do_all_sorted_fn,&d); | ||
| 324 | |||
| 325 | qsort((void *)d.names,d.n,sizeof *d.names,do_all_sorted_cmp); | ||
| 326 | |||
| 327 | for(n=0 ; n < d.n ; ++n) | ||
| 328 | fn(d.names[n],arg); | ||
| 329 | |||
| 330 | OPENSSL_free((void *)d.names); | ||
| 331 | } | ||
| 332 | |||
| 333 | static int free_type; | ||
| 334 | |||
| 335 | static void names_lh_free_doall(OBJ_NAME *onp) | ||
| 336 | { | ||
| 337 | if (onp == NULL) | ||
| 338 | return; | ||
| 339 | |||
| 340 | if (free_type < 0 || free_type == onp->type) | ||
| 341 | OBJ_NAME_remove(onp->name,onp->type); | ||
| 342 | } | ||
| 343 | |||
| 344 | static IMPLEMENT_LHASH_DOALL_FN(names_lh_free, OBJ_NAME) | ||
| 345 | |||
| 346 | static void name_funcs_free(NAME_FUNCS *ptr) | ||
| 347 | { | ||
| 348 | OPENSSL_free(ptr); | ||
| 349 | } | ||
| 350 | |||
| 351 | void OBJ_NAME_cleanup(int type) | ||
| 352 | { | ||
| 353 | unsigned long down_load; | ||
| 354 | |||
| 355 | if (names_lh == NULL) return; | ||
| 356 | |||
| 357 | free_type=type; | ||
| 358 | down_load=lh_OBJ_NAME_down_load(names_lh); | ||
| 359 | lh_OBJ_NAME_down_load(names_lh)=0; | ||
| 360 | |||
| 361 | lh_OBJ_NAME_doall(names_lh,LHASH_DOALL_FN(names_lh_free)); | ||
| 362 | if (type < 0) | ||
| 363 | { | ||
| 364 | lh_OBJ_NAME_free(names_lh); | ||
| 365 | sk_NAME_FUNCS_pop_free(name_funcs_stack,name_funcs_free); | ||
| 366 | names_lh=NULL; | ||
| 367 | name_funcs_stack = NULL; | ||
| 368 | } | ||
| 369 | else | ||
| 370 | lh_OBJ_NAME_down_load(names_lh)=down_load; | ||
| 371 | } | ||
| 372 | |||
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c new file mode 100644 index 0000000000..8a342ba3eb --- /dev/null +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
| @@ -0,0 +1,810 @@ | |||
| 1 | /* crypto/objects/obj_dat.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <ctype.h> | ||
| 61 | #include <limits.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include <openssl/lhash.h> | ||
| 64 | #include <openssl/asn1.h> | ||
| 65 | #include <openssl/objects.h> | ||
| 66 | #include <openssl/bn.h> | ||
| 67 | |||
| 68 | /* obj_dat.h is generated from objects.h by obj_dat.pl */ | ||
| 69 | #ifndef OPENSSL_NO_OBJECT | ||
| 70 | #include "obj_dat.h" | ||
| 71 | #else | ||
| 72 | /* You will have to load all the objects needed manually in the application */ | ||
| 73 | #define NUM_NID 0 | ||
| 74 | #define NUM_SN 0 | ||
| 75 | #define NUM_LN 0 | ||
| 76 | #define NUM_OBJ 0 | ||
| 77 | static const unsigned char lvalues[1]; | ||
| 78 | static const ASN1_OBJECT nid_objs[1]; | ||
| 79 | static const unsigned int sn_objs[1]; | ||
| 80 | static const unsigned int ln_objs[1]; | ||
| 81 | static const unsigned int obj_objs[1]; | ||
| 82 | #endif | ||
| 83 | |||
| 84 | DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn); | ||
| 85 | DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln); | ||
| 86 | DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, obj); | ||
| 87 | |||
| 88 | #define ADDED_DATA 0 | ||
| 89 | #define ADDED_SNAME 1 | ||
| 90 | #define ADDED_LNAME 2 | ||
| 91 | #define ADDED_NID 3 | ||
| 92 | |||
| 93 | typedef struct added_obj_st | ||
| 94 | { | ||
| 95 | int type; | ||
| 96 | ASN1_OBJECT *obj; | ||
| 97 | } ADDED_OBJ; | ||
| 98 | DECLARE_LHASH_OF(ADDED_OBJ); | ||
| 99 | |||
| 100 | static int new_nid=NUM_NID; | ||
| 101 | static LHASH_OF(ADDED_OBJ) *added=NULL; | ||
| 102 | |||
| 103 | static int sn_cmp(const ASN1_OBJECT * const *a, const unsigned int *b) | ||
| 104 | { return(strcmp((*a)->sn,nid_objs[*b].sn)); } | ||
| 105 | |||
| 106 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn); | ||
| 107 | |||
| 108 | static int ln_cmp(const ASN1_OBJECT * const *a, const unsigned int *b) | ||
| 109 | { return(strcmp((*a)->ln,nid_objs[*b].ln)); } | ||
| 110 | |||
| 111 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln); | ||
| 112 | |||
| 113 | static unsigned long added_obj_hash(const ADDED_OBJ *ca) | ||
| 114 | { | ||
| 115 | const ASN1_OBJECT *a; | ||
| 116 | int i; | ||
| 117 | unsigned long ret=0; | ||
| 118 | unsigned char *p; | ||
| 119 | |||
| 120 | a=ca->obj; | ||
| 121 | switch (ca->type) | ||
| 122 | { | ||
| 123 | case ADDED_DATA: | ||
| 124 | ret=a->length<<20L; | ||
| 125 | p=(unsigned char *)a->data; | ||
| 126 | for (i=0; i<a->length; i++) | ||
| 127 | ret^=p[i]<<((i*3)%24); | ||
| 128 | break; | ||
| 129 | case ADDED_SNAME: | ||
| 130 | ret=lh_strhash(a->sn); | ||
| 131 | break; | ||
| 132 | case ADDED_LNAME: | ||
| 133 | ret=lh_strhash(a->ln); | ||
| 134 | break; | ||
| 135 | case ADDED_NID: | ||
| 136 | ret=a->nid; | ||
| 137 | break; | ||
| 138 | default: | ||
| 139 | /* abort(); */ | ||
| 140 | return 0; | ||
| 141 | } | ||
| 142 | ret&=0x3fffffffL; | ||
| 143 | ret|=ca->type<<30L; | ||
| 144 | return(ret); | ||
| 145 | } | ||
| 146 | static IMPLEMENT_LHASH_HASH_FN(added_obj, ADDED_OBJ) | ||
| 147 | |||
| 148 | static int added_obj_cmp(const ADDED_OBJ *ca, const ADDED_OBJ *cb) | ||
| 149 | { | ||
| 150 | ASN1_OBJECT *a,*b; | ||
| 151 | int i; | ||
| 152 | |||
| 153 | i=ca->type-cb->type; | ||
| 154 | if (i) return(i); | ||
| 155 | a=ca->obj; | ||
| 156 | b=cb->obj; | ||
| 157 | switch (ca->type) | ||
| 158 | { | ||
| 159 | case ADDED_DATA: | ||
| 160 | i=(a->length - b->length); | ||
| 161 | if (i) return(i); | ||
| 162 | return(memcmp(a->data,b->data,(size_t)a->length)); | ||
| 163 | case ADDED_SNAME: | ||
| 164 | if (a->sn == NULL) return(-1); | ||
| 165 | else if (b->sn == NULL) return(1); | ||
| 166 | else return(strcmp(a->sn,b->sn)); | ||
| 167 | case ADDED_LNAME: | ||
| 168 | if (a->ln == NULL) return(-1); | ||
| 169 | else if (b->ln == NULL) return(1); | ||
| 170 | else return(strcmp(a->ln,b->ln)); | ||
| 171 | case ADDED_NID: | ||
| 172 | return(a->nid-b->nid); | ||
| 173 | default: | ||
| 174 | /* abort(); */ | ||
| 175 | return 0; | ||
| 176 | } | ||
| 177 | } | ||
| 178 | static IMPLEMENT_LHASH_COMP_FN(added_obj, ADDED_OBJ) | ||
| 179 | |||
| 180 | static int init_added(void) | ||
| 181 | { | ||
| 182 | if (added != NULL) return(1); | ||
| 183 | added=lh_ADDED_OBJ_new(); | ||
| 184 | return(added != NULL); | ||
| 185 | } | ||
| 186 | |||
| 187 | static void cleanup1_doall(ADDED_OBJ *a) | ||
| 188 | { | ||
| 189 | a->obj->nid=0; | ||
| 190 | a->obj->flags|=ASN1_OBJECT_FLAG_DYNAMIC| | ||
| 191 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS| | ||
| 192 | ASN1_OBJECT_FLAG_DYNAMIC_DATA; | ||
| 193 | } | ||
| 194 | |||
| 195 | static void cleanup2_doall(ADDED_OBJ *a) | ||
| 196 | { a->obj->nid++; } | ||
| 197 | |||
| 198 | static void cleanup3_doall(ADDED_OBJ *a) | ||
| 199 | { | ||
| 200 | if (--a->obj->nid == 0) | ||
| 201 | ASN1_OBJECT_free(a->obj); | ||
| 202 | OPENSSL_free(a); | ||
| 203 | } | ||
| 204 | |||
| 205 | static IMPLEMENT_LHASH_DOALL_FN(cleanup1, ADDED_OBJ) | ||
| 206 | static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ) | ||
| 207 | static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ) | ||
| 208 | |||
| 209 | /* The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting | ||
| 210 | * to use freed up OIDs. If neccessary the actual freeing up of OIDs is | ||
| 211 | * delayed. | ||
| 212 | */ | ||
| 213 | |||
| 214 | int obj_cleanup_defer = 0; | ||
| 215 | |||
| 216 | void check_defer(int nid) | ||
| 217 | { | ||
| 218 | if (!obj_cleanup_defer && nid >= NUM_NID) | ||
| 219 | obj_cleanup_defer = 1; | ||
| 220 | } | ||
| 221 | |||
| 222 | void OBJ_cleanup(void) | ||
| 223 | { | ||
| 224 | if (obj_cleanup_defer) | ||
| 225 | { | ||
| 226 | obj_cleanup_defer = 2; | ||
| 227 | return ; | ||
| 228 | } | ||
| 229 | if (added == NULL) return; | ||
| 230 | lh_ADDED_OBJ_down_load(added) = 0; | ||
| 231 | lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup1)); /* zero counters */ | ||
| 232 | lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup2)); /* set counters */ | ||
| 233 | lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup3)); /* free objects */ | ||
| 234 | lh_ADDED_OBJ_free(added); | ||
| 235 | added=NULL; | ||
| 236 | } | ||
| 237 | |||
| 238 | int OBJ_new_nid(int num) | ||
| 239 | { | ||
| 240 | int i; | ||
| 241 | |||
| 242 | i=new_nid; | ||
| 243 | new_nid+=num; | ||
| 244 | return(i); | ||
| 245 | } | ||
| 246 | |||
| 247 | int OBJ_add_object(const ASN1_OBJECT *obj) | ||
| 248 | { | ||
| 249 | ASN1_OBJECT *o; | ||
| 250 | ADDED_OBJ *ao[4]={NULL,NULL,NULL,NULL},*aop; | ||
| 251 | int i; | ||
| 252 | |||
| 253 | if (added == NULL) | ||
| 254 | if (!init_added()) return(0); | ||
| 255 | if ((o=OBJ_dup(obj)) == NULL) goto err; | ||
| 256 | if (!(ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2; | ||
| 257 | if ((o->length != 0) && (obj->data != NULL)) | ||
| 258 | if (!(ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2; | ||
| 259 | if (o->sn != NULL) | ||
| 260 | if (!(ao[ADDED_SNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2; | ||
| 261 | if (o->ln != NULL) | ||
| 262 | if (!(ao[ADDED_LNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2; | ||
| 263 | |||
| 264 | for (i=ADDED_DATA; i<=ADDED_NID; i++) | ||
| 265 | { | ||
| 266 | if (ao[i] != NULL) | ||
| 267 | { | ||
| 268 | ao[i]->type=i; | ||
| 269 | ao[i]->obj=o; | ||
| 270 | aop=lh_ADDED_OBJ_insert(added,ao[i]); | ||
| 271 | /* memory leak, buit should not normally matter */ | ||
| 272 | if (aop != NULL) | ||
| 273 | OPENSSL_free(aop); | ||
| 274 | } | ||
| 275 | } | ||
| 276 | o->flags&= ~(ASN1_OBJECT_FLAG_DYNAMIC|ASN1_OBJECT_FLAG_DYNAMIC_STRINGS| | ||
| 277 | ASN1_OBJECT_FLAG_DYNAMIC_DATA); | ||
| 278 | |||
| 279 | return(o->nid); | ||
| 280 | err2: | ||
| 281 | OBJerr(OBJ_F_OBJ_ADD_OBJECT,ERR_R_MALLOC_FAILURE); | ||
| 282 | err: | ||
| 283 | for (i=ADDED_DATA; i<=ADDED_NID; i++) | ||
| 284 | if (ao[i] != NULL) OPENSSL_free(ao[i]); | ||
| 285 | if (o != NULL) OPENSSL_free(o); | ||
| 286 | return(NID_undef); | ||
| 287 | } | ||
| 288 | |||
| 289 | ASN1_OBJECT *OBJ_nid2obj(int n) | ||
| 290 | { | ||
| 291 | ADDED_OBJ ad,*adp; | ||
| 292 | ASN1_OBJECT ob; | ||
| 293 | |||
| 294 | if ((n >= 0) && (n < NUM_NID)) | ||
| 295 | { | ||
| 296 | if ((n != NID_undef) && (nid_objs[n].nid == NID_undef)) | ||
| 297 | { | ||
| 298 | OBJerr(OBJ_F_OBJ_NID2OBJ,OBJ_R_UNKNOWN_NID); | ||
| 299 | return(NULL); | ||
| 300 | } | ||
| 301 | return((ASN1_OBJECT *)&(nid_objs[n])); | ||
| 302 | } | ||
| 303 | else if (added == NULL) | ||
| 304 | return(NULL); | ||
| 305 | else | ||
| 306 | { | ||
| 307 | ad.type=ADDED_NID; | ||
| 308 | ad.obj= &ob; | ||
| 309 | ob.nid=n; | ||
| 310 | adp=lh_ADDED_OBJ_retrieve(added,&ad); | ||
| 311 | if (adp != NULL) | ||
| 312 | return(adp->obj); | ||
| 313 | else | ||
| 314 | { | ||
| 315 | OBJerr(OBJ_F_OBJ_NID2OBJ,OBJ_R_UNKNOWN_NID); | ||
| 316 | return(NULL); | ||
| 317 | } | ||
| 318 | } | ||
| 319 | } | ||
| 320 | |||
| 321 | const char *OBJ_nid2sn(int n) | ||
| 322 | { | ||
| 323 | ADDED_OBJ ad,*adp; | ||
| 324 | ASN1_OBJECT ob; | ||
| 325 | |||
| 326 | if ((n >= 0) && (n < NUM_NID)) | ||
| 327 | { | ||
| 328 | if ((n != NID_undef) && (nid_objs[n].nid == NID_undef)) | ||
| 329 | { | ||
| 330 | OBJerr(OBJ_F_OBJ_NID2SN,OBJ_R_UNKNOWN_NID); | ||
| 331 | return(NULL); | ||
| 332 | } | ||
| 333 | return(nid_objs[n].sn); | ||
| 334 | } | ||
| 335 | else if (added == NULL) | ||
| 336 | return(NULL); | ||
| 337 | else | ||
| 338 | { | ||
| 339 | ad.type=ADDED_NID; | ||
| 340 | ad.obj= &ob; | ||
| 341 | ob.nid=n; | ||
| 342 | adp=lh_ADDED_OBJ_retrieve(added,&ad); | ||
| 343 | if (adp != NULL) | ||
| 344 | return(adp->obj->sn); | ||
| 345 | else | ||
| 346 | { | ||
| 347 | OBJerr(OBJ_F_OBJ_NID2SN,OBJ_R_UNKNOWN_NID); | ||
| 348 | return(NULL); | ||
| 349 | } | ||
| 350 | } | ||
| 351 | } | ||
| 352 | |||
| 353 | const char *OBJ_nid2ln(int n) | ||
| 354 | { | ||
| 355 | ADDED_OBJ ad,*adp; | ||
| 356 | ASN1_OBJECT ob; | ||
| 357 | |||
| 358 | if ((n >= 0) && (n < NUM_NID)) | ||
| 359 | { | ||
| 360 | if ((n != NID_undef) && (nid_objs[n].nid == NID_undef)) | ||
| 361 | { | ||
| 362 | OBJerr(OBJ_F_OBJ_NID2LN,OBJ_R_UNKNOWN_NID); | ||
| 363 | return(NULL); | ||
| 364 | } | ||
| 365 | return(nid_objs[n].ln); | ||
| 366 | } | ||
| 367 | else if (added == NULL) | ||
| 368 | return(NULL); | ||
| 369 | else | ||
| 370 | { | ||
| 371 | ad.type=ADDED_NID; | ||
| 372 | ad.obj= &ob; | ||
| 373 | ob.nid=n; | ||
| 374 | adp=lh_ADDED_OBJ_retrieve(added,&ad); | ||
| 375 | if (adp != NULL) | ||
| 376 | return(adp->obj->ln); | ||
| 377 | else | ||
| 378 | { | ||
| 379 | OBJerr(OBJ_F_OBJ_NID2LN,OBJ_R_UNKNOWN_NID); | ||
| 380 | return(NULL); | ||
| 381 | } | ||
| 382 | } | ||
| 383 | } | ||
| 384 | |||
| 385 | static int obj_cmp(const ASN1_OBJECT * const *ap, const unsigned int *bp) | ||
| 386 | { | ||
| 387 | int j; | ||
| 388 | const ASN1_OBJECT *a= *ap; | ||
| 389 | const ASN1_OBJECT *b= &nid_objs[*bp]; | ||
| 390 | |||
| 391 | j=(a->length - b->length); | ||
| 392 | if (j) return(j); | ||
| 393 | return(memcmp(a->data,b->data,a->length)); | ||
| 394 | } | ||
| 395 | |||
| 396 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, obj); | ||
| 397 | |||
| 398 | int OBJ_obj2nid(const ASN1_OBJECT *a) | ||
| 399 | { | ||
| 400 | const unsigned int *op; | ||
| 401 | ADDED_OBJ ad,*adp; | ||
| 402 | |||
| 403 | if (a == NULL) | ||
| 404 | return(NID_undef); | ||
| 405 | if (a->nid != 0) | ||
| 406 | return(a->nid); | ||
| 407 | |||
| 408 | if (added != NULL) | ||
| 409 | { | ||
| 410 | ad.type=ADDED_DATA; | ||
| 411 | ad.obj=(ASN1_OBJECT *)a; /* XXX: ugly but harmless */ | ||
| 412 | adp=lh_ADDED_OBJ_retrieve(added,&ad); | ||
| 413 | if (adp != NULL) return (adp->obj->nid); | ||
| 414 | } | ||
| 415 | op=OBJ_bsearch_obj(&a, obj_objs, NUM_OBJ); | ||
| 416 | if (op == NULL) | ||
| 417 | return(NID_undef); | ||
| 418 | return(nid_objs[*op].nid); | ||
| 419 | } | ||
| 420 | |||
| 421 | /* Convert an object name into an ASN1_OBJECT | ||
| 422 | * if "noname" is not set then search for short and long names first. | ||
| 423 | * This will convert the "dotted" form into an object: unlike OBJ_txt2nid | ||
| 424 | * it can be used with any objects, not just registered ones. | ||
| 425 | */ | ||
| 426 | |||
| 427 | ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name) | ||
| 428 | { | ||
| 429 | int nid = NID_undef; | ||
| 430 | ASN1_OBJECT *op=NULL; | ||
| 431 | unsigned char *buf; | ||
| 432 | unsigned char *p; | ||
| 433 | const unsigned char *cp; | ||
| 434 | int i, j; | ||
| 435 | |||
| 436 | if(!no_name) { | ||
| 437 | if( ((nid = OBJ_sn2nid(s)) != NID_undef) || | ||
| 438 | ((nid = OBJ_ln2nid(s)) != NID_undef) ) | ||
| 439 | return OBJ_nid2obj(nid); | ||
| 440 | } | ||
| 441 | |||
| 442 | /* Work out size of content octets */ | ||
| 443 | i=a2d_ASN1_OBJECT(NULL,0,s,-1); | ||
| 444 | if (i <= 0) { | ||
| 445 | /* Don't clear the error */ | ||
| 446 | /*ERR_clear_error();*/ | ||
| 447 | return NULL; | ||
| 448 | } | ||
| 449 | /* Work out total size */ | ||
| 450 | j = ASN1_object_size(0,i,V_ASN1_OBJECT); | ||
| 451 | |||
| 452 | if((buf=(unsigned char *)OPENSSL_malloc(j)) == NULL) return NULL; | ||
| 453 | |||
| 454 | p = buf; | ||
| 455 | /* Write out tag+length */ | ||
| 456 | ASN1_put_object(&p,0,i,V_ASN1_OBJECT,V_ASN1_UNIVERSAL); | ||
| 457 | /* Write out contents */ | ||
| 458 | a2d_ASN1_OBJECT(p,i,s,-1); | ||
| 459 | |||
| 460 | cp=buf; | ||
| 461 | op=d2i_ASN1_OBJECT(NULL,&cp,j); | ||
| 462 | OPENSSL_free(buf); | ||
| 463 | return op; | ||
| 464 | } | ||
| 465 | |||
| 466 | int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) | ||
| 467 | { | ||
| 468 | int i,n=0,len,nid, first, use_bn; | ||
| 469 | BIGNUM *bl; | ||
| 470 | unsigned long l; | ||
| 471 | const unsigned char *p; | ||
| 472 | char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; | ||
| 473 | |||
| 474 | if ((a == NULL) || (a->data == NULL)) { | ||
| 475 | buf[0]='\0'; | ||
| 476 | return(0); | ||
| 477 | } | ||
| 478 | |||
| 479 | |||
| 480 | if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) | ||
| 481 | { | ||
| 482 | const char *s; | ||
| 483 | s=OBJ_nid2ln(nid); | ||
| 484 | if (s == NULL) | ||
| 485 | s=OBJ_nid2sn(nid); | ||
| 486 | if (s) | ||
| 487 | { | ||
| 488 | if (buf) | ||
| 489 | BUF_strlcpy(buf,s,buf_len); | ||
| 490 | n=strlen(s); | ||
| 491 | return n; | ||
| 492 | } | ||
| 493 | } | ||
| 494 | |||
| 495 | |||
| 496 | len=a->length; | ||
| 497 | p=a->data; | ||
| 498 | |||
| 499 | first = 1; | ||
| 500 | bl = NULL; | ||
| 501 | |||
| 502 | while (len > 0) | ||
| 503 | { | ||
| 504 | l=0; | ||
| 505 | use_bn = 0; | ||
| 506 | for (;;) | ||
| 507 | { | ||
| 508 | unsigned char c = *p++; | ||
| 509 | len--; | ||
| 510 | if ((len == 0) && (c & 0x80)) | ||
| 511 | goto err; | ||
| 512 | if (use_bn) | ||
| 513 | { | ||
| 514 | if (!BN_add_word(bl, c & 0x7f)) | ||
| 515 | goto err; | ||
| 516 | } | ||
| 517 | else | ||
| 518 | l |= c & 0x7f; | ||
| 519 | if (!(c & 0x80)) | ||
| 520 | break; | ||
| 521 | if (!use_bn && (l > (ULONG_MAX >> 7L))) | ||
| 522 | { | ||
| 523 | if (!bl && !(bl = BN_new())) | ||
| 524 | goto err; | ||
| 525 | if (!BN_set_word(bl, l)) | ||
| 526 | goto err; | ||
| 527 | use_bn = 1; | ||
| 528 | } | ||
| 529 | if (use_bn) | ||
| 530 | { | ||
| 531 | if (!BN_lshift(bl, bl, 7)) | ||
| 532 | goto err; | ||
| 533 | } | ||
| 534 | else | ||
| 535 | l<<=7L; | ||
| 536 | } | ||
| 537 | |||
| 538 | if (first) | ||
| 539 | { | ||
| 540 | first = 0; | ||
| 541 | if (l >= 80) | ||
| 542 | { | ||
| 543 | i = 2; | ||
| 544 | if (use_bn) | ||
| 545 | { | ||
| 546 | if (!BN_sub_word(bl, 80)) | ||
| 547 | goto err; | ||
| 548 | } | ||
| 549 | else | ||
| 550 | l -= 80; | ||
| 551 | } | ||
| 552 | else | ||
| 553 | { | ||
| 554 | i=(int)(l/40); | ||
| 555 | l-=(long)(i*40); | ||
| 556 | } | ||
| 557 | if (buf && (buf_len > 0)) | ||
| 558 | { | ||
| 559 | *buf++ = i + '0'; | ||
| 560 | buf_len--; | ||
| 561 | } | ||
| 562 | n++; | ||
| 563 | } | ||
| 564 | |||
| 565 | if (use_bn) | ||
| 566 | { | ||
| 567 | char *bndec; | ||
| 568 | bndec = BN_bn2dec(bl); | ||
| 569 | if (!bndec) | ||
| 570 | goto err; | ||
| 571 | i = strlen(bndec); | ||
| 572 | if (buf) | ||
| 573 | { | ||
| 574 | if (buf_len > 0) | ||
| 575 | { | ||
| 576 | *buf++ = '.'; | ||
| 577 | buf_len--; | ||
| 578 | } | ||
| 579 | BUF_strlcpy(buf,bndec,buf_len); | ||
| 580 | if (i > buf_len) | ||
| 581 | { | ||
| 582 | buf += buf_len; | ||
| 583 | buf_len = 0; | ||
| 584 | } | ||
| 585 | else | ||
| 586 | { | ||
| 587 | buf+=i; | ||
| 588 | buf_len-=i; | ||
| 589 | } | ||
| 590 | } | ||
| 591 | n++; | ||
| 592 | n += i; | ||
| 593 | OPENSSL_free(bndec); | ||
| 594 | } | ||
| 595 | else | ||
| 596 | { | ||
| 597 | BIO_snprintf(tbuf,sizeof tbuf,".%lu",l); | ||
| 598 | i=strlen(tbuf); | ||
| 599 | if (buf && (buf_len > 0)) | ||
| 600 | { | ||
| 601 | BUF_strlcpy(buf,tbuf,buf_len); | ||
| 602 | if (i > buf_len) | ||
| 603 | { | ||
| 604 | buf += buf_len; | ||
| 605 | buf_len = 0; | ||
| 606 | } | ||
| 607 | else | ||
| 608 | { | ||
| 609 | buf+=i; | ||
| 610 | buf_len-=i; | ||
| 611 | } | ||
| 612 | } | ||
| 613 | n+=i; | ||
| 614 | l=0; | ||
| 615 | } | ||
| 616 | } | ||
| 617 | |||
| 618 | if (bl) | ||
| 619 | BN_free(bl); | ||
| 620 | return n; | ||
| 621 | |||
| 622 | err: | ||
| 623 | if (bl) | ||
| 624 | BN_free(bl); | ||
| 625 | return -1; | ||
| 626 | } | ||
| 627 | |||
| 628 | int OBJ_txt2nid(const char *s) | ||
| 629 | { | ||
| 630 | ASN1_OBJECT *obj; | ||
| 631 | int nid; | ||
| 632 | obj = OBJ_txt2obj(s, 0); | ||
| 633 | nid = OBJ_obj2nid(obj); | ||
| 634 | ASN1_OBJECT_free(obj); | ||
| 635 | return nid; | ||
| 636 | } | ||
| 637 | |||
| 638 | int OBJ_ln2nid(const char *s) | ||
| 639 | { | ||
| 640 | ASN1_OBJECT o; | ||
| 641 | const ASN1_OBJECT *oo= &o; | ||
| 642 | ADDED_OBJ ad,*adp; | ||
| 643 | const unsigned int *op; | ||
| 644 | |||
| 645 | o.ln=s; | ||
| 646 | if (added != NULL) | ||
| 647 | { | ||
| 648 | ad.type=ADDED_LNAME; | ||
| 649 | ad.obj= &o; | ||
| 650 | adp=lh_ADDED_OBJ_retrieve(added,&ad); | ||
| 651 | if (adp != NULL) return (adp->obj->nid); | ||
| 652 | } | ||
| 653 | op=OBJ_bsearch_ln(&oo, ln_objs, NUM_LN); | ||
| 654 | if (op == NULL) return(NID_undef); | ||
| 655 | return(nid_objs[*op].nid); | ||
| 656 | } | ||
| 657 | |||
| 658 | int OBJ_sn2nid(const char *s) | ||
| 659 | { | ||
| 660 | ASN1_OBJECT o; | ||
| 661 | const ASN1_OBJECT *oo= &o; | ||
| 662 | ADDED_OBJ ad,*adp; | ||
| 663 | const unsigned int *op; | ||
| 664 | |||
| 665 | o.sn=s; | ||
| 666 | if (added != NULL) | ||
| 667 | { | ||
| 668 | ad.type=ADDED_SNAME; | ||
| 669 | ad.obj= &o; | ||
| 670 | adp=lh_ADDED_OBJ_retrieve(added,&ad); | ||
| 671 | if (adp != NULL) return (adp->obj->nid); | ||
| 672 | } | ||
| 673 | op=OBJ_bsearch_sn(&oo, sn_objs, NUM_SN); | ||
| 674 | if (op == NULL) return(NID_undef); | ||
| 675 | return(nid_objs[*op].nid); | ||
| 676 | } | ||
| 677 | |||
| 678 | const void *OBJ_bsearch_(const void *key, const void *base, int num, int size, | ||
| 679 | int (*cmp)(const void *, const void *)) | ||
| 680 | { | ||
| 681 | return OBJ_bsearch_ex_(key, base, num, size, cmp, 0); | ||
| 682 | } | ||
| 683 | |||
| 684 | const void *OBJ_bsearch_ex_(const void *key, const void *base_, int num, | ||
| 685 | int size, | ||
| 686 | int (*cmp)(const void *, const void *), | ||
| 687 | int flags) | ||
| 688 | { | ||
| 689 | const char *base=base_; | ||
| 690 | int l,h,i=0,c=0; | ||
| 691 | const char *p = NULL; | ||
| 692 | |||
| 693 | if (num == 0) return(NULL); | ||
| 694 | l=0; | ||
| 695 | h=num; | ||
| 696 | while (l < h) | ||
| 697 | { | ||
| 698 | i=(l+h)/2; | ||
| 699 | p= &(base[i*size]); | ||
| 700 | c=(*cmp)(key,p); | ||
| 701 | if (c < 0) | ||
| 702 | h=i; | ||
| 703 | else if (c > 0) | ||
| 704 | l=i+1; | ||
| 705 | else | ||
| 706 | break; | ||
| 707 | } | ||
| 708 | #ifdef CHARSET_EBCDIC | ||
| 709 | /* THIS IS A KLUDGE - Because the *_obj is sorted in ASCII order, and | ||
| 710 | * I don't have perl (yet), we revert to a *LINEAR* search | ||
| 711 | * when the object wasn't found in the binary search. | ||
| 712 | */ | ||
| 713 | if (c != 0) | ||
| 714 | { | ||
| 715 | for (i=0; i<num; ++i) | ||
| 716 | { | ||
| 717 | p= &(base[i*size]); | ||
| 718 | c = (*cmp)(key,p); | ||
| 719 | if (c == 0 || (c < 0 && (flags & OBJ_BSEARCH_VALUE_ON_NOMATCH))) | ||
| 720 | return p; | ||
| 721 | } | ||
| 722 | } | ||
| 723 | #endif | ||
| 724 | if (c != 0 && !(flags & OBJ_BSEARCH_VALUE_ON_NOMATCH)) | ||
| 725 | p = NULL; | ||
| 726 | else if (c == 0 && (flags & OBJ_BSEARCH_FIRST_VALUE_ON_MATCH)) | ||
| 727 | { | ||
| 728 | while(i > 0 && (*cmp)(key,&(base[(i-1)*size])) == 0) | ||
| 729 | i--; | ||
| 730 | p = &(base[i*size]); | ||
| 731 | } | ||
| 732 | return(p); | ||
| 733 | } | ||
| 734 | |||
| 735 | int OBJ_create_objects(BIO *in) | ||
| 736 | { | ||
| 737 | MS_STATIC char buf[512]; | ||
| 738 | int i,num=0; | ||
| 739 | char *o,*s,*l=NULL; | ||
| 740 | |||
| 741 | for (;;) | ||
| 742 | { | ||
| 743 | s=o=NULL; | ||
| 744 | i=BIO_gets(in,buf,512); | ||
| 745 | if (i <= 0) return(num); | ||
| 746 | buf[i-1]='\0'; | ||
| 747 | if (!isalnum((unsigned char)buf[0])) return(num); | ||
| 748 | o=s=buf; | ||
| 749 | while (isdigit((unsigned char)*s) || (*s == '.')) | ||
| 750 | s++; | ||
| 751 | if (*s != '\0') | ||
| 752 | { | ||
| 753 | *(s++)='\0'; | ||
| 754 | while (isspace((unsigned char)*s)) | ||
| 755 | s++; | ||
| 756 | if (*s == '\0') | ||
| 757 | s=NULL; | ||
| 758 | else | ||
| 759 | { | ||
| 760 | l=s; | ||
| 761 | while ((*l != '\0') && !isspace((unsigned char)*l)) | ||
| 762 | l++; | ||
| 763 | if (*l != '\0') | ||
| 764 | { | ||
| 765 | *(l++)='\0'; | ||
| 766 | while (isspace((unsigned char)*l)) | ||
| 767 | l++; | ||
| 768 | if (*l == '\0') l=NULL; | ||
| 769 | } | ||
| 770 | else | ||
| 771 | l=NULL; | ||
| 772 | } | ||
| 773 | } | ||
| 774 | else | ||
| 775 | s=NULL; | ||
| 776 | if ((o == NULL) || (*o == '\0')) return(num); | ||
| 777 | if (!OBJ_create(o,s,l)) return(num); | ||
| 778 | num++; | ||
| 779 | } | ||
| 780 | /* return(num); */ | ||
| 781 | } | ||
| 782 | |||
| 783 | int OBJ_create(const char *oid, const char *sn, const char *ln) | ||
| 784 | { | ||
| 785 | int ok=0; | ||
| 786 | ASN1_OBJECT *op=NULL; | ||
| 787 | unsigned char *buf; | ||
| 788 | int i; | ||
| 789 | |||
| 790 | i=a2d_ASN1_OBJECT(NULL,0,oid,-1); | ||
| 791 | if (i <= 0) return(0); | ||
| 792 | |||
| 793 | if ((buf=(unsigned char *)OPENSSL_malloc(i)) == NULL) | ||
| 794 | { | ||
| 795 | OBJerr(OBJ_F_OBJ_CREATE,ERR_R_MALLOC_FAILURE); | ||
| 796 | return(0); | ||
| 797 | } | ||
| 798 | i=a2d_ASN1_OBJECT(buf,i,oid,-1); | ||
| 799 | if (i == 0) | ||
| 800 | goto err; | ||
| 801 | op=(ASN1_OBJECT *)ASN1_OBJECT_create(OBJ_new_nid(1),buf,i,sn,ln); | ||
| 802 | if (op == NULL) | ||
| 803 | goto err; | ||
| 804 | ok=OBJ_add_object(op); | ||
| 805 | err: | ||
| 806 | ASN1_OBJECT_free(op); | ||
| 807 | OPENSSL_free(buf); | ||
| 808 | return(ok); | ||
| 809 | } | ||
| 810 | |||
diff --git a/src/lib/libcrypto/objects/obj_dat.pl b/src/lib/libcrypto/objects/obj_dat.pl new file mode 100644 index 0000000000..c67f71c327 --- /dev/null +++ b/src/lib/libcrypto/objects/obj_dat.pl | |||
| @@ -0,0 +1,307 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | # fixes bug in floating point emulation on sparc64 when | ||
| 4 | # this script produces off-by-one output on sparc64 | ||
| 5 | use integer; | ||
| 6 | |||
| 7 | sub obj_cmp | ||
| 8 | { | ||
| 9 | local(@a,@b,$_,$r); | ||
| 10 | |||
| 11 | $A=$obj_len{$obj{$nid{$a}}}; | ||
| 12 | $B=$obj_len{$obj{$nid{$b}}}; | ||
| 13 | |||
| 14 | $r=($A-$B); | ||
| 15 | return($r) if $r != 0; | ||
| 16 | |||
| 17 | $A=$obj_der{$obj{$nid{$a}}}; | ||
| 18 | $B=$obj_der{$obj{$nid{$b}}}; | ||
| 19 | |||
| 20 | return($A cmp $B); | ||
| 21 | } | ||
| 22 | |||
| 23 | sub expand_obj | ||
| 24 | { | ||
| 25 | local(*v)=@_; | ||
| 26 | local($k,$d); | ||
| 27 | local($i); | ||
| 28 | |||
| 29 | do { | ||
| 30 | $i=0; | ||
| 31 | foreach $k (keys %v) | ||
| 32 | { | ||
| 33 | if (($v{$k} =~ s/(OBJ_[^,]+),/$v{$1},/)) | ||
| 34 | { $i++; } | ||
| 35 | } | ||
| 36 | } while($i); | ||
| 37 | foreach $k (keys %v) | ||
| 38 | { | ||
| 39 | @a=split(/,/,$v{$k}); | ||
| 40 | $objn{$k}=$#a+1; | ||
| 41 | } | ||
| 42 | return(%objn); | ||
| 43 | } | ||
| 44 | |||
| 45 | open (IN,"$ARGV[0]") || die "Can't open input file $ARGV[0]"; | ||
| 46 | open (OUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; | ||
| 47 | |||
| 48 | while (<IN>) | ||
| 49 | { | ||
| 50 | next unless /^\#define\s+(\S+)\s+(.*)$/; | ||
| 51 | $v=$1; | ||
| 52 | $d=$2; | ||
| 53 | $d =~ s/^\"//; | ||
| 54 | $d =~ s/\"$//; | ||
| 55 | if ($v =~ /^SN_(.*)$/) | ||
| 56 | { | ||
| 57 | if(defined $snames{$d}) | ||
| 58 | { | ||
| 59 | print "WARNING: Duplicate short name \"$d\"\n"; | ||
| 60 | } | ||
| 61 | else | ||
| 62 | { $snames{$d} = "X"; } | ||
| 63 | $sn{$1}=$d; | ||
| 64 | } | ||
| 65 | elsif ($v =~ /^LN_(.*)$/) | ||
| 66 | { | ||
| 67 | if(defined $lnames{$d}) | ||
| 68 | { | ||
| 69 | print "WARNING: Duplicate long name \"$d\"\n"; | ||
| 70 | } | ||
| 71 | else | ||
| 72 | { $lnames{$d} = "X"; } | ||
| 73 | $ln{$1}=$d; | ||
| 74 | } | ||
| 75 | elsif ($v =~ /^NID_(.*)$/) | ||
| 76 | { $nid{$d}=$1; } | ||
| 77 | elsif ($v =~ /^OBJ_(.*)$/) | ||
| 78 | { | ||
| 79 | $obj{$1}=$v; | ||
| 80 | $objd{$v}=$d; | ||
| 81 | } | ||
| 82 | } | ||
| 83 | close IN; | ||
| 84 | |||
| 85 | %ob=&expand_obj(*objd); | ||
| 86 | |||
| 87 | @a=sort { $a <=> $b } keys %nid; | ||
| 88 | $n=$a[$#a]+1; | ||
| 89 | |||
| 90 | @lvalues=(); | ||
| 91 | $lvalues=0; | ||
| 92 | |||
| 93 | for ($i=0; $i<$n; $i++) | ||
| 94 | { | ||
| 95 | if (!defined($nid{$i})) | ||
| 96 | { | ||
| 97 | push(@out,"{NULL,NULL,NID_undef,0,NULL,0},\n"); | ||
| 98 | } | ||
| 99 | else | ||
| 100 | { | ||
| 101 | $sn=defined($sn{$nid{$i}})?"$sn{$nid{$i}}":"NULL"; | ||
| 102 | $ln=defined($ln{$nid{$i}})?"$ln{$nid{$i}}":"NULL"; | ||
| 103 | |||
| 104 | if ($sn eq "NULL") { | ||
| 105 | $sn=$ln; | ||
| 106 | $sn{$nid{$i}} = $ln; | ||
| 107 | } | ||
| 108 | |||
| 109 | if ($ln eq "NULL") { | ||
| 110 | $ln=$sn; | ||
| 111 | $ln{$nid{$i}} = $sn; | ||
| 112 | } | ||
| 113 | |||
| 114 | $out ="{"; | ||
| 115 | $out.="\"$sn\""; | ||
| 116 | $out.=","."\"$ln\""; | ||
| 117 | $out.=",NID_$nid{$i},"; | ||
| 118 | if (defined($obj{$nid{$i}})) | ||
| 119 | { | ||
| 120 | $v=$objd{$obj{$nid{$i}}}; | ||
| 121 | $v =~ s/L//g; | ||
| 122 | $v =~ s/,/ /g; | ||
| 123 | $r=&der_it($v); | ||
| 124 | $z=""; | ||
| 125 | $length=0; | ||
| 126 | foreach (unpack("C*",$r)) | ||
| 127 | { | ||
| 128 | $z.=sprintf("0x%02X,",$_); | ||
| 129 | $length++; | ||
| 130 | } | ||
| 131 | $obj_der{$obj{$nid{$i}}}=$z; | ||
| 132 | $obj_len{$obj{$nid{$i}}}=$length; | ||
| 133 | |||
| 134 | push(@lvalues,sprintf("%-45s/* [%3d] %s */\n", | ||
| 135 | $z,$lvalues,$obj{$nid{$i}})); | ||
| 136 | $out.="$length,&(lvalues[$lvalues]),0"; | ||
| 137 | $lvalues+=$length; | ||
| 138 | } | ||
| 139 | else | ||
| 140 | { | ||
| 141 | $out.="0,NULL,0"; | ||
| 142 | } | ||
| 143 | $out.="},\n"; | ||
| 144 | push(@out,$out); | ||
| 145 | } | ||
| 146 | } | ||
| 147 | |||
| 148 | @a=grep(defined($sn{$nid{$_}}),0 .. $n); | ||
| 149 | foreach (sort { $sn{$nid{$a}} cmp $sn{$nid{$b}} } @a) | ||
| 150 | { | ||
| 151 | push(@sn,sprintf("%2d,\t/* \"$sn{$nid{$_}}\" */\n",$_)); | ||
| 152 | } | ||
| 153 | |||
| 154 | @a=grep(defined($ln{$nid{$_}}),0 .. $n); | ||
| 155 | foreach (sort { $ln{$nid{$a}} cmp $ln{$nid{$b}} } @a) | ||
| 156 | { | ||
| 157 | push(@ln,sprintf("%2d,\t/* \"$ln{$nid{$_}}\" */\n",$_)); | ||
| 158 | } | ||
| 159 | |||
| 160 | @a=grep(defined($obj{$nid{$_}}),0 .. $n); | ||
| 161 | foreach (sort obj_cmp @a) | ||
| 162 | { | ||
| 163 | $m=$obj{$nid{$_}}; | ||
| 164 | $v=$objd{$m}; | ||
| 165 | $v =~ s/L//g; | ||
| 166 | $v =~ s/,/ /g; | ||
| 167 | push(@ob,sprintf("%2d,\t/* %-32s %s */\n",$_,$m,$v)); | ||
| 168 | } | ||
| 169 | |||
| 170 | print OUT <<'EOF'; | ||
| 171 | /* crypto/objects/obj_dat.h */ | ||
| 172 | |||
| 173 | /* THIS FILE IS GENERATED FROM objects.h by obj_dat.pl via the | ||
| 174 | * following command: | ||
| 175 | * perl obj_dat.pl obj_mac.h obj_dat.h | ||
| 176 | */ | ||
| 177 | |||
| 178 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
| 179 | * All rights reserved. | ||
| 180 | * | ||
| 181 | * This package is an SSL implementation written | ||
| 182 | * by Eric Young (eay@cryptsoft.com). | ||
| 183 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 184 | * | ||
| 185 | * This library is free for commercial and non-commercial use as long as | ||
| 186 | * the following conditions are aheared to. The following conditions | ||
| 187 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 188 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 189 | * included with this distribution is covered by the same copyright terms | ||
| 190 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 191 | * | ||
| 192 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 193 | * the code are not to be removed. | ||
| 194 | * If this package is used in a product, Eric Young should be given attribution | ||
| 195 | * as the author of the parts of the library used. | ||
| 196 | * This can be in the form of a textual message at program startup or | ||
| 197 | * in documentation (online or textual) provided with the package. | ||
| 198 | * | ||
| 199 | * Redistribution and use in source and binary forms, with or without | ||
| 200 | * modification, are permitted provided that the following conditions | ||
| 201 | * are met: | ||
| 202 | * 1. Redistributions of source code must retain the copyright | ||
| 203 | * notice, this list of conditions and the following disclaimer. | ||
| 204 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 205 | * notice, this list of conditions and the following disclaimer in the | ||
| 206 | * documentation and/or other materials provided with the distribution. | ||
| 207 | * 3. All advertising materials mentioning features or use of this software | ||
| 208 | * must display the following acknowledgement: | ||
| 209 | * "This product includes cryptographic software written by | ||
| 210 | * Eric Young (eay@cryptsoft.com)" | ||
| 211 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 212 | * being used are not cryptographic related :-). | ||
| 213 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 214 | * the apps directory (application code) you must include an acknowledgement: | ||
| 215 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 216 | * | ||
| 217 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 218 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 219 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 220 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 221 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 222 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 223 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 224 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 225 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 226 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 227 | * SUCH DAMAGE. | ||
| 228 | * | ||
| 229 | * The licence and distribution terms for any publically available version or | ||
| 230 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 231 | * copied and put under another distribution licence | ||
| 232 | * [including the GNU Public Licence.] | ||
| 233 | */ | ||
| 234 | |||
| 235 | EOF | ||
| 236 | |||
| 237 | printf OUT "#define NUM_NID %d\n",$n; | ||
| 238 | printf OUT "#define NUM_SN %d\n",$#sn+1; | ||
| 239 | printf OUT "#define NUM_LN %d\n",$#ln+1; | ||
| 240 | printf OUT "#define NUM_OBJ %d\n\n",$#ob+1; | ||
| 241 | |||
| 242 | printf OUT "static const unsigned char lvalues[%d]={\n",$lvalues+1; | ||
| 243 | print OUT @lvalues; | ||
| 244 | print OUT "};\n\n"; | ||
| 245 | |||
| 246 | printf OUT "static const ASN1_OBJECT nid_objs[NUM_NID]={\n"; | ||
| 247 | foreach (@out) | ||
| 248 | { | ||
| 249 | if (length($_) > 75) | ||
| 250 | { | ||
| 251 | $out=""; | ||
| 252 | foreach (split(/,/)) | ||
| 253 | { | ||
| 254 | $t=$out.$_.","; | ||
| 255 | if (length($t) > 70) | ||
| 256 | { | ||
| 257 | print OUT "$out\n"; | ||
| 258 | $t="\t$_,"; | ||
| 259 | } | ||
| 260 | $out=$t; | ||
| 261 | } | ||
| 262 | chop $out; | ||
| 263 | print OUT "$out"; | ||
| 264 | } | ||
| 265 | else | ||
| 266 | { print OUT $_; } | ||
| 267 | } | ||
| 268 | print OUT "};\n\n"; | ||
| 269 | |||
| 270 | printf OUT "static const unsigned int sn_objs[NUM_SN]={\n"; | ||
| 271 | print OUT @sn; | ||
| 272 | print OUT "};\n\n"; | ||
| 273 | |||
| 274 | printf OUT "static const unsigned int ln_objs[NUM_LN]={\n"; | ||
| 275 | print OUT @ln; | ||
| 276 | print OUT "};\n\n"; | ||
| 277 | |||
| 278 | printf OUT "static const unsigned int obj_objs[NUM_OBJ]={\n"; | ||
| 279 | print OUT @ob; | ||
| 280 | print OUT "};\n\n"; | ||
| 281 | |||
| 282 | close OUT; | ||
| 283 | |||
| 284 | sub der_it | ||
| 285 | { | ||
| 286 | local($v)=@_; | ||
| 287 | local(@a,$i,$ret,@r); | ||
| 288 | |||
| 289 | @a=split(/\s+/,$v); | ||
| 290 | $ret.=pack("C*",$a[0]*40+$a[1]); | ||
| 291 | shift @a; | ||
| 292 | shift @a; | ||
| 293 | foreach (@a) | ||
| 294 | { | ||
| 295 | @r=(); | ||
| 296 | $t=0; | ||
| 297 | while ($_ >= 128) | ||
| 298 | { | ||
| 299 | $x=$_%128; | ||
| 300 | $_/=128; | ||
| 301 | push(@r,((($t++)?0x80:0)|$x)); | ||
| 302 | } | ||
| 303 | push(@r,((($t++)?0x80:0)|$_)); | ||
| 304 | $ret.=pack("C*",reverse(@r)); | ||
| 305 | } | ||
| 306 | return($ret); | ||
| 307 | } | ||
diff --git a/src/lib/libcrypto/objects/obj_err.c b/src/lib/libcrypto/objects/obj_err.c new file mode 100644 index 0000000000..2e7a034c3f --- /dev/null +++ b/src/lib/libcrypto/objects/obj_err.c | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | /* crypto/objects/obj_err.c */ | ||
| 2 | /* ==================================================================== | ||
| 3 | * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * | ||
| 9 | * 1. Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * | ||
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer in | ||
| 14 | * the documentation and/or other materials provided with the | ||
| 15 | * distribution. | ||
| 16 | * | ||
| 17 | * 3. All advertising materials mentioning features or use of this | ||
| 18 | * software must display the following acknowledgment: | ||
| 19 | * "This product includes software developed by the OpenSSL Project | ||
| 20 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 21 | * | ||
| 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 23 | * endorse or promote products derived from this software without | ||
| 24 | * prior written permission. For written permission, please contact | ||
| 25 | * openssl-core@OpenSSL.org. | ||
| 26 | * | ||
| 27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 28 | * nor may "OpenSSL" appear in their names without prior written | ||
| 29 | * permission of the OpenSSL Project. | ||
| 30 | * | ||
| 31 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 32 | * acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 35 | * | ||
| 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 48 | * ==================================================================== | ||
| 49 | * | ||
| 50 | * This product includes cryptographic software written by Eric Young | ||
| 51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 52 | * Hudson (tjh@cryptsoft.com). | ||
| 53 | * | ||
| 54 | */ | ||
| 55 | |||
| 56 | /* NOTE: this file was auto generated by the mkerr.pl script: any changes | ||
| 57 | * made to it will be overwritten when the script next updates this file, | ||
| 58 | * only reason strings will be preserved. | ||
| 59 | */ | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | /* BEGIN ERROR CODES */ | ||
| 66 | #ifndef OPENSSL_NO_ERR | ||
| 67 | |||
| 68 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_OBJ,func,0) | ||
| 69 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_OBJ,0,reason) | ||
| 70 | |||
| 71 | static ERR_STRING_DATA OBJ_str_functs[]= | ||
| 72 | { | ||
| 73 | {ERR_FUNC(OBJ_F_OBJ_ADD_OBJECT), "OBJ_add_object"}, | ||
| 74 | {ERR_FUNC(OBJ_F_OBJ_CREATE), "OBJ_create"}, | ||
| 75 | {ERR_FUNC(OBJ_F_OBJ_DUP), "OBJ_dup"}, | ||
| 76 | {ERR_FUNC(OBJ_F_OBJ_NAME_NEW_INDEX), "OBJ_NAME_new_index"}, | ||
| 77 | {ERR_FUNC(OBJ_F_OBJ_NID2LN), "OBJ_nid2ln"}, | ||
| 78 | {ERR_FUNC(OBJ_F_OBJ_NID2OBJ), "OBJ_nid2obj"}, | ||
| 79 | {ERR_FUNC(OBJ_F_OBJ_NID2SN), "OBJ_nid2sn"}, | ||
| 80 | {0,NULL} | ||
| 81 | }; | ||
| 82 | |||
| 83 | static ERR_STRING_DATA OBJ_str_reasons[]= | ||
| 84 | { | ||
| 85 | {ERR_REASON(OBJ_R_MALLOC_FAILURE) ,"malloc failure"}, | ||
| 86 | {ERR_REASON(OBJ_R_UNKNOWN_NID) ,"unknown nid"}, | ||
| 87 | {0,NULL} | ||
| 88 | }; | ||
| 89 | |||
| 90 | #endif | ||
| 91 | |||
| 92 | void ERR_load_OBJ_strings(void) | ||
| 93 | { | ||
| 94 | #ifndef OPENSSL_NO_ERR | ||
| 95 | |||
| 96 | if (ERR_func_error_string(OBJ_str_functs[0].error) == NULL) | ||
| 97 | { | ||
| 98 | ERR_load_strings(0,OBJ_str_functs); | ||
| 99 | ERR_load_strings(0,OBJ_str_reasons); | ||
| 100 | } | ||
| 101 | #endif | ||
| 102 | } | ||
diff --git a/src/lib/libcrypto/objects/obj_lib.c b/src/lib/libcrypto/objects/obj_lib.c new file mode 100644 index 0000000000..23e9d48cdf --- /dev/null +++ b/src/lib/libcrypto/objects/obj_lib.c | |||
| @@ -0,0 +1,129 @@ | |||
| 1 | /* crypto/objects/obj_lib.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/lhash.h> | ||
| 62 | #include <openssl/objects.h> | ||
| 63 | #include <openssl/buffer.h> | ||
| 64 | |||
| 65 | ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o) | ||
| 66 | { | ||
| 67 | ASN1_OBJECT *r; | ||
| 68 | int i; | ||
| 69 | char *ln=NULL,*sn=NULL; | ||
| 70 | unsigned char *data=NULL; | ||
| 71 | |||
| 72 | if (o == NULL) return(NULL); | ||
| 73 | if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC)) | ||
| 74 | return((ASN1_OBJECT *)o); /* XXX: ugh! Why? What kind of | ||
| 75 | duplication is this??? */ | ||
| 76 | |||
| 77 | r=ASN1_OBJECT_new(); | ||
| 78 | if (r == NULL) | ||
| 79 | { | ||
| 80 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_ASN1_LIB); | ||
| 81 | return(NULL); | ||
| 82 | } | ||
| 83 | data=OPENSSL_malloc(o->length); | ||
| 84 | if (data == NULL) | ||
| 85 | goto err; | ||
| 86 | if (o->data != NULL) | ||
| 87 | memcpy(data,o->data,o->length); | ||
| 88 | /* once data attached to object it remains const */ | ||
| 89 | r->data = data; | ||
| 90 | r->length=o->length; | ||
| 91 | r->nid=o->nid; | ||
| 92 | r->ln=r->sn=NULL; | ||
| 93 | if (o->ln != NULL) | ||
| 94 | { | ||
| 95 | i=strlen(o->ln)+1; | ||
| 96 | ln=OPENSSL_malloc(i); | ||
| 97 | if (ln == NULL) goto err; | ||
| 98 | memcpy(ln,o->ln,i); | ||
| 99 | r->ln=ln; | ||
| 100 | } | ||
| 101 | |||
| 102 | if (o->sn != NULL) | ||
| 103 | { | ||
| 104 | i=strlen(o->sn)+1; | ||
| 105 | sn=OPENSSL_malloc(i); | ||
| 106 | if (sn == NULL) goto err; | ||
| 107 | memcpy(sn,o->sn,i); | ||
| 108 | r->sn=sn; | ||
| 109 | } | ||
| 110 | r->flags=o->flags|(ASN1_OBJECT_FLAG_DYNAMIC| | ||
| 111 | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS|ASN1_OBJECT_FLAG_DYNAMIC_DATA); | ||
| 112 | return(r); | ||
| 113 | err: | ||
| 114 | OBJerr(OBJ_F_OBJ_DUP,ERR_R_MALLOC_FAILURE); | ||
| 115 | if (ln != NULL) OPENSSL_free(ln); | ||
| 116 | if (sn != NULL) OPENSSL_free(sn); | ||
| 117 | if (data != NULL) OPENSSL_free(data); | ||
| 118 | if (r != NULL) OPENSSL_free(r); | ||
| 119 | return(NULL); | ||
| 120 | } | ||
| 121 | |||
| 122 | int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b) | ||
| 123 | { | ||
| 124 | int ret; | ||
| 125 | |||
| 126 | ret=(a->length-b->length); | ||
| 127 | if (ret) return(ret); | ||
| 128 | return(memcmp(a->data,b->data,a->length)); | ||
| 129 | } | ||
diff --git a/src/lib/libcrypto/objects/obj_mac.num b/src/lib/libcrypto/objects/obj_mac.num new file mode 100644 index 0000000000..1d0a7c802d --- /dev/null +++ b/src/lib/libcrypto/objects/obj_mac.num | |||
| @@ -0,0 +1,919 @@ | |||
| 1 | undef 0 | ||
| 2 | rsadsi 1 | ||
| 3 | pkcs 2 | ||
| 4 | md2 3 | ||
| 5 | md5 4 | ||
| 6 | rc4 5 | ||
| 7 | rsaEncryption 6 | ||
| 8 | md2WithRSAEncryption 7 | ||
| 9 | md5WithRSAEncryption 8 | ||
| 10 | pbeWithMD2AndDES_CBC 9 | ||
| 11 | pbeWithMD5AndDES_CBC 10 | ||
| 12 | X500 11 | ||
| 13 | X509 12 | ||
| 14 | commonName 13 | ||
| 15 | countryName 14 | ||
| 16 | localityName 15 | ||
| 17 | stateOrProvinceName 16 | ||
| 18 | organizationName 17 | ||
| 19 | organizationalUnitName 18 | ||
| 20 | rsa 19 | ||
| 21 | pkcs7 20 | ||
| 22 | pkcs7_data 21 | ||
| 23 | pkcs7_signed 22 | ||
| 24 | pkcs7_enveloped 23 | ||
| 25 | pkcs7_signedAndEnveloped 24 | ||
| 26 | pkcs7_digest 25 | ||
| 27 | pkcs7_encrypted 26 | ||
| 28 | pkcs3 27 | ||
| 29 | dhKeyAgreement 28 | ||
| 30 | des_ecb 29 | ||
| 31 | des_cfb64 30 | ||
| 32 | des_cbc 31 | ||
| 33 | des_ede_ecb 32 | ||
| 34 | des_ede3_ecb 33 | ||
| 35 | idea_cbc 34 | ||
| 36 | idea_cfb64 35 | ||
| 37 | idea_ecb 36 | ||
| 38 | rc2_cbc 37 | ||
| 39 | rc2_ecb 38 | ||
| 40 | rc2_cfb64 39 | ||
| 41 | rc2_ofb64 40 | ||
| 42 | sha 41 | ||
| 43 | shaWithRSAEncryption 42 | ||
| 44 | des_ede_cbc 43 | ||
| 45 | des_ede3_cbc 44 | ||
| 46 | des_ofb64 45 | ||
| 47 | idea_ofb64 46 | ||
| 48 | pkcs9 47 | ||
| 49 | pkcs9_emailAddress 48 | ||
| 50 | pkcs9_unstructuredName 49 | ||
| 51 | pkcs9_contentType 50 | ||
| 52 | pkcs9_messageDigest 51 | ||
| 53 | pkcs9_signingTime 52 | ||
| 54 | pkcs9_countersignature 53 | ||
| 55 | pkcs9_challengePassword 54 | ||
| 56 | pkcs9_unstructuredAddress 55 | ||
| 57 | pkcs9_extCertAttributes 56 | ||
| 58 | netscape 57 | ||
| 59 | netscape_cert_extension 58 | ||
| 60 | netscape_data_type 59 | ||
| 61 | des_ede_cfb64 60 | ||
| 62 | des_ede3_cfb64 61 | ||
| 63 | des_ede_ofb64 62 | ||
| 64 | des_ede3_ofb64 63 | ||
| 65 | sha1 64 | ||
| 66 | sha1WithRSAEncryption 65 | ||
| 67 | dsaWithSHA 66 | ||
| 68 | dsa_2 67 | ||
| 69 | pbeWithSHA1AndRC2_CBC 68 | ||
| 70 | id_pbkdf2 69 | ||
| 71 | dsaWithSHA1_2 70 | ||
| 72 | netscape_cert_type 71 | ||
| 73 | netscape_base_url 72 | ||
| 74 | netscape_revocation_url 73 | ||
| 75 | netscape_ca_revocation_url 74 | ||
| 76 | netscape_renewal_url 75 | ||
| 77 | netscape_ca_policy_url 76 | ||
| 78 | netscape_ssl_server_name 77 | ||
| 79 | netscape_comment 78 | ||
| 80 | netscape_cert_sequence 79 | ||
| 81 | desx_cbc 80 | ||
| 82 | id_ce 81 | ||
| 83 | subject_key_identifier 82 | ||
| 84 | key_usage 83 | ||
| 85 | private_key_usage_period 84 | ||
| 86 | subject_alt_name 85 | ||
| 87 | issuer_alt_name 86 | ||
| 88 | basic_constraints 87 | ||
| 89 | crl_number 88 | ||
| 90 | certificate_policies 89 | ||
| 91 | authority_key_identifier 90 | ||
| 92 | bf_cbc 91 | ||
| 93 | bf_ecb 92 | ||
| 94 | bf_cfb64 93 | ||
| 95 | bf_ofb64 94 | ||
| 96 | mdc2 95 | ||
| 97 | mdc2WithRSA 96 | ||
| 98 | rc4_40 97 | ||
| 99 | rc2_40_cbc 98 | ||
| 100 | givenName 99 | ||
| 101 | surname 100 | ||
| 102 | initials 101 | ||
| 103 | uniqueIdentifier 102 | ||
| 104 | crl_distribution_points 103 | ||
| 105 | md5WithRSA 104 | ||
| 106 | serialNumber 105 | ||
| 107 | title 106 | ||
| 108 | description 107 | ||
| 109 | cast5_cbc 108 | ||
| 110 | cast5_ecb 109 | ||
| 111 | cast5_cfb64 110 | ||
| 112 | cast5_ofb64 111 | ||
| 113 | pbeWithMD5AndCast5_CBC 112 | ||
| 114 | dsaWithSHA1 113 | ||
| 115 | md5_sha1 114 | ||
| 116 | sha1WithRSA 115 | ||
| 117 | dsa 116 | ||
| 118 | ripemd160 117 | ||
| 119 | ripemd160WithRSA 119 | ||
| 120 | rc5_cbc 120 | ||
| 121 | rc5_ecb 121 | ||
| 122 | rc5_cfb64 122 | ||
| 123 | rc5_ofb64 123 | ||
| 124 | rle_compression 124 | ||
| 125 | zlib_compression 125 | ||
| 126 | ext_key_usage 126 | ||
| 127 | id_pkix 127 | ||
| 128 | id_kp 128 | ||
| 129 | server_auth 129 | ||
| 130 | client_auth 130 | ||
| 131 | code_sign 131 | ||
| 132 | email_protect 132 | ||
| 133 | time_stamp 133 | ||
| 134 | ms_code_ind 134 | ||
| 135 | ms_code_com 135 | ||
| 136 | ms_ctl_sign 136 | ||
| 137 | ms_sgc 137 | ||
| 138 | ms_efs 138 | ||
| 139 | ns_sgc 139 | ||
| 140 | delta_crl 140 | ||
| 141 | crl_reason 141 | ||
| 142 | invalidity_date 142 | ||
| 143 | sxnet 143 | ||
| 144 | pbe_WithSHA1And128BitRC4 144 | ||
| 145 | pbe_WithSHA1And40BitRC4 145 | ||
| 146 | pbe_WithSHA1And3_Key_TripleDES_CBC 146 | ||
| 147 | pbe_WithSHA1And2_Key_TripleDES_CBC 147 | ||
| 148 | pbe_WithSHA1And128BitRC2_CBC 148 | ||
| 149 | pbe_WithSHA1And40BitRC2_CBC 149 | ||
| 150 | keyBag 150 | ||
| 151 | pkcs8ShroudedKeyBag 151 | ||
| 152 | certBag 152 | ||
| 153 | crlBag 153 | ||
| 154 | secretBag 154 | ||
| 155 | safeContentsBag 155 | ||
| 156 | friendlyName 156 | ||
| 157 | localKeyID 157 | ||
| 158 | x509Certificate 158 | ||
| 159 | sdsiCertificate 159 | ||
| 160 | x509Crl 160 | ||
| 161 | pbes2 161 | ||
| 162 | pbmac1 162 | ||
| 163 | hmacWithSHA1 163 | ||
| 164 | id_qt_cps 164 | ||
| 165 | id_qt_unotice 165 | ||
| 166 | rc2_64_cbc 166 | ||
| 167 | SMIMECapabilities 167 | ||
| 168 | pbeWithMD2AndRC2_CBC 168 | ||
| 169 | pbeWithMD5AndRC2_CBC 169 | ||
| 170 | pbeWithSHA1AndDES_CBC 170 | ||
| 171 | ms_ext_req 171 | ||
| 172 | ext_req 172 | ||
| 173 | name 173 | ||
| 174 | dnQualifier 174 | ||
| 175 | id_pe 175 | ||
| 176 | id_ad 176 | ||
| 177 | info_access 177 | ||
| 178 | ad_OCSP 178 | ||
| 179 | ad_ca_issuers 179 | ||
| 180 | OCSP_sign 180 | ||
| 181 | iso 181 | ||
| 182 | member_body 182 | ||
| 183 | ISO_US 183 | ||
| 184 | X9_57 184 | ||
| 185 | X9cm 185 | ||
| 186 | pkcs1 186 | ||
| 187 | pkcs5 187 | ||
| 188 | SMIME 188 | ||
| 189 | id_smime_mod 189 | ||
| 190 | id_smime_ct 190 | ||
| 191 | id_smime_aa 191 | ||
| 192 | id_smime_alg 192 | ||
| 193 | id_smime_cd 193 | ||
| 194 | id_smime_spq 194 | ||
| 195 | id_smime_cti 195 | ||
| 196 | id_smime_mod_cms 196 | ||
| 197 | id_smime_mod_ess 197 | ||
| 198 | id_smime_mod_oid 198 | ||
| 199 | id_smime_mod_msg_v3 199 | ||
| 200 | id_smime_mod_ets_eSignature_88 200 | ||
| 201 | id_smime_mod_ets_eSignature_97 201 | ||
| 202 | id_smime_mod_ets_eSigPolicy_88 202 | ||
| 203 | id_smime_mod_ets_eSigPolicy_97 203 | ||
| 204 | id_smime_ct_receipt 204 | ||
| 205 | id_smime_ct_authData 205 | ||
| 206 | id_smime_ct_publishCert 206 | ||
| 207 | id_smime_ct_TSTInfo 207 | ||
| 208 | id_smime_ct_TDTInfo 208 | ||
| 209 | id_smime_ct_contentInfo 209 | ||
| 210 | id_smime_ct_DVCSRequestData 210 | ||
| 211 | id_smime_ct_DVCSResponseData 211 | ||
| 212 | id_smime_aa_receiptRequest 212 | ||
| 213 | id_smime_aa_securityLabel 213 | ||
| 214 | id_smime_aa_mlExpandHistory 214 | ||
| 215 | id_smime_aa_contentHint 215 | ||
| 216 | id_smime_aa_msgSigDigest 216 | ||
| 217 | id_smime_aa_encapContentType 217 | ||
| 218 | id_smime_aa_contentIdentifier 218 | ||
| 219 | id_smime_aa_macValue 219 | ||
| 220 | id_smime_aa_equivalentLabels 220 | ||
| 221 | id_smime_aa_contentReference 221 | ||
| 222 | id_smime_aa_encrypKeyPref 222 | ||
| 223 | id_smime_aa_signingCertificate 223 | ||
| 224 | id_smime_aa_smimeEncryptCerts 224 | ||
| 225 | id_smime_aa_timeStampToken 225 | ||
| 226 | id_smime_aa_ets_sigPolicyId 226 | ||
| 227 | id_smime_aa_ets_commitmentType 227 | ||
| 228 | id_smime_aa_ets_signerLocation 228 | ||
| 229 | id_smime_aa_ets_signerAttr 229 | ||
| 230 | id_smime_aa_ets_otherSigCert 230 | ||
| 231 | id_smime_aa_ets_contentTimestamp 231 | ||
| 232 | id_smime_aa_ets_CertificateRefs 232 | ||
| 233 | id_smime_aa_ets_RevocationRefs 233 | ||
| 234 | id_smime_aa_ets_certValues 234 | ||
| 235 | id_smime_aa_ets_revocationValues 235 | ||
| 236 | id_smime_aa_ets_escTimeStamp 236 | ||
| 237 | id_smime_aa_ets_certCRLTimestamp 237 | ||
| 238 | id_smime_aa_ets_archiveTimeStamp 238 | ||
| 239 | id_smime_aa_signatureType 239 | ||
| 240 | id_smime_aa_dvcs_dvc 240 | ||
| 241 | id_smime_alg_ESDHwith3DES 241 | ||
| 242 | id_smime_alg_ESDHwithRC2 242 | ||
| 243 | id_smime_alg_3DESwrap 243 | ||
| 244 | id_smime_alg_RC2wrap 244 | ||
| 245 | id_smime_alg_ESDH 245 | ||
| 246 | id_smime_alg_CMS3DESwrap 246 | ||
| 247 | id_smime_alg_CMSRC2wrap 247 | ||
| 248 | id_smime_cd_ldap 248 | ||
| 249 | id_smime_spq_ets_sqt_uri 249 | ||
| 250 | id_smime_spq_ets_sqt_unotice 250 | ||
| 251 | id_smime_cti_ets_proofOfOrigin 251 | ||
| 252 | id_smime_cti_ets_proofOfReceipt 252 | ||
| 253 | id_smime_cti_ets_proofOfDelivery 253 | ||
| 254 | id_smime_cti_ets_proofOfSender 254 | ||
| 255 | id_smime_cti_ets_proofOfApproval 255 | ||
| 256 | id_smime_cti_ets_proofOfCreation 256 | ||
| 257 | md4 257 | ||
| 258 | id_pkix_mod 258 | ||
| 259 | id_qt 259 | ||
| 260 | id_it 260 | ||
| 261 | id_pkip 261 | ||
| 262 | id_alg 262 | ||
| 263 | id_cmc 263 | ||
| 264 | id_on 264 | ||
| 265 | id_pda 265 | ||
| 266 | id_aca 266 | ||
| 267 | id_qcs 267 | ||
| 268 | id_cct 268 | ||
| 269 | id_pkix1_explicit_88 269 | ||
| 270 | id_pkix1_implicit_88 270 | ||
| 271 | id_pkix1_explicit_93 271 | ||
| 272 | id_pkix1_implicit_93 272 | ||
| 273 | id_mod_crmf 273 | ||
| 274 | id_mod_cmc 274 | ||
| 275 | id_mod_kea_profile_88 275 | ||
| 276 | id_mod_kea_profile_93 276 | ||
| 277 | id_mod_cmp 277 | ||
| 278 | id_mod_qualified_cert_88 278 | ||
| 279 | id_mod_qualified_cert_93 279 | ||
| 280 | id_mod_attribute_cert 280 | ||
| 281 | id_mod_timestamp_protocol 281 | ||
| 282 | id_mod_ocsp 282 | ||
| 283 | id_mod_dvcs 283 | ||
| 284 | id_mod_cmp2000 284 | ||
| 285 | biometricInfo 285 | ||
| 286 | qcStatements 286 | ||
| 287 | ac_auditEntity 287 | ||
| 288 | ac_targeting 288 | ||
| 289 | aaControls 289 | ||
| 290 | sbgp_ipAddrBlock 290 | ||
| 291 | sbgp_autonomousSysNum 291 | ||
| 292 | sbgp_routerIdentifier 292 | ||
| 293 | textNotice 293 | ||
| 294 | ipsecEndSystem 294 | ||
| 295 | ipsecTunnel 295 | ||
| 296 | ipsecUser 296 | ||
| 297 | dvcs 297 | ||
| 298 | id_it_caProtEncCert 298 | ||
| 299 | id_it_signKeyPairTypes 299 | ||
| 300 | id_it_encKeyPairTypes 300 | ||
| 301 | id_it_preferredSymmAlg 301 | ||
| 302 | id_it_caKeyUpdateInfo 302 | ||
| 303 | id_it_currentCRL 303 | ||
| 304 | id_it_unsupportedOIDs 304 | ||
| 305 | id_it_subscriptionRequest 305 | ||
| 306 | id_it_subscriptionResponse 306 | ||
| 307 | id_it_keyPairParamReq 307 | ||
| 308 | id_it_keyPairParamRep 308 | ||
| 309 | id_it_revPassphrase 309 | ||
| 310 | id_it_implicitConfirm 310 | ||
| 311 | id_it_confirmWaitTime 311 | ||
| 312 | id_it_origPKIMessage 312 | ||
| 313 | id_regCtrl 313 | ||
| 314 | id_regInfo 314 | ||
| 315 | id_regCtrl_regToken 315 | ||
| 316 | id_regCtrl_authenticator 316 | ||
| 317 | id_regCtrl_pkiPublicationInfo 317 | ||
| 318 | id_regCtrl_pkiArchiveOptions 318 | ||
| 319 | id_regCtrl_oldCertID 319 | ||
| 320 | id_regCtrl_protocolEncrKey 320 | ||
| 321 | id_regInfo_utf8Pairs 321 | ||
| 322 | id_regInfo_certReq 322 | ||
| 323 | id_alg_des40 323 | ||
| 324 | id_alg_noSignature 324 | ||
| 325 | id_alg_dh_sig_hmac_sha1 325 | ||
| 326 | id_alg_dh_pop 326 | ||
| 327 | id_cmc_statusInfo 327 | ||
| 328 | id_cmc_identification 328 | ||
| 329 | id_cmc_identityProof 329 | ||
| 330 | id_cmc_dataReturn 330 | ||
| 331 | id_cmc_transactionId 331 | ||
| 332 | id_cmc_senderNonce 332 | ||
| 333 | id_cmc_recipientNonce 333 | ||
| 334 | id_cmc_addExtensions 334 | ||
| 335 | id_cmc_encryptedPOP 335 | ||
| 336 | id_cmc_decryptedPOP 336 | ||
| 337 | id_cmc_lraPOPWitness 337 | ||
| 338 | id_cmc_getCert 338 | ||
| 339 | id_cmc_getCRL 339 | ||
| 340 | id_cmc_revokeRequest 340 | ||
| 341 | id_cmc_regInfo 341 | ||
| 342 | id_cmc_responseInfo 342 | ||
| 343 | id_cmc_queryPending 343 | ||
| 344 | id_cmc_popLinkRandom 344 | ||
| 345 | id_cmc_popLinkWitness 345 | ||
| 346 | id_cmc_confirmCertAcceptance 346 | ||
| 347 | id_on_personalData 347 | ||
| 348 | id_pda_dateOfBirth 348 | ||
| 349 | id_pda_placeOfBirth 349 | ||
| 350 | id_pda_pseudonym 350 | ||
| 351 | id_pda_gender 351 | ||
| 352 | id_pda_countryOfCitizenship 352 | ||
| 353 | id_pda_countryOfResidence 353 | ||
| 354 | id_aca_authenticationInfo 354 | ||
| 355 | id_aca_accessIdentity 355 | ||
| 356 | id_aca_chargingIdentity 356 | ||
| 357 | id_aca_group 357 | ||
| 358 | id_aca_role 358 | ||
| 359 | id_qcs_pkixQCSyntax_v1 359 | ||
| 360 | id_cct_crs 360 | ||
| 361 | id_cct_PKIData 361 | ||
| 362 | id_cct_PKIResponse 362 | ||
| 363 | ad_timeStamping 363 | ||
| 364 | ad_dvcs 364 | ||
| 365 | id_pkix_OCSP_basic 365 | ||
| 366 | id_pkix_OCSP_Nonce 366 | ||
| 367 | id_pkix_OCSP_CrlID 367 | ||
| 368 | id_pkix_OCSP_acceptableResponses 368 | ||
| 369 | id_pkix_OCSP_noCheck 369 | ||
| 370 | id_pkix_OCSP_archiveCutoff 370 | ||
| 371 | id_pkix_OCSP_serviceLocator 371 | ||
| 372 | id_pkix_OCSP_extendedStatus 372 | ||
| 373 | id_pkix_OCSP_valid 373 | ||
| 374 | id_pkix_OCSP_path 374 | ||
| 375 | id_pkix_OCSP_trustRoot 375 | ||
| 376 | algorithm 376 | ||
| 377 | rsaSignature 377 | ||
| 378 | X500algorithms 378 | ||
| 379 | org 379 | ||
| 380 | dod 380 | ||
| 381 | iana 381 | ||
| 382 | Directory 382 | ||
| 383 | Management 383 | ||
| 384 | Experimental 384 | ||
| 385 | Private 385 | ||
| 386 | Security 386 | ||
| 387 | SNMPv2 387 | ||
| 388 | Mail 388 | ||
| 389 | Enterprises 389 | ||
| 390 | dcObject 390 | ||
| 391 | domainComponent 391 | ||
| 392 | Domain 392 | ||
| 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 | ||
| 510 | pseudonym 510 | ||
| 511 | InternationalRA 511 | ||
| 512 | id_set 512 | ||
| 513 | set_ctype 513 | ||
| 514 | set_msgExt 514 | ||
| 515 | set_attr 515 | ||
| 516 | set_policy 516 | ||
| 517 | set_certExt 517 | ||
| 518 | set_brand 518 | ||
| 519 | setct_PANData 519 | ||
| 520 | setct_PANToken 520 | ||
| 521 | setct_PANOnly 521 | ||
| 522 | setct_OIData 522 | ||
| 523 | setct_PI 523 | ||
| 524 | setct_PIData 524 | ||
| 525 | setct_PIDataUnsigned 525 | ||
| 526 | setct_HODInput 526 | ||
| 527 | setct_AuthResBaggage 527 | ||
| 528 | setct_AuthRevReqBaggage 528 | ||
| 529 | setct_AuthRevResBaggage 529 | ||
| 530 | setct_CapTokenSeq 530 | ||
| 531 | setct_PInitResData 531 | ||
| 532 | setct_PI_TBS 532 | ||
| 533 | setct_PResData 533 | ||
| 534 | setct_AuthReqTBS 534 | ||
| 535 | setct_AuthResTBS 535 | ||
| 536 | setct_AuthResTBSX 536 | ||
| 537 | setct_AuthTokenTBS 537 | ||
| 538 | setct_CapTokenData 538 | ||
| 539 | setct_CapTokenTBS 539 | ||
| 540 | setct_AcqCardCodeMsg 540 | ||
| 541 | setct_AuthRevReqTBS 541 | ||
| 542 | setct_AuthRevResData 542 | ||
| 543 | setct_AuthRevResTBS 543 | ||
| 544 | setct_CapReqTBS 544 | ||
| 545 | setct_CapReqTBSX 545 | ||
| 546 | setct_CapResData 546 | ||
| 547 | setct_CapRevReqTBS 547 | ||
| 548 | setct_CapRevReqTBSX 548 | ||
| 549 | setct_CapRevResData 549 | ||
| 550 | setct_CredReqTBS 550 | ||
| 551 | setct_CredReqTBSX 551 | ||
| 552 | setct_CredResData 552 | ||
| 553 | setct_CredRevReqTBS 553 | ||
| 554 | setct_CredRevReqTBSX 554 | ||
| 555 | setct_CredRevResData 555 | ||
| 556 | setct_PCertReqData 556 | ||
| 557 | setct_PCertResTBS 557 | ||
| 558 | setct_BatchAdminReqData 558 | ||
| 559 | setct_BatchAdminResData 559 | ||
| 560 | setct_CardCInitResTBS 560 | ||
| 561 | setct_MeAqCInitResTBS 561 | ||
| 562 | setct_RegFormResTBS 562 | ||
| 563 | setct_CertReqData 563 | ||
| 564 | setct_CertReqTBS 564 | ||
| 565 | setct_CertResData 565 | ||
| 566 | setct_CertInqReqTBS 566 | ||
| 567 | setct_ErrorTBS 567 | ||
| 568 | setct_PIDualSignedTBE 568 | ||
| 569 | setct_PIUnsignedTBE 569 | ||
| 570 | setct_AuthReqTBE 570 | ||
| 571 | setct_AuthResTBE 571 | ||
| 572 | setct_AuthResTBEX 572 | ||
| 573 | setct_AuthTokenTBE 573 | ||
| 574 | setct_CapTokenTBE 574 | ||
| 575 | setct_CapTokenTBEX 575 | ||
| 576 | setct_AcqCardCodeMsgTBE 576 | ||
| 577 | setct_AuthRevReqTBE 577 | ||
| 578 | setct_AuthRevResTBE 578 | ||
| 579 | setct_AuthRevResTBEB 579 | ||
| 580 | setct_CapReqTBE 580 | ||
| 581 | setct_CapReqTBEX 581 | ||
| 582 | setct_CapResTBE 582 | ||
| 583 | setct_CapRevReqTBE 583 | ||
| 584 | setct_CapRevReqTBEX 584 | ||
| 585 | setct_CapRevResTBE 585 | ||
| 586 | setct_CredReqTBE 586 | ||
| 587 | setct_CredReqTBEX 587 | ||
| 588 | setct_CredResTBE 588 | ||
| 589 | setct_CredRevReqTBE 589 | ||
| 590 | setct_CredRevReqTBEX 590 | ||
| 591 | setct_CredRevResTBE 591 | ||
| 592 | setct_BatchAdminReqTBE 592 | ||
| 593 | setct_BatchAdminResTBE 593 | ||
| 594 | setct_RegFormReqTBE 594 | ||
| 595 | setct_CertReqTBE 595 | ||
| 596 | setct_CertReqTBEX 596 | ||
| 597 | setct_CertResTBE 597 | ||
| 598 | setct_CRLNotificationTBS 598 | ||
| 599 | setct_CRLNotificationResTBS 599 | ||
| 600 | setct_BCIDistributionTBS 600 | ||
| 601 | setext_genCrypt 601 | ||
| 602 | setext_miAuth 602 | ||
| 603 | setext_pinSecure 603 | ||
| 604 | setext_pinAny 604 | ||
| 605 | setext_track2 605 | ||
| 606 | setext_cv 606 | ||
| 607 | set_policy_root 607 | ||
| 608 | setCext_hashedRoot 608 | ||
| 609 | setCext_certType 609 | ||
| 610 | setCext_merchData 610 | ||
| 611 | setCext_cCertRequired 611 | ||
| 612 | setCext_tunneling 612 | ||
| 613 | setCext_setExt 613 | ||
| 614 | setCext_setQualf 614 | ||
| 615 | setCext_PGWYcapabilities 615 | ||
| 616 | setCext_TokenIdentifier 616 | ||
| 617 | setCext_Track2Data 617 | ||
| 618 | setCext_TokenType 618 | ||
| 619 | setCext_IssuerCapabilities 619 | ||
| 620 | setAttr_Cert 620 | ||
| 621 | setAttr_PGWYcap 621 | ||
| 622 | setAttr_TokenType 622 | ||
| 623 | setAttr_IssCap 623 | ||
| 624 | set_rootKeyThumb 624 | ||
| 625 | set_addPolicy 625 | ||
| 626 | setAttr_Token_EMV 626 | ||
| 627 | setAttr_Token_B0Prime 627 | ||
| 628 | setAttr_IssCap_CVM 628 | ||
| 629 | setAttr_IssCap_T2 629 | ||
| 630 | setAttr_IssCap_Sig 630 | ||
| 631 | setAttr_GenCryptgrm 631 | ||
| 632 | setAttr_T2Enc 632 | ||
| 633 | setAttr_T2cleartxt 633 | ||
| 634 | setAttr_TokICCsig 634 | ||
| 635 | setAttr_SecDevSig 635 | ||
| 636 | set_brand_IATA_ATA 636 | ||
| 637 | set_brand_Diners 637 | ||
| 638 | set_brand_AmericanExpress 638 | ||
| 639 | set_brand_JCB 639 | ||
| 640 | set_brand_Visa 640 | ||
| 641 | set_brand_MasterCard 641 | ||
| 642 | set_brand_Novus 642 | ||
| 643 | des_cdmf 643 | ||
| 644 | rsaOAEPEncryptionSET 644 | ||
| 645 | itu_t 645 | ||
| 646 | joint_iso_itu_t 646 | ||
| 647 | international_organizations 647 | ||
| 648 | ms_smartcard_login 648 | ||
| 649 | ms_upn 649 | ||
| 650 | aes_128_cfb1 650 | ||
| 651 | aes_192_cfb1 651 | ||
| 652 | aes_256_cfb1 652 | ||
| 653 | aes_128_cfb8 653 | ||
| 654 | aes_192_cfb8 654 | ||
| 655 | aes_256_cfb8 655 | ||
| 656 | des_cfb1 656 | ||
| 657 | des_cfb8 657 | ||
| 658 | des_ede3_cfb1 658 | ||
| 659 | des_ede3_cfb8 659 | ||
| 660 | streetAddress 660 | ||
| 661 | postalCode 661 | ||
| 662 | id_ppl 662 | ||
| 663 | proxyCertInfo 663 | ||
| 664 | id_ppl_anyLanguage 664 | ||
| 665 | id_ppl_inheritAll 665 | ||
| 666 | name_constraints 666 | ||
| 667 | Independent 667 | ||
| 668 | sha256WithRSAEncryption 668 | ||
| 669 | sha384WithRSAEncryption 669 | ||
| 670 | sha512WithRSAEncryption 670 | ||
| 671 | sha224WithRSAEncryption 671 | ||
| 672 | sha256 672 | ||
| 673 | sha384 673 | ||
| 674 | sha512 674 | ||
| 675 | sha224 675 | ||
| 676 | identified_organization 676 | ||
| 677 | certicom_arc 677 | ||
| 678 | wap 678 | ||
| 679 | wap_wsg 679 | ||
| 680 | X9_62_id_characteristic_two_basis 680 | ||
| 681 | X9_62_onBasis 681 | ||
| 682 | X9_62_tpBasis 682 | ||
| 683 | X9_62_ppBasis 683 | ||
| 684 | X9_62_c2pnb163v1 684 | ||
| 685 | X9_62_c2pnb163v2 685 | ||
| 686 | X9_62_c2pnb163v3 686 | ||
| 687 | X9_62_c2pnb176v1 687 | ||
| 688 | X9_62_c2tnb191v1 688 | ||
| 689 | X9_62_c2tnb191v2 689 | ||
| 690 | X9_62_c2tnb191v3 690 | ||
| 691 | X9_62_c2onb191v4 691 | ||
| 692 | X9_62_c2onb191v5 692 | ||
| 693 | X9_62_c2pnb208w1 693 | ||
| 694 | X9_62_c2tnb239v1 694 | ||
| 695 | X9_62_c2tnb239v2 695 | ||
| 696 | X9_62_c2tnb239v3 696 | ||
| 697 | X9_62_c2onb239v4 697 | ||
| 698 | X9_62_c2onb239v5 698 | ||
| 699 | X9_62_c2pnb272w1 699 | ||
| 700 | X9_62_c2pnb304w1 700 | ||
| 701 | X9_62_c2tnb359v1 701 | ||
| 702 | X9_62_c2pnb368w1 702 | ||
| 703 | X9_62_c2tnb431r1 703 | ||
| 704 | secp112r1 704 | ||
| 705 | secp112r2 705 | ||
| 706 | secp128r1 706 | ||
| 707 | secp128r2 707 | ||
| 708 | secp160k1 708 | ||
| 709 | secp160r1 709 | ||
| 710 | secp160r2 710 | ||
| 711 | secp192k1 711 | ||
| 712 | secp224k1 712 | ||
| 713 | secp224r1 713 | ||
| 714 | secp256k1 714 | ||
| 715 | secp384r1 715 | ||
| 716 | secp521r1 716 | ||
| 717 | sect113r1 717 | ||
| 718 | sect113r2 718 | ||
| 719 | sect131r1 719 | ||
| 720 | sect131r2 720 | ||
| 721 | sect163k1 721 | ||
| 722 | sect163r1 722 | ||
| 723 | sect163r2 723 | ||
| 724 | sect193r1 724 | ||
| 725 | sect193r2 725 | ||
| 726 | sect233k1 726 | ||
| 727 | sect233r1 727 | ||
| 728 | sect239k1 728 | ||
| 729 | sect283k1 729 | ||
| 730 | sect283r1 730 | ||
| 731 | sect409k1 731 | ||
| 732 | sect409r1 732 | ||
| 733 | sect571k1 733 | ||
| 734 | sect571r1 734 | ||
| 735 | wap_wsg_idm_ecid_wtls1 735 | ||
| 736 | wap_wsg_idm_ecid_wtls3 736 | ||
| 737 | wap_wsg_idm_ecid_wtls4 737 | ||
| 738 | wap_wsg_idm_ecid_wtls5 738 | ||
| 739 | wap_wsg_idm_ecid_wtls6 739 | ||
| 740 | wap_wsg_idm_ecid_wtls7 740 | ||
| 741 | wap_wsg_idm_ecid_wtls8 741 | ||
| 742 | wap_wsg_idm_ecid_wtls9 742 | ||
| 743 | wap_wsg_idm_ecid_wtls10 743 | ||
| 744 | wap_wsg_idm_ecid_wtls11 744 | ||
| 745 | wap_wsg_idm_ecid_wtls12 745 | ||
| 746 | any_policy 746 | ||
| 747 | policy_mappings 747 | ||
| 748 | inhibit_any_policy 748 | ||
| 749 | ipsec3 749 | ||
| 750 | ipsec4 750 | ||
| 751 | camellia_128_cbc 751 | ||
| 752 | camellia_192_cbc 752 | ||
| 753 | camellia_256_cbc 753 | ||
| 754 | camellia_128_ecb 754 | ||
| 755 | camellia_192_ecb 755 | ||
| 756 | camellia_256_ecb 756 | ||
| 757 | camellia_128_cfb128 757 | ||
| 758 | camellia_192_cfb128 758 | ||
| 759 | camellia_256_cfb128 759 | ||
| 760 | camellia_128_cfb1 760 | ||
| 761 | camellia_192_cfb1 761 | ||
| 762 | camellia_256_cfb1 762 | ||
| 763 | camellia_128_cfb8 763 | ||
| 764 | camellia_192_cfb8 764 | ||
| 765 | camellia_256_cfb8 765 | ||
| 766 | camellia_128_ofb128 766 | ||
| 767 | camellia_192_ofb128 767 | ||
| 768 | camellia_256_ofb128 768 | ||
| 769 | subject_directory_attributes 769 | ||
| 770 | issuing_distribution_point 770 | ||
| 771 | certificate_issuer 771 | ||
| 772 | korea 772 | ||
| 773 | kisa 773 | ||
| 774 | kftc 774 | ||
| 775 | npki_alg 775 | ||
| 776 | seed_ecb 776 | ||
| 777 | seed_cbc 777 | ||
| 778 | seed_ofb128 778 | ||
| 779 | seed_cfb128 779 | ||
| 780 | hmac_md5 780 | ||
| 781 | hmac_sha1 781 | ||
| 782 | id_PasswordBasedMAC 782 | ||
| 783 | id_DHBasedMac 783 | ||
| 784 | id_it_suppLangTags 784 | ||
| 785 | caRepository 785 | ||
| 786 | id_smime_ct_compressedData 786 | ||
| 787 | id_ct_asciiTextWithCRLF 787 | ||
| 788 | id_aes128_wrap 788 | ||
| 789 | id_aes192_wrap 789 | ||
| 790 | id_aes256_wrap 790 | ||
| 791 | ecdsa_with_Recommended 791 | ||
| 792 | ecdsa_with_Specified 792 | ||
| 793 | ecdsa_with_SHA224 793 | ||
| 794 | ecdsa_with_SHA256 794 | ||
| 795 | ecdsa_with_SHA384 795 | ||
| 796 | ecdsa_with_SHA512 796 | ||
| 797 | hmacWithMD5 797 | ||
| 798 | hmacWithSHA224 798 | ||
| 799 | hmacWithSHA256 799 | ||
| 800 | hmacWithSHA384 800 | ||
| 801 | hmacWithSHA512 801 | ||
| 802 | dsa_with_SHA224 802 | ||
| 803 | dsa_with_SHA256 803 | ||
| 804 | whirlpool 804 | ||
| 805 | cryptopro 805 | ||
| 806 | cryptocom 806 | ||
| 807 | id_GostR3411_94_with_GostR3410_2001 807 | ||
| 808 | id_GostR3411_94_with_GostR3410_94 808 | ||
| 809 | id_GostR3411_94 809 | ||
| 810 | id_HMACGostR3411_94 810 | ||
| 811 | id_GostR3410_2001 811 | ||
| 812 | id_GostR3410_94 812 | ||
| 813 | id_Gost28147_89 813 | ||
| 814 | gost89_cnt 814 | ||
| 815 | id_Gost28147_89_MAC 815 | ||
| 816 | id_GostR3411_94_prf 816 | ||
| 817 | id_GostR3410_2001DH 817 | ||
| 818 | id_GostR3410_94DH 818 | ||
| 819 | id_Gost28147_89_CryptoPro_KeyMeshing 819 | ||
| 820 | id_Gost28147_89_None_KeyMeshing 820 | ||
| 821 | id_GostR3411_94_TestParamSet 821 | ||
| 822 | id_GostR3411_94_CryptoProParamSet 822 | ||
| 823 | id_Gost28147_89_TestParamSet 823 | ||
| 824 | id_Gost28147_89_CryptoPro_A_ParamSet 824 | ||
| 825 | id_Gost28147_89_CryptoPro_B_ParamSet 825 | ||
| 826 | id_Gost28147_89_CryptoPro_C_ParamSet 826 | ||
| 827 | id_Gost28147_89_CryptoPro_D_ParamSet 827 | ||
| 828 | id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet 828 | ||
| 829 | id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet 829 | ||
| 830 | id_Gost28147_89_CryptoPro_RIC_1_ParamSet 830 | ||
| 831 | id_GostR3410_94_TestParamSet 831 | ||
| 832 | id_GostR3410_94_CryptoPro_A_ParamSet 832 | ||
| 833 | id_GostR3410_94_CryptoPro_B_ParamSet 833 | ||
| 834 | id_GostR3410_94_CryptoPro_C_ParamSet 834 | ||
| 835 | id_GostR3410_94_CryptoPro_D_ParamSet 835 | ||
| 836 | id_GostR3410_94_CryptoPro_XchA_ParamSet 836 | ||
| 837 | id_GostR3410_94_CryptoPro_XchB_ParamSet 837 | ||
| 838 | id_GostR3410_94_CryptoPro_XchC_ParamSet 838 | ||
| 839 | id_GostR3410_2001_TestParamSet 839 | ||
| 840 | id_GostR3410_2001_CryptoPro_A_ParamSet 840 | ||
| 841 | id_GostR3410_2001_CryptoPro_B_ParamSet 841 | ||
| 842 | id_GostR3410_2001_CryptoPro_C_ParamSet 842 | ||
| 843 | id_GostR3410_2001_CryptoPro_XchA_ParamSet 843 | ||
| 844 | id_GostR3410_2001_CryptoPro_XchB_ParamSet 844 | ||
| 845 | id_GostR3410_94_a 845 | ||
| 846 | id_GostR3410_94_aBis 846 | ||
| 847 | id_GostR3410_94_b 847 | ||
| 848 | id_GostR3410_94_bBis 848 | ||
| 849 | id_Gost28147_89_cc 849 | ||
| 850 | id_GostR3410_94_cc 850 | ||
| 851 | id_GostR3410_2001_cc 851 | ||
| 852 | id_GostR3411_94_with_GostR3410_94_cc 852 | ||
| 853 | id_GostR3411_94_with_GostR3410_2001_cc 853 | ||
| 854 | id_GostR3410_2001_ParamSet_cc 854 | ||
| 855 | hmac 855 | ||
| 856 | LocalKeySet 856 | ||
| 857 | freshest_crl 857 | ||
| 858 | id_on_permanentIdentifier 858 | ||
| 859 | searchGuide 859 | ||
| 860 | businessCategory 860 | ||
| 861 | postalAddress 861 | ||
| 862 | postOfficeBox 862 | ||
| 863 | physicalDeliveryOfficeName 863 | ||
| 864 | telephoneNumber 864 | ||
| 865 | telexNumber 865 | ||
| 866 | teletexTerminalIdentifier 866 | ||
| 867 | facsimileTelephoneNumber 867 | ||
| 868 | x121Address 868 | ||
| 869 | internationaliSDNNumber 869 | ||
| 870 | registeredAddress 870 | ||
| 871 | destinationIndicator 871 | ||
| 872 | preferredDeliveryMethod 872 | ||
| 873 | presentationAddress 873 | ||
| 874 | supportedApplicationContext 874 | ||
| 875 | member 875 | ||
| 876 | owner 876 | ||
| 877 | roleOccupant 877 | ||
| 878 | seeAlso 878 | ||
| 879 | userPassword 879 | ||
| 880 | userCertificate 880 | ||
| 881 | cACertificate 881 | ||
| 882 | authorityRevocationList 882 | ||
| 883 | certificateRevocationList 883 | ||
| 884 | crossCertificatePair 884 | ||
| 885 | enhancedSearchGuide 885 | ||
| 886 | protocolInformation 886 | ||
| 887 | distinguishedName 887 | ||
| 888 | uniqueMember 888 | ||
| 889 | houseIdentifier 889 | ||
| 890 | supportedAlgorithms 890 | ||
| 891 | deltaRevocationList 891 | ||
| 892 | dmdName 892 | ||
| 893 | id_alg_PWRI_KEK 893 | ||
| 894 | cmac 894 | ||
| 895 | aes_128_gcm 895 | ||
| 896 | aes_128_ccm 896 | ||
| 897 | id_aes128_wrap_pad 897 | ||
| 898 | aes_192_gcm 898 | ||
| 899 | aes_192_ccm 899 | ||
| 900 | id_aes192_wrap_pad 900 | ||
| 901 | aes_256_gcm 901 | ||
| 902 | aes_256_ccm 902 | ||
| 903 | id_aes256_wrap_pad 903 | ||
| 904 | aes_128_ctr 904 | ||
| 905 | aes_192_ctr 905 | ||
| 906 | aes_256_ctr 906 | ||
| 907 | id_camellia128_wrap 907 | ||
| 908 | id_camellia192_wrap 908 | ||
| 909 | id_camellia256_wrap 909 | ||
| 910 | anyExtendedKeyUsage 910 | ||
| 911 | mgf1 911 | ||
| 912 | rsassaPss 912 | ||
| 913 | aes_128_xts 913 | ||
| 914 | aes_256_xts 914 | ||
| 915 | rc4_hmac_md5 915 | ||
| 916 | aes_128_cbc_hmac_sha1 916 | ||
| 917 | aes_192_cbc_hmac_sha1 917 | ||
| 918 | aes_256_cbc_hmac_sha1 918 | ||
| 919 | rsaesOaep 919 | ||
diff --git a/src/lib/libcrypto/objects/obj_xref.c b/src/lib/libcrypto/objects/obj_xref.c new file mode 100644 index 0000000000..9f744bcede --- /dev/null +++ b/src/lib/libcrypto/objects/obj_xref.c | |||
| @@ -0,0 +1,234 @@ | |||
| 1 | /* crypto/objects/obj_xref.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | ||
| 3 | * project 2006. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <openssl/objects.h> | ||
| 60 | #include "obj_xref.h" | ||
| 61 | |||
| 62 | DECLARE_STACK_OF(nid_triple) | ||
| 63 | STACK_OF(nid_triple) *sig_app, *sigx_app; | ||
| 64 | |||
| 65 | static int sig_cmp(const nid_triple *a, const nid_triple *b) | ||
| 66 | { | ||
| 67 | return a->sign_id - b->sign_id; | ||
| 68 | } | ||
| 69 | |||
| 70 | DECLARE_OBJ_BSEARCH_CMP_FN(nid_triple, nid_triple, sig); | ||
| 71 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(nid_triple, nid_triple, sig); | ||
| 72 | |||
| 73 | static int sig_sk_cmp(const nid_triple * const *a, const nid_triple * const *b) | ||
| 74 | { | ||
| 75 | return (*a)->sign_id - (*b)->sign_id; | ||
| 76 | } | ||
| 77 | |||
| 78 | DECLARE_OBJ_BSEARCH_CMP_FN(const nid_triple *, const nid_triple *, sigx); | ||
| 79 | |||
| 80 | static int sigx_cmp(const nid_triple * const *a, const nid_triple * const *b) | ||
| 81 | { | ||
| 82 | int ret; | ||
| 83 | ret = (*a)->hash_id - (*b)->hash_id; | ||
| 84 | if (ret) | ||
| 85 | return ret; | ||
| 86 | return (*a)->pkey_id - (*b)->pkey_id; | ||
| 87 | } | ||
| 88 | |||
| 89 | IMPLEMENT_OBJ_BSEARCH_CMP_FN(const nid_triple *, const nid_triple *, sigx); | ||
| 90 | |||
| 91 | int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid) | ||
| 92 | { | ||
| 93 | nid_triple tmp; | ||
| 94 | const nid_triple *rv = NULL; | ||
| 95 | tmp.sign_id = signid; | ||
| 96 | |||
| 97 | if (sig_app) | ||
| 98 | { | ||
| 99 | int idx = sk_nid_triple_find(sig_app, &tmp); | ||
| 100 | if (idx >= 0) | ||
| 101 | rv = sk_nid_triple_value(sig_app, idx); | ||
| 102 | } | ||
| 103 | |||
| 104 | #ifndef OBJ_XREF_TEST2 | ||
| 105 | if (rv == NULL) | ||
| 106 | { | ||
| 107 | rv = OBJ_bsearch_sig(&tmp, sigoid_srt, | ||
| 108 | sizeof(sigoid_srt) / sizeof(nid_triple)); | ||
| 109 | } | ||
| 110 | #endif | ||
| 111 | if (rv == NULL) | ||
| 112 | return 0; | ||
| 113 | if (pdig_nid) | ||
| 114 | *pdig_nid = rv->hash_id; | ||
| 115 | if (ppkey_nid) | ||
| 116 | *ppkey_nid = rv->pkey_id; | ||
| 117 | return 1; | ||
| 118 | } | ||
| 119 | |||
| 120 | int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid) | ||
| 121 | { | ||
| 122 | nid_triple tmp; | ||
| 123 | const nid_triple *t=&tmp; | ||
| 124 | const nid_triple **rv = NULL; | ||
| 125 | |||
| 126 | tmp.hash_id = dig_nid; | ||
| 127 | tmp.pkey_id = pkey_nid; | ||
| 128 | |||
| 129 | if (sigx_app) | ||
| 130 | { | ||
| 131 | int idx = sk_nid_triple_find(sigx_app, &tmp); | ||
| 132 | if (idx >= 0) | ||
| 133 | { | ||
| 134 | t = sk_nid_triple_value(sigx_app, idx); | ||
| 135 | rv = &t; | ||
| 136 | } | ||
| 137 | } | ||
| 138 | |||
| 139 | #ifndef OBJ_XREF_TEST2 | ||
| 140 | if (rv == NULL) | ||
| 141 | { | ||
| 142 | rv = OBJ_bsearch_sigx(&t, sigoid_srt_xref, | ||
| 143 | sizeof(sigoid_srt_xref) / sizeof(nid_triple *) | ||
| 144 | ); | ||
| 145 | } | ||
| 146 | #endif | ||
| 147 | if (rv == NULL) | ||
| 148 | return 0; | ||
| 149 | if (psignid) | ||
| 150 | *psignid = (*rv)->sign_id; | ||
| 151 | return 1; | ||
| 152 | } | ||
| 153 | |||
| 154 | int OBJ_add_sigid(int signid, int dig_id, int pkey_id) | ||
| 155 | { | ||
| 156 | nid_triple *ntr; | ||
| 157 | if (!sig_app) | ||
| 158 | sig_app = sk_nid_triple_new(sig_sk_cmp); | ||
| 159 | if (!sig_app) | ||
| 160 | return 0; | ||
| 161 | if (!sigx_app) | ||
| 162 | sigx_app = sk_nid_triple_new(sigx_cmp); | ||
| 163 | if (!sigx_app) | ||
| 164 | return 0; | ||
| 165 | ntr = OPENSSL_malloc(sizeof(int) * 3); | ||
| 166 | if (!ntr) | ||
| 167 | return 0; | ||
| 168 | ntr->sign_id = signid; | ||
| 169 | ntr->hash_id = dig_id; | ||
| 170 | ntr->pkey_id = pkey_id; | ||
| 171 | |||
| 172 | if (!sk_nid_triple_push(sig_app, ntr)) | ||
| 173 | { | ||
| 174 | OPENSSL_free(ntr); | ||
| 175 | return 0; | ||
| 176 | } | ||
| 177 | |||
| 178 | if (!sk_nid_triple_push(sigx_app, ntr)) | ||
| 179 | return 0; | ||
| 180 | |||
| 181 | sk_nid_triple_sort(sig_app); | ||
| 182 | sk_nid_triple_sort(sigx_app); | ||
| 183 | |||
| 184 | return 1; | ||
| 185 | } | ||
| 186 | |||
| 187 | static void sid_free(nid_triple *tt) | ||
| 188 | { | ||
| 189 | OPENSSL_free(tt); | ||
| 190 | } | ||
| 191 | |||
| 192 | void OBJ_sigid_free(void) | ||
| 193 | { | ||
| 194 | if (sig_app) | ||
| 195 | { | ||
| 196 | sk_nid_triple_pop_free(sig_app, sid_free); | ||
| 197 | sig_app = NULL; | ||
| 198 | } | ||
| 199 | if (sigx_app) | ||
| 200 | { | ||
| 201 | sk_nid_triple_free(sigx_app); | ||
| 202 | sigx_app = NULL; | ||
| 203 | } | ||
| 204 | } | ||
| 205 | |||
| 206 | #ifdef OBJ_XREF_TEST | ||
| 207 | |||
| 208 | main() | ||
| 209 | { | ||
| 210 | int n1, n2, n3; | ||
| 211 | |||
| 212 | int i, rv; | ||
| 213 | #ifdef OBJ_XREF_TEST2 | ||
| 214 | for (i = 0; i < sizeof(sigoid_srt) / sizeof(nid_triple); i++) | ||
| 215 | { | ||
| 216 | OBJ_add_sigid(sigoid_srt[i][0], sigoid_srt[i][1], | ||
| 217 | sigoid_srt[i][2]); | ||
| 218 | } | ||
| 219 | #endif | ||
| 220 | |||
| 221 | for (i = 0; i < sizeof(sigoid_srt) / sizeof(nid_triple); i++) | ||
| 222 | { | ||
| 223 | n1 = sigoid_srt[i][0]; | ||
| 224 | rv = OBJ_find_sigid_algs(n1, &n2, &n3); | ||
| 225 | printf("Forward: %d, %s %s %s\n", rv, | ||
| 226 | OBJ_nid2ln(n1), OBJ_nid2ln(n2), OBJ_nid2ln(n3)); | ||
| 227 | n1=0; | ||
| 228 | rv = OBJ_find_sigid_by_algs(&n1, n2, n3); | ||
| 229 | printf("Reverse: %d, %s %s %s\n", rv, | ||
| 230 | OBJ_nid2ln(n1), OBJ_nid2ln(n2), OBJ_nid2ln(n3)); | ||
| 231 | } | ||
| 232 | } | ||
| 233 | |||
| 234 | #endif | ||
diff --git a/src/lib/libcrypto/objects/obj_xref.h b/src/lib/libcrypto/objects/obj_xref.h new file mode 100644 index 0000000000..e23938c296 --- /dev/null +++ b/src/lib/libcrypto/objects/obj_xref.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* AUTOGENERATED BY objxref.pl, DO NOT EDIT */ | ||
| 2 | |||
| 3 | typedef struct | ||
| 4 | { | ||
| 5 | int sign_id; | ||
| 6 | int hash_id; | ||
| 7 | int pkey_id; | ||
| 8 | } nid_triple; | ||
| 9 | |||
| 10 | static const nid_triple sigoid_srt[] = | ||
| 11 | { | ||
| 12 | {NID_md2WithRSAEncryption, NID_md2, NID_rsaEncryption}, | ||
| 13 | {NID_md5WithRSAEncryption, NID_md5, NID_rsaEncryption}, | ||
| 14 | {NID_shaWithRSAEncryption, NID_sha, NID_rsaEncryption}, | ||
| 15 | {NID_sha1WithRSAEncryption, NID_sha1, NID_rsaEncryption}, | ||
| 16 | {NID_dsaWithSHA, NID_sha, NID_dsa}, | ||
| 17 | {NID_dsaWithSHA1_2, NID_sha1, NID_dsa_2}, | ||
| 18 | {NID_mdc2WithRSA, NID_mdc2, NID_rsaEncryption}, | ||
| 19 | {NID_md5WithRSA, NID_md5, NID_rsa}, | ||
| 20 | {NID_dsaWithSHA1, NID_sha1, NID_dsa}, | ||
| 21 | {NID_sha1WithRSA, NID_sha1, NID_rsa}, | ||
| 22 | {NID_ripemd160WithRSA, NID_ripemd160, NID_rsaEncryption}, | ||
| 23 | {NID_md4WithRSAEncryption, NID_md4, NID_rsaEncryption}, | ||
| 24 | {NID_ecdsa_with_SHA1, NID_sha1, NID_X9_62_id_ecPublicKey}, | ||
| 25 | {NID_sha256WithRSAEncryption, NID_sha256, NID_rsaEncryption}, | ||
| 26 | {NID_sha384WithRSAEncryption, NID_sha384, NID_rsaEncryption}, | ||
| 27 | {NID_sha512WithRSAEncryption, NID_sha512, NID_rsaEncryption}, | ||
| 28 | {NID_sha224WithRSAEncryption, NID_sha224, NID_rsaEncryption}, | ||
| 29 | {NID_ecdsa_with_Recommended, NID_undef, NID_X9_62_id_ecPublicKey}, | ||
| 30 | {NID_ecdsa_with_Specified, NID_undef, NID_X9_62_id_ecPublicKey}, | ||
| 31 | {NID_ecdsa_with_SHA224, NID_sha224, NID_X9_62_id_ecPublicKey}, | ||
| 32 | {NID_ecdsa_with_SHA256, NID_sha256, NID_X9_62_id_ecPublicKey}, | ||
| 33 | {NID_ecdsa_with_SHA384, NID_sha384, NID_X9_62_id_ecPublicKey}, | ||
| 34 | {NID_ecdsa_with_SHA512, NID_sha512, NID_X9_62_id_ecPublicKey}, | ||
| 35 | {NID_dsa_with_SHA224, NID_sha224, NID_dsa}, | ||
| 36 | {NID_dsa_with_SHA256, NID_sha256, NID_dsa}, | ||
| 37 | {NID_id_GostR3411_94_with_GostR3410_2001, NID_id_GostR3411_94, NID_id_GostR3410_2001}, | ||
| 38 | {NID_id_GostR3411_94_with_GostR3410_94, NID_id_GostR3411_94, NID_id_GostR3410_94}, | ||
| 39 | {NID_id_GostR3411_94_with_GostR3410_94_cc, NID_id_GostR3411_94, NID_id_GostR3410_94_cc}, | ||
| 40 | {NID_id_GostR3411_94_with_GostR3410_2001_cc, NID_id_GostR3411_94, NID_id_GostR3410_2001_cc}, | ||
| 41 | {NID_rsassaPss, NID_undef, NID_rsaEncryption}, | ||
| 42 | }; | ||
| 43 | |||
| 44 | static const nid_triple * const sigoid_srt_xref[] = | ||
| 45 | { | ||
| 46 | &sigoid_srt[29], | ||
| 47 | &sigoid_srt[17], | ||
| 48 | &sigoid_srt[18], | ||
| 49 | &sigoid_srt[0], | ||
| 50 | &sigoid_srt[1], | ||
| 51 | &sigoid_srt[7], | ||
| 52 | &sigoid_srt[2], | ||
| 53 | &sigoid_srt[4], | ||
| 54 | &sigoid_srt[3], | ||
| 55 | &sigoid_srt[9], | ||
| 56 | &sigoid_srt[5], | ||
| 57 | &sigoid_srt[8], | ||
| 58 | &sigoid_srt[12], | ||
| 59 | &sigoid_srt[6], | ||
| 60 | &sigoid_srt[10], | ||
| 61 | &sigoid_srt[11], | ||
| 62 | &sigoid_srt[13], | ||
| 63 | &sigoid_srt[24], | ||
| 64 | &sigoid_srt[20], | ||
| 65 | &sigoid_srt[14], | ||
| 66 | &sigoid_srt[21], | ||
| 67 | &sigoid_srt[15], | ||
| 68 | &sigoid_srt[22], | ||
| 69 | &sigoid_srt[16], | ||
| 70 | &sigoid_srt[23], | ||
| 71 | &sigoid_srt[19], | ||
| 72 | &sigoid_srt[25], | ||
| 73 | &sigoid_srt[26], | ||
| 74 | &sigoid_srt[27], | ||
| 75 | &sigoid_srt[28], | ||
| 76 | }; | ||
| 77 | |||
diff --git a/src/lib/libcrypto/objects/obj_xref.txt b/src/lib/libcrypto/objects/obj_xref.txt new file mode 100644 index 0000000000..cb917182ee --- /dev/null +++ b/src/lib/libcrypto/objects/obj_xref.txt | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | # OID cross reference table. | ||
| 2 | # Links signatures OIDs to their corresponding public key algorithms | ||
| 3 | # and digests. | ||
| 4 | |||
| 5 | md2WithRSAEncryption md2 rsaEncryption | ||
| 6 | md5WithRSAEncryption md5 rsaEncryption | ||
| 7 | shaWithRSAEncryption sha rsaEncryption | ||
| 8 | sha1WithRSAEncryption sha1 rsaEncryption | ||
| 9 | md4WithRSAEncryption md4 rsaEncryption | ||
| 10 | sha256WithRSAEncryption sha256 rsaEncryption | ||
| 11 | sha384WithRSAEncryption sha384 rsaEncryption | ||
| 12 | sha512WithRSAEncryption sha512 rsaEncryption | ||
| 13 | sha224WithRSAEncryption sha224 rsaEncryption | ||
| 14 | mdc2WithRSA mdc2 rsaEncryption | ||
| 15 | ripemd160WithRSA ripemd160 rsaEncryption | ||
| 16 | # For PSS the digest algorithm can vary and depends on the included | ||
| 17 | # AlgorithmIdentifier. The digest "undef" indicates the public key | ||
| 18 | # method should handle this explicitly. | ||
| 19 | rsassaPss undef rsaEncryption | ||
| 20 | |||
| 21 | # Alternative deprecated OIDs. By using the older "rsa" OID this | ||
| 22 | # type will be recognized by not normally used. | ||
| 23 | |||
| 24 | md5WithRSA md5 rsa | ||
| 25 | sha1WithRSA sha1 rsa | ||
| 26 | |||
| 27 | dsaWithSHA sha dsa | ||
| 28 | dsaWithSHA1 sha1 dsa | ||
| 29 | |||
| 30 | dsaWithSHA1_2 sha1 dsa_2 | ||
| 31 | |||
| 32 | ecdsa_with_SHA1 sha1 X9_62_id_ecPublicKey | ||
| 33 | ecdsa_with_SHA224 sha224 X9_62_id_ecPublicKey | ||
| 34 | ecdsa_with_SHA256 sha256 X9_62_id_ecPublicKey | ||
| 35 | ecdsa_with_SHA384 sha384 X9_62_id_ecPublicKey | ||
| 36 | ecdsa_with_SHA512 sha512 X9_62_id_ecPublicKey | ||
| 37 | ecdsa_with_Recommended undef X9_62_id_ecPublicKey | ||
| 38 | ecdsa_with_Specified undef X9_62_id_ecPublicKey | ||
| 39 | |||
| 40 | dsa_with_SHA224 sha224 dsa | ||
| 41 | dsa_with_SHA256 sha256 dsa | ||
| 42 | |||
| 43 | id_GostR3411_94_with_GostR3410_2001 id_GostR3411_94 id_GostR3410_2001 | ||
| 44 | id_GostR3411_94_with_GostR3410_94 id_GostR3411_94 id_GostR3410_94 | ||
| 45 | id_GostR3411_94_with_GostR3410_94_cc id_GostR3411_94 id_GostR3410_94_cc | ||
| 46 | id_GostR3411_94_with_GostR3410_2001_cc id_GostR3411_94 id_GostR3410_2001_cc | ||
diff --git a/src/lib/libcrypto/objects/objects.README b/src/lib/libcrypto/objects/objects.README new file mode 100644 index 0000000000..4d745508d8 --- /dev/null +++ b/src/lib/libcrypto/objects/objects.README | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | objects.txt syntax | ||
| 2 | ------------------ | ||
| 3 | |||
| 4 | To cover all the naming hacks that were previously in objects.h needed some | ||
| 5 | kind of hacks in objects.txt. | ||
| 6 | |||
| 7 | The basic syntax for adding an object is as follows: | ||
| 8 | |||
| 9 | 1 2 3 4 : shortName : Long Name | ||
| 10 | |||
| 11 | If the long name doesn't contain spaces, or no short name | ||
| 12 | exists, the long name is used as basis for the base name | ||
| 13 | in C. Otherwise, the short name is used. | ||
| 14 | |||
| 15 | The base name (let's call it 'base') will then be used to | ||
| 16 | create the C macros SN_base, LN_base, NID_base and OBJ_base. | ||
| 17 | |||
| 18 | Note that if the base name contains spaces, dashes or periods, | ||
| 19 | those will be converte to underscore. | ||
| 20 | |||
| 21 | Then there are some extra commands: | ||
| 22 | |||
| 23 | !Alias foo 1 2 3 4 | ||
| 24 | |||
| 25 | This juts makes a name foo for an OID. The C macro | ||
| 26 | OBJ_foo will be created as a result. | ||
| 27 | |||
| 28 | !Cname foo | ||
| 29 | |||
| 30 | This makes sure that the name foo will be used as base name | ||
| 31 | in C. | ||
| 32 | |||
| 33 | !module foo | ||
| 34 | 1 2 3 4 : shortName : Long Name | ||
| 35 | !global | ||
| 36 | |||
| 37 | The !module command was meant to define a kind of modularity. | ||
| 38 | What it does is to make sure the module name is prepended | ||
| 39 | to the base name. !global turns this off. This construction | ||
| 40 | is not recursive. | ||
| 41 | |||
| 42 | Lines starting with # are treated as comments, as well as any line starting | ||
| 43 | with ! and not matching the commands above. | ||
| 44 | |||
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h new file mode 100644 index 0000000000..bd0ee52feb --- /dev/null +++ b/src/lib/libcrypto/objects/objects.h | |||
| @@ -0,0 +1,1138 @@ | |||
| 1 | /* crypto/objects/objects.h */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_OBJECTS_H | ||
| 60 | #define HEADER_OBJECTS_H | ||
| 61 | |||
| 62 | #define USE_OBJ_MAC | ||
| 63 | |||
| 64 | #ifdef USE_OBJ_MAC | ||
| 65 | #include <openssl/obj_mac.h> | ||
| 66 | #else | ||
| 67 | #define SN_undef "UNDEF" | ||
| 68 | #define LN_undef "undefined" | ||
| 69 | #define NID_undef 0 | ||
| 70 | #define OBJ_undef 0L | ||
| 71 | |||
| 72 | #define SN_Algorithm "Algorithm" | ||
| 73 | #define LN_algorithm "algorithm" | ||
| 74 | #define NID_algorithm 38 | ||
| 75 | #define OBJ_algorithm 1L,3L,14L,3L,2L | ||
| 76 | |||
| 77 | #define LN_rsadsi "rsadsi" | ||
| 78 | #define NID_rsadsi 1 | ||
| 79 | #define OBJ_rsadsi 1L,2L,840L,113549L | ||
| 80 | |||
| 81 | #define LN_pkcs "pkcs" | ||
| 82 | #define NID_pkcs 2 | ||
| 83 | #define OBJ_pkcs OBJ_rsadsi,1L | ||
| 84 | |||
| 85 | #define SN_md2 "MD2" | ||
| 86 | #define LN_md2 "md2" | ||
| 87 | #define NID_md2 3 | ||
| 88 | #define OBJ_md2 OBJ_rsadsi,2L,2L | ||
| 89 | |||
| 90 | #define SN_md5 "MD5" | ||
| 91 | #define LN_md5 "md5" | ||
| 92 | #define NID_md5 4 | ||
| 93 | #define OBJ_md5 OBJ_rsadsi,2L,5L | ||
| 94 | |||
| 95 | #define SN_rc4 "RC4" | ||
| 96 | #define LN_rc4 "rc4" | ||
| 97 | #define NID_rc4 5 | ||
| 98 | #define OBJ_rc4 OBJ_rsadsi,3L,4L | ||
| 99 | |||
| 100 | #define LN_rsaEncryption "rsaEncryption" | ||
| 101 | #define NID_rsaEncryption 6 | ||
| 102 | #define OBJ_rsaEncryption OBJ_pkcs,1L,1L | ||
| 103 | |||
| 104 | #define SN_md2WithRSAEncryption "RSA-MD2" | ||
| 105 | #define LN_md2WithRSAEncryption "md2WithRSAEncryption" | ||
| 106 | #define NID_md2WithRSAEncryption 7 | ||
| 107 | #define OBJ_md2WithRSAEncryption OBJ_pkcs,1L,2L | ||
| 108 | |||
| 109 | #define SN_md5WithRSAEncryption "RSA-MD5" | ||
| 110 | #define LN_md5WithRSAEncryption "md5WithRSAEncryption" | ||
| 111 | #define NID_md5WithRSAEncryption 8 | ||
| 112 | #define OBJ_md5WithRSAEncryption OBJ_pkcs,1L,4L | ||
| 113 | |||
| 114 | #define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" | ||
| 115 | #define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" | ||
| 116 | #define NID_pbeWithMD2AndDES_CBC 9 | ||
| 117 | #define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs,5L,1L | ||
| 118 | |||
| 119 | #define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" | ||
| 120 | #define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" | ||
| 121 | #define NID_pbeWithMD5AndDES_CBC 10 | ||
| 122 | #define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs,5L,3L | ||
| 123 | |||
| 124 | #define LN_X500 "X500" | ||
| 125 | #define NID_X500 11 | ||
| 126 | #define OBJ_X500 2L,5L | ||
| 127 | |||
| 128 | #define LN_X509 "X509" | ||
| 129 | #define NID_X509 12 | ||
| 130 | #define OBJ_X509 OBJ_X500,4L | ||
| 131 | |||
| 132 | #define SN_commonName "CN" | ||
| 133 | #define LN_commonName "commonName" | ||
| 134 | #define NID_commonName 13 | ||
| 135 | #define OBJ_commonName OBJ_X509,3L | ||
| 136 | |||
| 137 | #define SN_countryName "C" | ||
| 138 | #define LN_countryName "countryName" | ||
| 139 | #define NID_countryName 14 | ||
| 140 | #define OBJ_countryName OBJ_X509,6L | ||
| 141 | |||
| 142 | #define SN_localityName "L" | ||
| 143 | #define LN_localityName "localityName" | ||
| 144 | #define NID_localityName 15 | ||
| 145 | #define OBJ_localityName OBJ_X509,7L | ||
| 146 | |||
| 147 | /* Postal Address? PA */ | ||
| 148 | |||
| 149 | /* should be "ST" (rfc1327) but MS uses 'S' */ | ||
| 150 | #define SN_stateOrProvinceName "ST" | ||
| 151 | #define LN_stateOrProvinceName "stateOrProvinceName" | ||
| 152 | #define NID_stateOrProvinceName 16 | ||
| 153 | #define OBJ_stateOrProvinceName OBJ_X509,8L | ||
| 154 | |||
| 155 | #define SN_organizationName "O" | ||
| 156 | #define LN_organizationName "organizationName" | ||
| 157 | #define NID_organizationName 17 | ||
| 158 | #define OBJ_organizationName OBJ_X509,10L | ||
| 159 | |||
| 160 | #define SN_organizationalUnitName "OU" | ||
| 161 | #define LN_organizationalUnitName "organizationalUnitName" | ||
| 162 | #define NID_organizationalUnitName 18 | ||
| 163 | #define OBJ_organizationalUnitName OBJ_X509,11L | ||
| 164 | |||
| 165 | #define SN_rsa "RSA" | ||
| 166 | #define LN_rsa "rsa" | ||
| 167 | #define NID_rsa 19 | ||
| 168 | #define OBJ_rsa OBJ_X500,8L,1L,1L | ||
| 169 | |||
| 170 | #define LN_pkcs7 "pkcs7" | ||
| 171 | #define NID_pkcs7 20 | ||
| 172 | #define OBJ_pkcs7 OBJ_pkcs,7L | ||
| 173 | |||
| 174 | #define LN_pkcs7_data "pkcs7-data" | ||
| 175 | #define NID_pkcs7_data 21 | ||
| 176 | #define OBJ_pkcs7_data OBJ_pkcs7,1L | ||
| 177 | |||
| 178 | #define LN_pkcs7_signed "pkcs7-signedData" | ||
| 179 | #define NID_pkcs7_signed 22 | ||
| 180 | #define OBJ_pkcs7_signed OBJ_pkcs7,2L | ||
| 181 | |||
| 182 | #define LN_pkcs7_enveloped "pkcs7-envelopedData" | ||
| 183 | #define NID_pkcs7_enveloped 23 | ||
| 184 | #define OBJ_pkcs7_enveloped OBJ_pkcs7,3L | ||
| 185 | |||
| 186 | #define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" | ||
| 187 | #define NID_pkcs7_signedAndEnveloped 24 | ||
| 188 | #define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L | ||
| 189 | |||
| 190 | #define LN_pkcs7_digest "pkcs7-digestData" | ||
| 191 | #define NID_pkcs7_digest 25 | ||
| 192 | #define OBJ_pkcs7_digest OBJ_pkcs7,5L | ||
| 193 | |||
| 194 | #define LN_pkcs7_encrypted "pkcs7-encryptedData" | ||
| 195 | #define NID_pkcs7_encrypted 26 | ||
| 196 | #define OBJ_pkcs7_encrypted OBJ_pkcs7,6L | ||
| 197 | |||
| 198 | #define LN_pkcs3 "pkcs3" | ||
| 199 | #define NID_pkcs3 27 | ||
| 200 | #define OBJ_pkcs3 OBJ_pkcs,3L | ||
| 201 | |||
| 202 | #define LN_dhKeyAgreement "dhKeyAgreement" | ||
| 203 | #define NID_dhKeyAgreement 28 | ||
| 204 | #define OBJ_dhKeyAgreement OBJ_pkcs3,1L | ||
| 205 | |||
| 206 | #define SN_des_ecb "DES-ECB" | ||
| 207 | #define LN_des_ecb "des-ecb" | ||
| 208 | #define NID_des_ecb 29 | ||
| 209 | #define OBJ_des_ecb OBJ_algorithm,6L | ||
| 210 | |||
| 211 | #define SN_des_cfb64 "DES-CFB" | ||
| 212 | #define LN_des_cfb64 "des-cfb" | ||
| 213 | #define NID_des_cfb64 30 | ||
| 214 | /* IV + num */ | ||
| 215 | #define OBJ_des_cfb64 OBJ_algorithm,9L | ||
| 216 | |||
| 217 | #define SN_des_cbc "DES-CBC" | ||
| 218 | #define LN_des_cbc "des-cbc" | ||
| 219 | #define NID_des_cbc 31 | ||
| 220 | /* IV */ | ||
| 221 | #define OBJ_des_cbc OBJ_algorithm,7L | ||
| 222 | |||
| 223 | #define SN_des_ede "DES-EDE" | ||
| 224 | #define LN_des_ede "des-ede" | ||
| 225 | #define NID_des_ede 32 | ||
| 226 | /* ?? */ | ||
| 227 | #define OBJ_des_ede OBJ_algorithm,17L | ||
| 228 | |||
| 229 | #define SN_des_ede3 "DES-EDE3" | ||
| 230 | #define LN_des_ede3 "des-ede3" | ||
| 231 | #define NID_des_ede3 33 | ||
| 232 | |||
| 233 | #define SN_idea_cbc "IDEA-CBC" | ||
| 234 | #define LN_idea_cbc "idea-cbc" | ||
| 235 | #define NID_idea_cbc 34 | ||
| 236 | #define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L | ||
| 237 | |||
| 238 | #define SN_idea_cfb64 "IDEA-CFB" | ||
| 239 | #define LN_idea_cfb64 "idea-cfb" | ||
| 240 | #define NID_idea_cfb64 35 | ||
| 241 | |||
| 242 | #define SN_idea_ecb "IDEA-ECB" | ||
| 243 | #define LN_idea_ecb "idea-ecb" | ||
| 244 | #define NID_idea_ecb 36 | ||
| 245 | |||
| 246 | #define SN_rc2_cbc "RC2-CBC" | ||
| 247 | #define LN_rc2_cbc "rc2-cbc" | ||
| 248 | #define NID_rc2_cbc 37 | ||
| 249 | #define OBJ_rc2_cbc OBJ_rsadsi,3L,2L | ||
| 250 | |||
| 251 | #define SN_rc2_ecb "RC2-ECB" | ||
| 252 | #define LN_rc2_ecb "rc2-ecb" | ||
| 253 | #define NID_rc2_ecb 38 | ||
| 254 | |||
| 255 | #define SN_rc2_cfb64 "RC2-CFB" | ||
| 256 | #define LN_rc2_cfb64 "rc2-cfb" | ||
| 257 | #define NID_rc2_cfb64 39 | ||
| 258 | |||
| 259 | #define SN_rc2_ofb64 "RC2-OFB" | ||
| 260 | #define LN_rc2_ofb64 "rc2-ofb" | ||
| 261 | #define NID_rc2_ofb64 40 | ||
| 262 | |||
| 263 | #define SN_sha "SHA" | ||
| 264 | #define LN_sha "sha" | ||
| 265 | #define NID_sha 41 | ||
| 266 | #define OBJ_sha OBJ_algorithm,18L | ||
| 267 | |||
| 268 | #define SN_shaWithRSAEncryption "RSA-SHA" | ||
| 269 | #define LN_shaWithRSAEncryption "shaWithRSAEncryption" | ||
| 270 | #define NID_shaWithRSAEncryption 42 | ||
| 271 | #define OBJ_shaWithRSAEncryption OBJ_algorithm,15L | ||
| 272 | |||
| 273 | #define SN_des_ede_cbc "DES-EDE-CBC" | ||
| 274 | #define LN_des_ede_cbc "des-ede-cbc" | ||
| 275 | #define NID_des_ede_cbc 43 | ||
| 276 | |||
| 277 | #define SN_des_ede3_cbc "DES-EDE3-CBC" | ||
| 278 | #define LN_des_ede3_cbc "des-ede3-cbc" | ||
| 279 | #define NID_des_ede3_cbc 44 | ||
| 280 | #define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L | ||
| 281 | |||
| 282 | #define SN_des_ofb64 "DES-OFB" | ||
| 283 | #define LN_des_ofb64 "des-ofb" | ||
| 284 | #define NID_des_ofb64 45 | ||
| 285 | #define OBJ_des_ofb64 OBJ_algorithm,8L | ||
| 286 | |||
| 287 | #define SN_idea_ofb64 "IDEA-OFB" | ||
| 288 | #define LN_idea_ofb64 "idea-ofb" | ||
| 289 | #define NID_idea_ofb64 46 | ||
| 290 | |||
| 291 | #define LN_pkcs9 "pkcs9" | ||
| 292 | #define NID_pkcs9 47 | ||
| 293 | #define OBJ_pkcs9 OBJ_pkcs,9L | ||
| 294 | |||
| 295 | #define SN_pkcs9_emailAddress "Email" | ||
| 296 | #define LN_pkcs9_emailAddress "emailAddress" | ||
| 297 | #define NID_pkcs9_emailAddress 48 | ||
| 298 | #define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L | ||
| 299 | |||
| 300 | #define LN_pkcs9_unstructuredName "unstructuredName" | ||
| 301 | #define NID_pkcs9_unstructuredName 49 | ||
| 302 | #define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L | ||
| 303 | |||
| 304 | #define LN_pkcs9_contentType "contentType" | ||
| 305 | #define NID_pkcs9_contentType 50 | ||
| 306 | #define OBJ_pkcs9_contentType OBJ_pkcs9,3L | ||
| 307 | |||
| 308 | #define LN_pkcs9_messageDigest "messageDigest" | ||
| 309 | #define NID_pkcs9_messageDigest 51 | ||
| 310 | #define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L | ||
| 311 | |||
| 312 | #define LN_pkcs9_signingTime "signingTime" | ||
| 313 | #define NID_pkcs9_signingTime 52 | ||
| 314 | #define OBJ_pkcs9_signingTime OBJ_pkcs9,5L | ||
| 315 | |||
| 316 | #define LN_pkcs9_countersignature "countersignature" | ||
| 317 | #define NID_pkcs9_countersignature 53 | ||
| 318 | #define OBJ_pkcs9_countersignature OBJ_pkcs9,6L | ||
| 319 | |||
| 320 | #define LN_pkcs9_challengePassword "challengePassword" | ||
| 321 | #define NID_pkcs9_challengePassword 54 | ||
| 322 | #define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L | ||
| 323 | |||
| 324 | #define LN_pkcs9_unstructuredAddress "unstructuredAddress" | ||
| 325 | #define NID_pkcs9_unstructuredAddress 55 | ||
| 326 | #define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L | ||
| 327 | |||
| 328 | #define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" | ||
| 329 | #define NID_pkcs9_extCertAttributes 56 | ||
| 330 | #define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L | ||
| 331 | |||
| 332 | #define SN_netscape "Netscape" | ||
| 333 | #define LN_netscape "Netscape Communications Corp." | ||
| 334 | #define NID_netscape 57 | ||
| 335 | #define OBJ_netscape 2L,16L,840L,1L,113730L | ||
| 336 | |||
| 337 | #define SN_netscape_cert_extension "nsCertExt" | ||
| 338 | #define LN_netscape_cert_extension "Netscape Certificate Extension" | ||
| 339 | #define NID_netscape_cert_extension 58 | ||
| 340 | #define OBJ_netscape_cert_extension OBJ_netscape,1L | ||
| 341 | |||
| 342 | #define SN_netscape_data_type "nsDataType" | ||
| 343 | #define LN_netscape_data_type "Netscape Data Type" | ||
| 344 | #define NID_netscape_data_type 59 | ||
| 345 | #define OBJ_netscape_data_type OBJ_netscape,2L | ||
| 346 | |||
| 347 | #define SN_des_ede_cfb64 "DES-EDE-CFB" | ||
| 348 | #define LN_des_ede_cfb64 "des-ede-cfb" | ||
| 349 | #define NID_des_ede_cfb64 60 | ||
| 350 | |||
| 351 | #define SN_des_ede3_cfb64 "DES-EDE3-CFB" | ||
| 352 | #define LN_des_ede3_cfb64 "des-ede3-cfb" | ||
| 353 | #define NID_des_ede3_cfb64 61 | ||
| 354 | |||
| 355 | #define SN_des_ede_ofb64 "DES-EDE-OFB" | ||
| 356 | #define LN_des_ede_ofb64 "des-ede-ofb" | ||
| 357 | #define NID_des_ede_ofb64 62 | ||
| 358 | |||
| 359 | #define SN_des_ede3_ofb64 "DES-EDE3-OFB" | ||
| 360 | #define LN_des_ede3_ofb64 "des-ede3-ofb" | ||
| 361 | #define NID_des_ede3_ofb64 63 | ||
| 362 | |||
| 363 | /* I'm not sure about the object ID */ | ||
| 364 | #define SN_sha1 "SHA1" | ||
| 365 | #define LN_sha1 "sha1" | ||
| 366 | #define NID_sha1 64 | ||
| 367 | #define OBJ_sha1 OBJ_algorithm,26L | ||
| 368 | /* 28 Jun 1996 - eay */ | ||
| 369 | /* #define OBJ_sha1 1L,3L,14L,2L,26L,05L <- wrong */ | ||
| 370 | |||
| 371 | #define SN_sha1WithRSAEncryption "RSA-SHA1" | ||
| 372 | #define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" | ||
| 373 | #define NID_sha1WithRSAEncryption 65 | ||
| 374 | #define OBJ_sha1WithRSAEncryption OBJ_pkcs,1L,5L | ||
| 375 | |||
| 376 | #define SN_dsaWithSHA "DSA-SHA" | ||
| 377 | #define LN_dsaWithSHA "dsaWithSHA" | ||
| 378 | #define NID_dsaWithSHA 66 | ||
| 379 | #define OBJ_dsaWithSHA OBJ_algorithm,13L | ||
| 380 | |||
| 381 | #define SN_dsa_2 "DSA-old" | ||
| 382 | #define LN_dsa_2 "dsaEncryption-old" | ||
| 383 | #define NID_dsa_2 67 | ||
| 384 | #define OBJ_dsa_2 OBJ_algorithm,12L | ||
| 385 | |||
| 386 | /* proposed by microsoft to RSA */ | ||
| 387 | #define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" | ||
| 388 | #define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" | ||
| 389 | #define NID_pbeWithSHA1AndRC2_CBC 68 | ||
| 390 | #define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L | ||
| 391 | |||
| 392 | /* proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now | ||
| 393 | * defined explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something | ||
| 394 | * completely different. | ||
| 395 | */ | ||
| 396 | #define LN_id_pbkdf2 "PBKDF2" | ||
| 397 | #define NID_id_pbkdf2 69 | ||
| 398 | #define OBJ_id_pbkdf2 OBJ_pkcs,5L,12L | ||
| 399 | |||
| 400 | #define SN_dsaWithSHA1_2 "DSA-SHA1-old" | ||
| 401 | #define LN_dsaWithSHA1_2 "dsaWithSHA1-old" | ||
| 402 | #define NID_dsaWithSHA1_2 70 | ||
| 403 | /* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */ | ||
| 404 | #define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L | ||
| 405 | |||
| 406 | #define SN_netscape_cert_type "nsCertType" | ||
| 407 | #define LN_netscape_cert_type "Netscape Cert Type" | ||
| 408 | #define NID_netscape_cert_type 71 | ||
| 409 | #define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L | ||
| 410 | |||
| 411 | #define SN_netscape_base_url "nsBaseUrl" | ||
| 412 | #define LN_netscape_base_url "Netscape Base Url" | ||
| 413 | #define NID_netscape_base_url 72 | ||
| 414 | #define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L | ||
| 415 | |||
| 416 | #define SN_netscape_revocation_url "nsRevocationUrl" | ||
| 417 | #define LN_netscape_revocation_url "Netscape Revocation Url" | ||
| 418 | #define NID_netscape_revocation_url 73 | ||
| 419 | #define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L | ||
| 420 | |||
| 421 | #define SN_netscape_ca_revocation_url "nsCaRevocationUrl" | ||
| 422 | #define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" | ||
| 423 | #define NID_netscape_ca_revocation_url 74 | ||
| 424 | #define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L | ||
| 425 | |||
| 426 | #define SN_netscape_renewal_url "nsRenewalUrl" | ||
| 427 | #define LN_netscape_renewal_url "Netscape Renewal Url" | ||
| 428 | #define NID_netscape_renewal_url 75 | ||
| 429 | #define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L | ||
| 430 | |||
| 431 | #define SN_netscape_ca_policy_url "nsCaPolicyUrl" | ||
| 432 | #define LN_netscape_ca_policy_url "Netscape CA Policy Url" | ||
| 433 | #define NID_netscape_ca_policy_url 76 | ||
| 434 | #define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L | ||
| 435 | |||
| 436 | #define SN_netscape_ssl_server_name "nsSslServerName" | ||
| 437 | #define LN_netscape_ssl_server_name "Netscape SSL Server Name" | ||
| 438 | #define NID_netscape_ssl_server_name 77 | ||
| 439 | #define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L | ||
| 440 | |||
| 441 | #define SN_netscape_comment "nsComment" | ||
| 442 | #define LN_netscape_comment "Netscape Comment" | ||
| 443 | #define NID_netscape_comment 78 | ||
| 444 | #define OBJ_netscape_comment OBJ_netscape_cert_extension,13L | ||
| 445 | |||
| 446 | #define SN_netscape_cert_sequence "nsCertSequence" | ||
| 447 | #define LN_netscape_cert_sequence "Netscape Certificate Sequence" | ||
| 448 | #define NID_netscape_cert_sequence 79 | ||
| 449 | #define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L | ||
| 450 | |||
| 451 | #define SN_desx_cbc "DESX-CBC" | ||
| 452 | #define LN_desx_cbc "desx-cbc" | ||
| 453 | #define NID_desx_cbc 80 | ||
| 454 | |||
| 455 | #define SN_id_ce "id-ce" | ||
| 456 | #define NID_id_ce 81 | ||
| 457 | #define OBJ_id_ce 2L,5L,29L | ||
| 458 | |||
| 459 | #define SN_subject_key_identifier "subjectKeyIdentifier" | ||
| 460 | #define LN_subject_key_identifier "X509v3 Subject Key Identifier" | ||
| 461 | #define NID_subject_key_identifier 82 | ||
| 462 | #define OBJ_subject_key_identifier OBJ_id_ce,14L | ||
| 463 | |||
| 464 | #define SN_key_usage "keyUsage" | ||
| 465 | #define LN_key_usage "X509v3 Key Usage" | ||
| 466 | #define NID_key_usage 83 | ||
| 467 | #define OBJ_key_usage OBJ_id_ce,15L | ||
| 468 | |||
| 469 | #define SN_private_key_usage_period "privateKeyUsagePeriod" | ||
| 470 | #define LN_private_key_usage_period "X509v3 Private Key Usage Period" | ||
| 471 | #define NID_private_key_usage_period 84 | ||
| 472 | #define OBJ_private_key_usage_period OBJ_id_ce,16L | ||
| 473 | |||
| 474 | #define SN_subject_alt_name "subjectAltName" | ||
| 475 | #define LN_subject_alt_name "X509v3 Subject Alternative Name" | ||
| 476 | #define NID_subject_alt_name 85 | ||
| 477 | #define OBJ_subject_alt_name OBJ_id_ce,17L | ||
| 478 | |||
| 479 | #define SN_issuer_alt_name "issuerAltName" | ||
| 480 | #define LN_issuer_alt_name "X509v3 Issuer Alternative Name" | ||
| 481 | #define NID_issuer_alt_name 86 | ||
| 482 | #define OBJ_issuer_alt_name OBJ_id_ce,18L | ||
| 483 | |||
| 484 | #define SN_basic_constraints "basicConstraints" | ||
| 485 | #define LN_basic_constraints "X509v3 Basic Constraints" | ||
| 486 | #define NID_basic_constraints 87 | ||
| 487 | #define OBJ_basic_constraints OBJ_id_ce,19L | ||
| 488 | |||
| 489 | #define SN_crl_number "crlNumber" | ||
| 490 | #define LN_crl_number "X509v3 CRL Number" | ||
| 491 | #define NID_crl_number 88 | ||
| 492 | #define OBJ_crl_number OBJ_id_ce,20L | ||
| 493 | |||
| 494 | #define SN_certificate_policies "certificatePolicies" | ||
| 495 | #define LN_certificate_policies "X509v3 Certificate Policies" | ||
| 496 | #define NID_certificate_policies 89 | ||
| 497 | #define OBJ_certificate_policies OBJ_id_ce,32L | ||
| 498 | |||
| 499 | #define SN_authority_key_identifier "authorityKeyIdentifier" | ||
| 500 | #define LN_authority_key_identifier "X509v3 Authority Key Identifier" | ||
| 501 | #define NID_authority_key_identifier 90 | ||
| 502 | #define OBJ_authority_key_identifier OBJ_id_ce,35L | ||
| 503 | |||
| 504 | #define SN_bf_cbc "BF-CBC" | ||
| 505 | #define LN_bf_cbc "bf-cbc" | ||
| 506 | #define NID_bf_cbc 91 | ||
| 507 | #define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L | ||
| 508 | |||
| 509 | #define SN_bf_ecb "BF-ECB" | ||
| 510 | #define LN_bf_ecb "bf-ecb" | ||
| 511 | #define NID_bf_ecb 92 | ||
| 512 | |||
| 513 | #define SN_bf_cfb64 "BF-CFB" | ||
| 514 | #define LN_bf_cfb64 "bf-cfb" | ||
| 515 | #define NID_bf_cfb64 93 | ||
| 516 | |||
| 517 | #define SN_bf_ofb64 "BF-OFB" | ||
| 518 | #define LN_bf_ofb64 "bf-ofb" | ||
| 519 | #define NID_bf_ofb64 94 | ||
| 520 | |||
| 521 | #define SN_mdc2 "MDC2" | ||
| 522 | #define LN_mdc2 "mdc2" | ||
| 523 | #define NID_mdc2 95 | ||
| 524 | #define OBJ_mdc2 2L,5L,8L,3L,101L | ||
| 525 | /* An alternative? 1L,3L,14L,3L,2L,19L */ | ||
| 526 | |||
| 527 | #define SN_mdc2WithRSA "RSA-MDC2" | ||
| 528 | #define LN_mdc2WithRSA "mdc2withRSA" | ||
| 529 | #define NID_mdc2WithRSA 96 | ||
| 530 | #define OBJ_mdc2WithRSA 2L,5L,8L,3L,100L | ||
| 531 | |||
| 532 | #define SN_rc4_40 "RC4-40" | ||
| 533 | #define LN_rc4_40 "rc4-40" | ||
| 534 | #define NID_rc4_40 97 | ||
| 535 | |||
| 536 | #define SN_rc2_40_cbc "RC2-40-CBC" | ||
| 537 | #define LN_rc2_40_cbc "rc2-40-cbc" | ||
| 538 | #define NID_rc2_40_cbc 98 | ||
| 539 | |||
| 540 | #define SN_givenName "G" | ||
| 541 | #define LN_givenName "givenName" | ||
| 542 | #define NID_givenName 99 | ||
| 543 | #define OBJ_givenName OBJ_X509,42L | ||
| 544 | |||
| 545 | #define SN_surname "S" | ||
| 546 | #define LN_surname "surname" | ||
| 547 | #define NID_surname 100 | ||
| 548 | #define OBJ_surname OBJ_X509,4L | ||
| 549 | |||
| 550 | #define SN_initials "I" | ||
| 551 | #define LN_initials "initials" | ||
| 552 | #define NID_initials 101 | ||
| 553 | #define OBJ_initials OBJ_X509,43L | ||
| 554 | |||
| 555 | #define SN_uniqueIdentifier "UID" | ||
| 556 | #define LN_uniqueIdentifier "uniqueIdentifier" | ||
| 557 | #define NID_uniqueIdentifier 102 | ||
| 558 | #define OBJ_uniqueIdentifier OBJ_X509,45L | ||
| 559 | |||
| 560 | #define SN_crl_distribution_points "crlDistributionPoints" | ||
| 561 | #define LN_crl_distribution_points "X509v3 CRL Distribution Points" | ||
| 562 | #define NID_crl_distribution_points 103 | ||
| 563 | #define OBJ_crl_distribution_points OBJ_id_ce,31L | ||
| 564 | |||
| 565 | #define SN_md5WithRSA "RSA-NP-MD5" | ||
| 566 | #define LN_md5WithRSA "md5WithRSA" | ||
| 567 | #define NID_md5WithRSA 104 | ||
| 568 | #define OBJ_md5WithRSA OBJ_algorithm,3L | ||
| 569 | |||
| 570 | #define SN_serialNumber "SN" | ||
| 571 | #define LN_serialNumber "serialNumber" | ||
| 572 | #define NID_serialNumber 105 | ||
| 573 | #define OBJ_serialNumber OBJ_X509,5L | ||
| 574 | |||
| 575 | #define SN_title "T" | ||
| 576 | #define LN_title "title" | ||
| 577 | #define NID_title 106 | ||
| 578 | #define OBJ_title OBJ_X509,12L | ||
| 579 | |||
| 580 | #define SN_description "D" | ||
| 581 | #define LN_description "description" | ||
| 582 | #define NID_description 107 | ||
| 583 | #define OBJ_description OBJ_X509,13L | ||
| 584 | |||
| 585 | /* CAST5 is CAST-128, I'm just sticking with the documentation */ | ||
| 586 | #define SN_cast5_cbc "CAST5-CBC" | ||
| 587 | #define LN_cast5_cbc "cast5-cbc" | ||
| 588 | #define NID_cast5_cbc 108 | ||
| 589 | #define OBJ_cast5_cbc 1L,2L,840L,113533L,7L,66L,10L | ||
| 590 | |||
| 591 | #define SN_cast5_ecb "CAST5-ECB" | ||
| 592 | #define LN_cast5_ecb "cast5-ecb" | ||
| 593 | #define NID_cast5_ecb 109 | ||
| 594 | |||
| 595 | #define SN_cast5_cfb64 "CAST5-CFB" | ||
| 596 | #define LN_cast5_cfb64 "cast5-cfb" | ||
| 597 | #define NID_cast5_cfb64 110 | ||
| 598 | |||
| 599 | #define SN_cast5_ofb64 "CAST5-OFB" | ||
| 600 | #define LN_cast5_ofb64 "cast5-ofb" | ||
| 601 | #define NID_cast5_ofb64 111 | ||
| 602 | |||
| 603 | #define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" | ||
| 604 | #define NID_pbeWithMD5AndCast5_CBC 112 | ||
| 605 | #define OBJ_pbeWithMD5AndCast5_CBC 1L,2L,840L,113533L,7L,66L,12L | ||
| 606 | |||
| 607 | /* This is one sun will soon be using :-( | ||
| 608 | * id-dsa-with-sha1 ID ::= { | ||
| 609 | * iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 } | ||
| 610 | */ | ||
| 611 | #define SN_dsaWithSHA1 "DSA-SHA1" | ||
| 612 | #define LN_dsaWithSHA1 "dsaWithSHA1" | ||
| 613 | #define NID_dsaWithSHA1 113 | ||
| 614 | #define OBJ_dsaWithSHA1 1L,2L,840L,10040L,4L,3L | ||
| 615 | |||
| 616 | #define NID_md5_sha1 114 | ||
| 617 | #define SN_md5_sha1 "MD5-SHA1" | ||
| 618 | #define LN_md5_sha1 "md5-sha1" | ||
| 619 | |||
| 620 | #define SN_sha1WithRSA "RSA-SHA1-2" | ||
| 621 | #define LN_sha1WithRSA "sha1WithRSA" | ||
| 622 | #define NID_sha1WithRSA 115 | ||
| 623 | #define OBJ_sha1WithRSA OBJ_algorithm,29L | ||
| 624 | |||
| 625 | #define SN_dsa "DSA" | ||
| 626 | #define LN_dsa "dsaEncryption" | ||
| 627 | #define NID_dsa 116 | ||
| 628 | #define OBJ_dsa 1L,2L,840L,10040L,4L,1L | ||
| 629 | |||
| 630 | #define SN_ripemd160 "RIPEMD160" | ||
| 631 | #define LN_ripemd160 "ripemd160" | ||
| 632 | #define NID_ripemd160 117 | ||
| 633 | #define OBJ_ripemd160 1L,3L,36L,3L,2L,1L | ||
| 634 | |||
| 635 | /* The name should actually be rsaSignatureWithripemd160, but I'm going | ||
| 636 | * to continue using the convention I'm using with the other ciphers */ | ||
| 637 | #define SN_ripemd160WithRSA "RSA-RIPEMD160" | ||
| 638 | #define LN_ripemd160WithRSA "ripemd160WithRSA" | ||
| 639 | #define NID_ripemd160WithRSA 119 | ||
| 640 | #define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L | ||
| 641 | |||
| 642 | /* Taken from rfc2040 | ||
| 643 | * RC5_CBC_Parameters ::= SEQUENCE { | ||
| 644 | * version INTEGER (v1_0(16)), | ||
| 645 | * rounds INTEGER (8..127), | ||
| 646 | * blockSizeInBits INTEGER (64, 128), | ||
| 647 | * iv OCTET STRING OPTIONAL | ||
| 648 | * } | ||
| 649 | */ | ||
| 650 | #define SN_rc5_cbc "RC5-CBC" | ||
| 651 | #define LN_rc5_cbc "rc5-cbc" | ||
| 652 | #define NID_rc5_cbc 120 | ||
| 653 | #define OBJ_rc5_cbc OBJ_rsadsi,3L,8L | ||
| 654 | |||
| 655 | #define SN_rc5_ecb "RC5-ECB" | ||
| 656 | #define LN_rc5_ecb "rc5-ecb" | ||
| 657 | #define NID_rc5_ecb 121 | ||
| 658 | |||
| 659 | #define SN_rc5_cfb64 "RC5-CFB" | ||
| 660 | #define LN_rc5_cfb64 "rc5-cfb" | ||
| 661 | #define NID_rc5_cfb64 122 | ||
| 662 | |||
| 663 | #define SN_rc5_ofb64 "RC5-OFB" | ||
| 664 | #define LN_rc5_ofb64 "rc5-ofb" | ||
| 665 | #define NID_rc5_ofb64 123 | ||
| 666 | |||
| 667 | #define SN_rle_compression "RLE" | ||
| 668 | #define LN_rle_compression "run length compression" | ||
| 669 | #define NID_rle_compression 124 | ||
| 670 | #define OBJ_rle_compression 1L,1L,1L,1L,666L,1L | ||
| 671 | |||
| 672 | #define SN_zlib_compression "ZLIB" | ||
| 673 | #define LN_zlib_compression "zlib compression" | ||
| 674 | #define NID_zlib_compression 125 | ||
| 675 | #define OBJ_zlib_compression 1L,1L,1L,1L,666L,2L | ||
| 676 | |||
| 677 | #define SN_ext_key_usage "extendedKeyUsage" | ||
| 678 | #define LN_ext_key_usage "X509v3 Extended Key Usage" | ||
| 679 | #define NID_ext_key_usage 126 | ||
| 680 | #define OBJ_ext_key_usage OBJ_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 | ||
| 760 | |||
| 761 | #define SN_invalidity_date "invalidityDate" | ||
| 762 | #define LN_invalidity_date "Invalidity Date" | ||
| 763 | #define NID_invalidity_date 142 | ||
| 764 | #define OBJ_invalidity_date OBJ_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 | ||
| 775 | |||
| 776 | #define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" | ||
| 777 | #define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" | ||
| 778 | #define NID_pbe_WithSHA1And128BitRC4 144 | ||
| 779 | #define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids, 1L | ||
| 780 | |||
| 781 | #define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" | ||
| 782 | #define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" | ||
| 783 | #define NID_pbe_WithSHA1And40BitRC4 145 | ||
| 784 | #define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids, 2L | ||
| 785 | |||
| 786 | #define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" | ||
| 787 | #define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" | ||
| 788 | #define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 | ||
| 789 | #define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 3L | ||
| 790 | |||
| 791 | #define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" | ||
| 792 | #define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" | ||
| 793 | #define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 | ||
| 794 | #define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 4L | ||
| 795 | |||
| 796 | #define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" | ||
| 797 | #define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" | ||
| 798 | #define NID_pbe_WithSHA1And128BitRC2_CBC 148 | ||
| 799 | #define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids, 5L | ||
| 800 | |||
| 801 | #define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" | ||
| 802 | #define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" | ||
| 803 | #define NID_pbe_WithSHA1And40BitRC2_CBC 149 | ||
| 804 | #define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids, 6L | ||
| 805 | |||
| 806 | #define OBJ_pkcs12_Version1 OBJ_pkcs12, 10L | ||
| 807 | |||
| 808 | #define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1, 1L | ||
| 809 | |||
| 810 | #define LN_keyBag "keyBag" | ||
| 811 | #define NID_keyBag 150 | ||
| 812 | #define OBJ_keyBag OBJ_pkcs12_BagIds, 1L | ||
| 813 | |||
| 814 | #define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" | ||
| 815 | #define NID_pkcs8ShroudedKeyBag 151 | ||
| 816 | #define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds, 2L | ||
| 817 | |||
| 818 | #define LN_certBag "certBag" | ||
| 819 | #define NID_certBag 152 | ||
| 820 | #define OBJ_certBag OBJ_pkcs12_BagIds, 3L | ||
| 821 | |||
| 822 | #define LN_crlBag "crlBag" | ||
| 823 | #define NID_crlBag 153 | ||
| 824 | #define OBJ_crlBag OBJ_pkcs12_BagIds, 4L | ||
| 825 | |||
| 826 | #define LN_secretBag "secretBag" | ||
| 827 | #define NID_secretBag 154 | ||
| 828 | #define OBJ_secretBag OBJ_pkcs12_BagIds, 5L | ||
| 829 | |||
| 830 | #define LN_safeContentsBag "safeContentsBag" | ||
| 831 | #define NID_safeContentsBag 155 | ||
| 832 | #define OBJ_safeContentsBag OBJ_pkcs12_BagIds, 6L | ||
| 833 | |||
| 834 | #define LN_friendlyName "friendlyName" | ||
| 835 | #define NID_friendlyName 156 | ||
| 836 | #define OBJ_friendlyName OBJ_pkcs9, 20L | ||
| 837 | |||
| 838 | #define LN_localKeyID "localKeyID" | ||
| 839 | #define NID_localKeyID 157 | ||
| 840 | #define OBJ_localKeyID OBJ_pkcs9, 21L | ||
| 841 | |||
| 842 | #define OBJ_certTypes OBJ_pkcs9, 22L | ||
| 843 | |||
| 844 | #define LN_x509Certificate "x509Certificate" | ||
| 845 | #define NID_x509Certificate 158 | ||
| 846 | #define OBJ_x509Certificate OBJ_certTypes, 1L | ||
| 847 | |||
| 848 | #define LN_sdsiCertificate "sdsiCertificate" | ||
| 849 | #define NID_sdsiCertificate 159 | ||
| 850 | #define OBJ_sdsiCertificate OBJ_certTypes, 2L | ||
| 851 | |||
| 852 | #define OBJ_crlTypes OBJ_pkcs9, 23L | ||
| 853 | |||
| 854 | #define LN_x509Crl "x509Crl" | ||
| 855 | #define NID_x509Crl 160 | ||
| 856 | #define OBJ_x509Crl OBJ_crlTypes, 1L | ||
| 857 | |||
| 858 | /* PKCS#5 v2 OIDs */ | ||
| 859 | |||
| 860 | #define LN_pbes2 "PBES2" | ||
| 861 | #define NID_pbes2 161 | ||
| 862 | #define OBJ_pbes2 OBJ_pkcs,5L,13L | ||
| 863 | |||
| 864 | #define LN_pbmac1 "PBMAC1" | ||
| 865 | #define NID_pbmac1 162 | ||
| 866 | #define OBJ_pbmac1 OBJ_pkcs,5L,14L | ||
| 867 | |||
| 868 | #define LN_hmacWithSHA1 "hmacWithSHA1" | ||
| 869 | #define NID_hmacWithSHA1 163 | ||
| 870 | #define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L | ||
| 871 | |||
| 872 | /* Policy Qualifier Ids */ | ||
| 873 | |||
| 874 | #define LN_id_qt_cps "Policy Qualifier CPS" | ||
| 875 | #define SN_id_qt_cps "id-qt-cps" | ||
| 876 | #define NID_id_qt_cps 164 | ||
| 877 | #define OBJ_id_qt_cps OBJ_id_pkix,2L,1L | ||
| 878 | |||
| 879 | #define LN_id_qt_unotice "Policy Qualifier User Notice" | ||
| 880 | #define SN_id_qt_unotice "id-qt-unotice" | ||
| 881 | #define NID_id_qt_unotice 165 | ||
| 882 | #define OBJ_id_qt_unotice OBJ_id_pkix,2L,2L | ||
| 883 | |||
| 884 | #define SN_rc2_64_cbc "RC2-64-CBC" | ||
| 885 | #define LN_rc2_64_cbc "rc2-64-cbc" | ||
| 886 | #define NID_rc2_64_cbc 166 | ||
| 887 | |||
| 888 | #define SN_SMIMECapabilities "SMIME-CAPS" | ||
| 889 | #define LN_SMIMECapabilities "S/MIME Capabilities" | ||
| 890 | #define NID_SMIMECapabilities 167 | ||
| 891 | #define OBJ_SMIMECapabilities OBJ_pkcs9,15L | ||
| 892 | |||
| 893 | #define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" | ||
| 894 | #define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" | ||
| 895 | #define NID_pbeWithMD2AndRC2_CBC 168 | ||
| 896 | #define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs,5L,4L | ||
| 897 | |||
| 898 | #define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" | ||
| 899 | #define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" | ||
| 900 | #define NID_pbeWithMD5AndRC2_CBC 169 | ||
| 901 | #define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs,5L,6L | ||
| 902 | |||
| 903 | #define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" | ||
| 904 | #define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" | ||
| 905 | #define NID_pbeWithSHA1AndDES_CBC 170 | ||
| 906 | #define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs,5L,10L | ||
| 907 | |||
| 908 | /* Extension request OIDs */ | ||
| 909 | |||
| 910 | #define LN_ms_ext_req "Microsoft Extension Request" | ||
| 911 | #define SN_ms_ext_req "msExtReq" | ||
| 912 | #define NID_ms_ext_req 171 | ||
| 913 | #define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L | ||
| 914 | |||
| 915 | #define LN_ext_req "Extension Request" | ||
| 916 | #define SN_ext_req "extReq" | ||
| 917 | #define NID_ext_req 172 | ||
| 918 | #define OBJ_ext_req OBJ_pkcs9,14L | ||
| 919 | |||
| 920 | #define SN_name "name" | ||
| 921 | #define LN_name "name" | ||
| 922 | #define NID_name 173 | ||
| 923 | #define OBJ_name OBJ_X509,41L | ||
| 924 | |||
| 925 | #define SN_dnQualifier "dnQualifier" | ||
| 926 | #define LN_dnQualifier "dnQualifier" | ||
| 927 | #define NID_dnQualifier 174 | ||
| 928 | #define OBJ_dnQualifier OBJ_X509,46L | ||
| 929 | |||
| 930 | #define SN_id_pe "id-pe" | ||
| 931 | #define NID_id_pe 175 | ||
| 932 | #define OBJ_id_pe OBJ_id_pkix,1L | ||
| 933 | |||
| 934 | #define SN_id_ad "id-ad" | ||
| 935 | #define NID_id_ad 176 | ||
| 936 | #define OBJ_id_ad OBJ_id_pkix,48L | ||
| 937 | |||
| 938 | #define SN_info_access "authorityInfoAccess" | ||
| 939 | #define LN_info_access "Authority Information Access" | ||
| 940 | #define NID_info_access 177 | ||
| 941 | #define OBJ_info_access OBJ_id_pe,1L | ||
| 942 | |||
| 943 | #define SN_ad_OCSP "OCSP" | ||
| 944 | #define LN_ad_OCSP "OCSP" | ||
| 945 | #define NID_ad_OCSP 178 | ||
| 946 | #define OBJ_ad_OCSP OBJ_id_ad,1L | ||
| 947 | |||
| 948 | #define SN_ad_ca_issuers "caIssuers" | ||
| 949 | #define LN_ad_ca_issuers "CA Issuers" | ||
| 950 | #define NID_ad_ca_issuers 179 | ||
| 951 | #define OBJ_ad_ca_issuers OBJ_id_ad,2L | ||
| 952 | |||
| 953 | #define SN_OCSP_sign "OCSPSigning" | ||
| 954 | #define LN_OCSP_sign "OCSP Signing" | ||
| 955 | #define NID_OCSP_sign 180 | ||
| 956 | #define OBJ_OCSP_sign OBJ_id_kp,9L | ||
| 957 | #endif /* USE_OBJ_MAC */ | ||
| 958 | |||
| 959 | #include <openssl/bio.h> | ||
| 960 | #include <openssl/asn1.h> | ||
| 961 | |||
| 962 | #define OBJ_NAME_TYPE_UNDEF 0x00 | ||
| 963 | #define OBJ_NAME_TYPE_MD_METH 0x01 | ||
| 964 | #define OBJ_NAME_TYPE_CIPHER_METH 0x02 | ||
| 965 | #define OBJ_NAME_TYPE_PKEY_METH 0x03 | ||
| 966 | #define OBJ_NAME_TYPE_COMP_METH 0x04 | ||
| 967 | #define OBJ_NAME_TYPE_NUM 0x05 | ||
| 968 | |||
| 969 | #define OBJ_NAME_ALIAS 0x8000 | ||
| 970 | |||
| 971 | #define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01 | ||
| 972 | #define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02 | ||
| 973 | |||
| 974 | |||
| 975 | #ifdef __cplusplus | ||
| 976 | extern "C" { | ||
| 977 | #endif | ||
| 978 | |||
| 979 | typedef struct obj_name_st | ||
| 980 | { | ||
| 981 | int type; | ||
| 982 | int alias; | ||
| 983 | const char *name; | ||
| 984 | const char *data; | ||
| 985 | } OBJ_NAME; | ||
| 986 | |||
| 987 | #define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) | ||
| 988 | |||
| 989 | |||
| 990 | int OBJ_NAME_init(void); | ||
| 991 | int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), | ||
| 992 | int (*cmp_func)(const char *, const char *), | ||
| 993 | void (*free_func)(const char *, int, const char *)); | ||
| 994 | const char *OBJ_NAME_get(const char *name,int type); | ||
| 995 | int OBJ_NAME_add(const char *name,int type,const char *data); | ||
| 996 | int OBJ_NAME_remove(const char *name,int type); | ||
| 997 | void OBJ_NAME_cleanup(int type); /* -1 for everything */ | ||
| 998 | void OBJ_NAME_do_all(int type,void (*fn)(const OBJ_NAME *,void *arg), | ||
| 999 | void *arg); | ||
| 1000 | void OBJ_NAME_do_all_sorted(int type,void (*fn)(const OBJ_NAME *,void *arg), | ||
| 1001 | void *arg); | ||
| 1002 | |||
| 1003 | ASN1_OBJECT * OBJ_dup(const ASN1_OBJECT *o); | ||
| 1004 | ASN1_OBJECT * OBJ_nid2obj(int n); | ||
| 1005 | const char * OBJ_nid2ln(int n); | ||
| 1006 | const char * OBJ_nid2sn(int n); | ||
| 1007 | int OBJ_obj2nid(const ASN1_OBJECT *o); | ||
| 1008 | ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name); | ||
| 1009 | int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name); | ||
| 1010 | int OBJ_txt2nid(const char *s); | ||
| 1011 | int OBJ_ln2nid(const char *s); | ||
| 1012 | int OBJ_sn2nid(const char *s); | ||
| 1013 | int OBJ_cmp(const ASN1_OBJECT *a,const ASN1_OBJECT *b); | ||
| 1014 | const void * OBJ_bsearch_(const void *key,const void *base,int num,int size, | ||
| 1015 | int (*cmp)(const void *, const void *)); | ||
| 1016 | const void * OBJ_bsearch_ex_(const void *key,const void *base,int num, | ||
| 1017 | int size, | ||
| 1018 | int (*cmp)(const void *, const void *), | ||
| 1019 | int flags); | ||
| 1020 | |||
| 1021 | #define _DECLARE_OBJ_BSEARCH_CMP_FN(scope, type1, type2, nm) \ | ||
| 1022 | static int nm##_cmp_BSEARCH_CMP_FN(const void *, const void *); \ | ||
| 1023 | static int nm##_cmp(type1 const *, type2 const *); \ | ||
| 1024 | scope type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) | ||
| 1025 | |||
| 1026 | #define DECLARE_OBJ_BSEARCH_CMP_FN(type1, type2, cmp) \ | ||
| 1027 | _DECLARE_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp) | ||
| 1028 | #define DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \ | ||
| 1029 | type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) | ||
| 1030 | |||
| 1031 | /* | ||
| 1032 | * Unsolved problem: if a type is actually a pointer type, like | ||
| 1033 | * nid_triple is, then its impossible to get a const where you need | ||
| 1034 | * it. Consider: | ||
| 1035 | * | ||
| 1036 | * typedef int nid_triple[3]; | ||
| 1037 | * const void *a_; | ||
| 1038 | * const nid_triple const *a = a_; | ||
| 1039 | * | ||
| 1040 | * The assignement discards a const because what you really want is: | ||
| 1041 | * | ||
| 1042 | * const int const * const *a = a_; | ||
| 1043 | * | ||
| 1044 | * But if you do that, you lose the fact that a is an array of 3 ints, | ||
| 1045 | * which breaks comparison functions. | ||
| 1046 | * | ||
| 1047 | * Thus we end up having to cast, sadly, or unpack the | ||
| 1048 | * declarations. Or, as I finally did in this case, delcare nid_triple | ||
| 1049 | * to be a struct, which it should have been in the first place. | ||
| 1050 | * | ||
| 1051 | * Ben, August 2008. | ||
| 1052 | * | ||
| 1053 | * Also, strictly speaking not all types need be const, but handling | ||
| 1054 | * the non-constness means a lot of complication, and in practice | ||
| 1055 | * comparison routines do always not touch their arguments. | ||
| 1056 | */ | ||
| 1057 | |||
| 1058 | #define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, nm) \ | ||
| 1059 | static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \ | ||
| 1060 | { \ | ||
| 1061 | type1 const *a = a_; \ | ||
| 1062 | type2 const *b = b_; \ | ||
| 1063 | return nm##_cmp(a,b); \ | ||
| 1064 | } \ | ||
| 1065 | static type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \ | ||
| 1066 | { \ | ||
| 1067 | return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \ | ||
| 1068 | nm##_cmp_BSEARCH_CMP_FN); \ | ||
| 1069 | } \ | ||
| 1070 | extern void dummy_prototype(void) | ||
| 1071 | |||
| 1072 | #define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \ | ||
| 1073 | static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \ | ||
| 1074 | { \ | ||
| 1075 | type1 const *a = a_; \ | ||
| 1076 | type2 const *b = b_; \ | ||
| 1077 | return nm##_cmp(a,b); \ | ||
| 1078 | } \ | ||
| 1079 | type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \ | ||
| 1080 | { \ | ||
| 1081 | return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \ | ||
| 1082 | nm##_cmp_BSEARCH_CMP_FN); \ | ||
| 1083 | } \ | ||
| 1084 | extern void dummy_prototype(void) | ||
| 1085 | |||
| 1086 | #define OBJ_bsearch(type1,key,type2,base,num,cmp) \ | ||
| 1087 | ((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \ | ||
| 1088 | num,sizeof(type2), \ | ||
| 1089 | ((void)CHECKED_PTR_OF(type1,cmp##_type_1), \ | ||
| 1090 | (void)CHECKED_PTR_OF(type2,cmp##_type_2), \ | ||
| 1091 | cmp##_BSEARCH_CMP_FN))) | ||
| 1092 | |||
| 1093 | #define OBJ_bsearch_ex(type1,key,type2,base,num,cmp,flags) \ | ||
| 1094 | ((type2 *)OBJ_bsearch_ex_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \ | ||
| 1095 | num,sizeof(type2), \ | ||
| 1096 | ((void)CHECKED_PTR_OF(type1,cmp##_type_1), \ | ||
| 1097 | (void)type_2=CHECKED_PTR_OF(type2,cmp##_type_2), \ | ||
| 1098 | cmp##_BSEARCH_CMP_FN)),flags) | ||
| 1099 | |||
| 1100 | int OBJ_new_nid(int num); | ||
| 1101 | int OBJ_add_object(const ASN1_OBJECT *obj); | ||
| 1102 | int OBJ_create(const char *oid,const char *sn,const char *ln); | ||
| 1103 | void OBJ_cleanup(void ); | ||
| 1104 | int OBJ_create_objects(BIO *in); | ||
| 1105 | |||
| 1106 | int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); | ||
| 1107 | int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); | ||
| 1108 | int OBJ_add_sigid(int signid, int dig_id, int pkey_id); | ||
| 1109 | void OBJ_sigid_free(void); | ||
| 1110 | |||
| 1111 | extern int obj_cleanup_defer; | ||
| 1112 | void check_defer(int nid); | ||
| 1113 | |||
| 1114 | /* BEGIN ERROR CODES */ | ||
| 1115 | /* The following lines are auto generated by the script mkerr.pl. Any changes | ||
| 1116 | * made after this point may be overwritten when the script is next run. | ||
| 1117 | */ | ||
| 1118 | void ERR_load_OBJ_strings(void); | ||
| 1119 | |||
| 1120 | /* Error codes for the OBJ functions. */ | ||
| 1121 | |||
| 1122 | /* Function codes. */ | ||
| 1123 | #define OBJ_F_OBJ_ADD_OBJECT 105 | ||
| 1124 | #define OBJ_F_OBJ_CREATE 100 | ||
| 1125 | #define OBJ_F_OBJ_DUP 101 | ||
| 1126 | #define OBJ_F_OBJ_NAME_NEW_INDEX 106 | ||
| 1127 | #define OBJ_F_OBJ_NID2LN 102 | ||
| 1128 | #define OBJ_F_OBJ_NID2OBJ 103 | ||
| 1129 | #define OBJ_F_OBJ_NID2SN 104 | ||
| 1130 | |||
| 1131 | /* Reason codes. */ | ||
| 1132 | #define OBJ_R_MALLOC_FAILURE 100 | ||
| 1133 | #define OBJ_R_UNKNOWN_NID 101 | ||
| 1134 | |||
| 1135 | #ifdef __cplusplus | ||
| 1136 | } | ||
| 1137 | #endif | ||
| 1138 | #endif | ||
diff --git a/src/lib/libcrypto/objects/objects.pl b/src/lib/libcrypto/objects/objects.pl new file mode 100644 index 0000000000..d2bf659d88 --- /dev/null +++ b/src/lib/libcrypto/objects/objects.pl | |||
| @@ -0,0 +1,233 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]"; | ||
| 4 | $max_nid=0; | ||
| 5 | $o=0; | ||
| 6 | while(<NUMIN>) | ||
| 7 | { | ||
| 8 | chop; | ||
| 9 | $o++; | ||
| 10 | s/#.*$//; | ||
| 11 | next if /^\s*$/; | ||
| 12 | $_ = 'X'.$_; | ||
| 13 | ($Cname,$mynum) = split; | ||
| 14 | $Cname =~ s/^X//; | ||
| 15 | if (defined($nidn{$mynum})) | ||
| 16 | { die "$ARGV[1]:$o:There's already an object with NID ",$mynum," on line ",$order{$mynum},"\n"; } | ||
| 17 | if (defined($nid{$Cname})) | ||
| 18 | { die "$ARGV[1]:$o:There's already an object with name ",$Cname," on line ",$order{$nid{$Cname}},"\n"; } | ||
| 19 | $nid{$Cname} = $mynum; | ||
| 20 | $nidn{$mynum} = $Cname; | ||
| 21 | $order{$mynum} = $o; | ||
| 22 | $max_nid = $mynum if $mynum > $max_nid; | ||
| 23 | } | ||
| 24 | close NUMIN; | ||
| 25 | |||
| 26 | open (IN,"$ARGV[0]") || die "Can't open input file $ARGV[0]"; | ||
| 27 | $Cname=""; | ||
| 28 | $o=0; | ||
| 29 | while (<IN>) | ||
| 30 | { | ||
| 31 | chop; | ||
| 32 | $o++; | ||
| 33 | if (/^!module\s+(.*)$/) | ||
| 34 | { | ||
| 35 | $module = $1."-"; | ||
| 36 | $module =~ s/\./_/g; | ||
| 37 | $module =~ s/-/_/g; | ||
| 38 | } | ||
| 39 | if (/^!global$/) | ||
| 40 | { $module = ""; } | ||
| 41 | if (/^!Cname\s+(.*)$/) | ||
| 42 | { $Cname = $1; } | ||
| 43 | if (/^!Alias\s+(.+?)\s+(.*)$/) | ||
| 44 | { | ||
| 45 | $Cname = $module.$1; | ||
| 46 | $myoid = $2; | ||
| 47 | $myoid = &process_oid($myoid); | ||
| 48 | $Cname =~ s/-/_/g; | ||
| 49 | $ordern{$o} = $Cname; | ||
| 50 | $order{$Cname} = $o; | ||
| 51 | $obj{$Cname} = $myoid; | ||
| 52 | $_ = ""; | ||
| 53 | $Cname = ""; | ||
| 54 | } | ||
| 55 | s/!.*$//; | ||
| 56 | s/#.*$//; | ||
| 57 | next if /^\s*$/; | ||
| 58 | ($myoid,$mysn,$myln) = split ':'; | ||
| 59 | $mysn =~ s/^\s*//; | ||
| 60 | $mysn =~ s/\s*$//; | ||
| 61 | $myln =~ s/^\s*//; | ||
| 62 | $myln =~ s/\s*$//; | ||
| 63 | $myoid =~ s/^\s*//; | ||
| 64 | $myoid =~ s/\s*$//; | ||
| 65 | if ($myoid ne "") | ||
| 66 | { | ||
| 67 | $myoid = &process_oid($myoid); | ||
| 68 | } | ||
| 69 | |||
| 70 | if ($Cname eq "" && !($myln =~ / /)) | ||
| 71 | { | ||
| 72 | $Cname = $myln; | ||
| 73 | $Cname =~ s/\./_/g; | ||
| 74 | $Cname =~ s/-/_/g; | ||
| 75 | if ($Cname ne "" && defined($ln{$module.$Cname})) | ||
| 76 | { die "objects.txt:$o:There's already an object with long name ",$ln{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
| 77 | } | ||
| 78 | if ($Cname eq "") | ||
| 79 | { | ||
| 80 | $Cname = $mysn; | ||
| 81 | $Cname =~ s/-/_/g; | ||
| 82 | if ($Cname ne "" && defined($sn{$module.$Cname})) | ||
| 83 | { die "objects.txt:$o:There's already an object with short name ",$sn{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
| 84 | } | ||
| 85 | if ($Cname eq "") | ||
| 86 | { | ||
| 87 | $Cname = $myln; | ||
| 88 | $Cname =~ s/-/_/g; | ||
| 89 | $Cname =~ s/\./_/g; | ||
| 90 | $Cname =~ s/ /_/g; | ||
| 91 | if ($Cname ne "" && defined($ln{$module.$Cname})) | ||
| 92 | { die "objects.txt:$o:There's already an object with long name ",$ln{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; } | ||
| 93 | } | ||
| 94 | $Cname =~ s/\./_/g; | ||
| 95 | $Cname =~ s/-/_/g; | ||
| 96 | $Cname = $module.$Cname; | ||
| 97 | $ordern{$o} = $Cname; | ||
| 98 | $order{$Cname} = $o; | ||
| 99 | $sn{$Cname} = $mysn; | ||
| 100 | $ln{$Cname} = $myln; | ||
| 101 | $obj{$Cname} = $myoid; | ||
| 102 | if (!defined($nid{$Cname})) | ||
| 103 | { | ||
| 104 | $max_nid++; | ||
| 105 | $nid{$Cname} = $max_nid; | ||
| 106 | $nidn{$max_nid} = $Cname; | ||
| 107 | print STDERR "Added OID $Cname\n"; | ||
| 108 | } | ||
| 109 | $Cname=""; | ||
| 110 | } | ||
| 111 | close IN; | ||
| 112 | |||
| 113 | #XXX don't modify input files | ||
| 114 | #open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; | ||
| 115 | #foreach (sort { $a <=> $b } keys %nidn) | ||
| 116 | # { | ||
| 117 | # print NUMOUT $nidn{$_},"\t\t",$_,"\n"; | ||
| 118 | # } | ||
| 119 | #close NUMOUT; | ||
| 120 | |||
| 121 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; | ||
| 122 | print OUT <<'EOF'; | ||
| 123 | /* crypto/objects/obj_mac.h */ | ||
| 124 | |||
| 125 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
| 126 | * following command: | ||
| 127 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
| 128 | */ | ||
| 129 | |||
| 130 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
| 131 | * All rights reserved. | ||
| 132 | * | ||
| 133 | * This package is an SSL implementation written | ||
| 134 | * by Eric Young (eay@cryptsoft.com). | ||
| 135 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 136 | * | ||
| 137 | * This library is free for commercial and non-commercial use as long as | ||
| 138 | * the following conditions are aheared to. The following conditions | ||
| 139 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 140 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 141 | * included with this distribution is covered by the same copyright terms | ||
| 142 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 143 | * | ||
| 144 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 145 | * the code are not to be removed. | ||
| 146 | * If this package is used in a product, Eric Young should be given attribution | ||
| 147 | * as the author of the parts of the library used. | ||
| 148 | * This can be in the form of a textual message at program startup or | ||
| 149 | * in documentation (online or textual) provided with the package. | ||
| 150 | * | ||
| 151 | * Redistribution and use in source and binary forms, with or without | ||
| 152 | * modification, are permitted provided that the following conditions | ||
| 153 | * are met: | ||
| 154 | * 1. Redistributions of source code must retain the copyright | ||
| 155 | * notice, this list of conditions and the following disclaimer. | ||
| 156 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 157 | * notice, this list of conditions and the following disclaimer in the | ||
| 158 | * documentation and/or other materials provided with the distribution. | ||
| 159 | * 3. All advertising materials mentioning features or use of this software | ||
| 160 | * must display the following acknowledgement: | ||
| 161 | * "This product includes cryptographic software written by | ||
| 162 | * Eric Young (eay@cryptsoft.com)" | ||
| 163 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 164 | * being used are not cryptographic related :-). | ||
| 165 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 166 | * the apps directory (application code) you must include an acknowledgement: | ||
| 167 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 168 | * | ||
| 169 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 170 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 171 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 172 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 173 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 174 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 175 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 176 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 177 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 178 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 179 | * SUCH DAMAGE. | ||
| 180 | * | ||
| 181 | * The licence and distribution terms for any publically available version or | ||
| 182 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 183 | * copied and put under another distribution licence | ||
| 184 | * [including the GNU Public Licence.] | ||
| 185 | */ | ||
| 186 | |||
| 187 | #define SN_undef "UNDEF" | ||
| 188 | #define LN_undef "undefined" | ||
| 189 | #define NID_undef 0 | ||
| 190 | #define OBJ_undef 0L | ||
| 191 | |||
| 192 | EOF | ||
| 193 | |||
| 194 | foreach (sort { $a <=> $b } keys %ordern) | ||
| 195 | { | ||
| 196 | $Cname=$ordern{$_}; | ||
| 197 | print OUT "#define SN_",$Cname,"\t\t\"",$sn{$Cname},"\"\n" if $sn{$Cname} ne ""; | ||
| 198 | print OUT "#define LN_",$Cname,"\t\t\"",$ln{$Cname},"\"\n" if $ln{$Cname} ne ""; | ||
| 199 | print OUT "#define NID_",$Cname,"\t\t",$nid{$Cname},"\n" if $nid{$Cname} ne ""; | ||
| 200 | print OUT "#define OBJ_",$Cname,"\t\t",$obj{$Cname},"\n" if $obj{$Cname} ne ""; | ||
| 201 | print OUT "\n"; | ||
| 202 | } | ||
| 203 | |||
| 204 | close OUT; | ||
| 205 | |||
| 206 | sub process_oid | ||
| 207 | { | ||
| 208 | local($oid)=@_; | ||
| 209 | local(@a,$oid_pref); | ||
| 210 | |||
| 211 | @a = split(/\s+/,$myoid); | ||
| 212 | $pref_oid = ""; | ||
| 213 | $pref_sep = ""; | ||
| 214 | if (!($a[0] =~ /^[0-9]+$/)) | ||
| 215 | { | ||
| 216 | $a[0] =~ s/-/_/g; | ||
| 217 | if (!defined($obj{$a[0]})) | ||
| 218 | { die "$ARGV[0]:$o:Undefined identifier ",$a[0],"\n"; } | ||
| 219 | $pref_oid = "OBJ_" . $a[0]; | ||
| 220 | $pref_sep = ","; | ||
| 221 | shift @a; | ||
| 222 | } | ||
| 223 | $oids = join('L,',@a) . "L"; | ||
| 224 | if ($oids ne "L") | ||
| 225 | { | ||
| 226 | $oids = $pref_oid . $pref_sep . $oids; | ||
| 227 | } | ||
| 228 | else | ||
| 229 | { | ||
| 230 | $oids = $pref_oid; | ||
| 231 | } | ||
| 232 | return($oids); | ||
| 233 | } | ||
diff --git a/src/lib/libcrypto/objects/objects.txt b/src/lib/libcrypto/objects/objects.txt new file mode 100644 index 0000000000..d3bfad72a2 --- /dev/null +++ b/src/lib/libcrypto/objects/objects.txt | |||
| @@ -0,0 +1,1292 @@ | |||
| 1 | # CCITT was renamed to ITU-T quite some time ago | ||
| 2 | 0 : ITU-T : itu-t | ||
| 3 | !Alias ccitt itu-t | ||
| 4 | |||
| 5 | 1 : ISO : iso | ||
| 6 | |||
| 7 | 2 : JOINT-ISO-ITU-T : joint-iso-itu-t | ||
| 8 | !Alias joint-iso-ccitt joint-iso-itu-t | ||
| 9 | |||
| 10 | iso 2 : member-body : ISO Member Body | ||
| 11 | |||
| 12 | iso 3 : identified-organization | ||
| 13 | |||
| 14 | # HMAC OIDs | ||
| 15 | identified-organization 6 1 5 5 8 1 1 : HMAC-MD5 : hmac-md5 | ||
| 16 | identified-organization 6 1 5 5 8 1 2 : HMAC-SHA1 : hmac-sha1 | ||
| 17 | |||
| 18 | identified-organization 132 : certicom-arc | ||
| 19 | |||
| 20 | joint-iso-itu-t 23 : international-organizations : International Organizations | ||
| 21 | |||
| 22 | international-organizations 43 : wap | ||
| 23 | wap 1 : wap-wsg | ||
| 24 | |||
| 25 | joint-iso-itu-t 5 1 5 : selected-attribute-types : Selected Attribute Types | ||
| 26 | |||
| 27 | selected-attribute-types 55 : clearance | ||
| 28 | |||
| 29 | member-body 840 : ISO-US : ISO US Member Body | ||
| 30 | ISO-US 10040 : X9-57 : X9.57 | ||
| 31 | X9-57 4 : X9cm : X9.57 CM ? | ||
| 32 | |||
| 33 | !Cname dsa | ||
| 34 | X9cm 1 : DSA : dsaEncryption | ||
| 35 | X9cm 3 : DSA-SHA1 : dsaWithSHA1 | ||
| 36 | |||
| 37 | |||
| 38 | ISO-US 10045 : ansi-X9-62 : ANSI X9.62 | ||
| 39 | !module X9-62 | ||
| 40 | !Alias id-fieldType ansi-X9-62 1 | ||
| 41 | X9-62_id-fieldType 1 : prime-field | ||
| 42 | X9-62_id-fieldType 2 : characteristic-two-field | ||
| 43 | X9-62_characteristic-two-field 3 : id-characteristic-two-basis | ||
| 44 | X9-62_id-characteristic-two-basis 1 : onBasis | ||
| 45 | X9-62_id-characteristic-two-basis 2 : tpBasis | ||
| 46 | X9-62_id-characteristic-two-basis 3 : ppBasis | ||
| 47 | !Alias id-publicKeyType ansi-X9-62 2 | ||
| 48 | X9-62_id-publicKeyType 1 : id-ecPublicKey | ||
| 49 | !Alias ellipticCurve ansi-X9-62 3 | ||
| 50 | !Alias c-TwoCurve X9-62_ellipticCurve 0 | ||
| 51 | X9-62_c-TwoCurve 1 : c2pnb163v1 | ||
| 52 | X9-62_c-TwoCurve 2 : c2pnb163v2 | ||
| 53 | X9-62_c-TwoCurve 3 : c2pnb163v3 | ||
| 54 | X9-62_c-TwoCurve 4 : c2pnb176v1 | ||
| 55 | X9-62_c-TwoCurve 5 : c2tnb191v1 | ||
| 56 | X9-62_c-TwoCurve 6 : c2tnb191v2 | ||
| 57 | X9-62_c-TwoCurve 7 : c2tnb191v3 | ||
| 58 | X9-62_c-TwoCurve 8 : c2onb191v4 | ||
| 59 | X9-62_c-TwoCurve 9 : c2onb191v5 | ||
| 60 | X9-62_c-TwoCurve 10 : c2pnb208w1 | ||
| 61 | X9-62_c-TwoCurve 11 : c2tnb239v1 | ||
| 62 | X9-62_c-TwoCurve 12 : c2tnb239v2 | ||
| 63 | X9-62_c-TwoCurve 13 : c2tnb239v3 | ||
| 64 | X9-62_c-TwoCurve 14 : c2onb239v4 | ||
| 65 | X9-62_c-TwoCurve 15 : c2onb239v5 | ||
| 66 | X9-62_c-TwoCurve 16 : c2pnb272w1 | ||
| 67 | X9-62_c-TwoCurve 17 : c2pnb304w1 | ||
| 68 | X9-62_c-TwoCurve 18 : c2tnb359v1 | ||
| 69 | X9-62_c-TwoCurve 19 : c2pnb368w1 | ||
| 70 | X9-62_c-TwoCurve 20 : c2tnb431r1 | ||
| 71 | !Alias primeCurve X9-62_ellipticCurve 1 | ||
| 72 | X9-62_primeCurve 1 : prime192v1 | ||
| 73 | X9-62_primeCurve 2 : prime192v2 | ||
| 74 | X9-62_primeCurve 3 : prime192v3 | ||
| 75 | X9-62_primeCurve 4 : prime239v1 | ||
| 76 | X9-62_primeCurve 5 : prime239v2 | ||
| 77 | X9-62_primeCurve 6 : prime239v3 | ||
| 78 | X9-62_primeCurve 7 : prime256v1 | ||
| 79 | !Alias id-ecSigType ansi-X9-62 4 | ||
| 80 | !global | ||
| 81 | X9-62_id-ecSigType 1 : ecdsa-with-SHA1 | ||
| 82 | X9-62_id-ecSigType 2 : ecdsa-with-Recommended | ||
| 83 | X9-62_id-ecSigType 3 : ecdsa-with-Specified | ||
| 84 | ecdsa-with-Specified 1 : ecdsa-with-SHA224 | ||
| 85 | ecdsa-with-Specified 2 : ecdsa-with-SHA256 | ||
| 86 | ecdsa-with-Specified 3 : ecdsa-with-SHA384 | ||
| 87 | ecdsa-with-Specified 4 : ecdsa-with-SHA512 | ||
| 88 | |||
| 89 | # SECG curve OIDs from "SEC 2: Recommended Elliptic Curve Domain Parameters" | ||
| 90 | # (http://www.secg.org/) | ||
| 91 | !Alias secg_ellipticCurve certicom-arc 0 | ||
| 92 | # SECG prime curves OIDs | ||
| 93 | secg-ellipticCurve 6 : secp112r1 | ||
| 94 | secg-ellipticCurve 7 : secp112r2 | ||
| 95 | secg-ellipticCurve 28 : secp128r1 | ||
| 96 | secg-ellipticCurve 29 : secp128r2 | ||
| 97 | secg-ellipticCurve 9 : secp160k1 | ||
| 98 | secg-ellipticCurve 8 : secp160r1 | ||
| 99 | secg-ellipticCurve 30 : secp160r2 | ||
| 100 | secg-ellipticCurve 31 : secp192k1 | ||
| 101 | # NOTE: the curve secp192r1 is the same as prime192v1 defined above | ||
| 102 | # and is therefore omitted | ||
| 103 | secg-ellipticCurve 32 : secp224k1 | ||
| 104 | secg-ellipticCurve 33 : secp224r1 | ||
| 105 | secg-ellipticCurve 10 : secp256k1 | ||
| 106 | # NOTE: the curve secp256r1 is the same as prime256v1 defined above | ||
| 107 | # and is therefore omitted | ||
| 108 | secg-ellipticCurve 34 : secp384r1 | ||
| 109 | secg-ellipticCurve 35 : secp521r1 | ||
| 110 | # SECG characteristic two curves OIDs | ||
| 111 | secg-ellipticCurve 4 : sect113r1 | ||
| 112 | secg-ellipticCurve 5 : sect113r2 | ||
| 113 | secg-ellipticCurve 22 : sect131r1 | ||
| 114 | secg-ellipticCurve 23 : sect131r2 | ||
| 115 | secg-ellipticCurve 1 : sect163k1 | ||
| 116 | secg-ellipticCurve 2 : sect163r1 | ||
| 117 | secg-ellipticCurve 15 : sect163r2 | ||
| 118 | secg-ellipticCurve 24 : sect193r1 | ||
| 119 | secg-ellipticCurve 25 : sect193r2 | ||
| 120 | secg-ellipticCurve 26 : sect233k1 | ||
| 121 | secg-ellipticCurve 27 : sect233r1 | ||
| 122 | secg-ellipticCurve 3 : sect239k1 | ||
| 123 | secg-ellipticCurve 16 : sect283k1 | ||
| 124 | secg-ellipticCurve 17 : sect283r1 | ||
| 125 | secg-ellipticCurve 36 : sect409k1 | ||
| 126 | secg-ellipticCurve 37 : sect409r1 | ||
| 127 | secg-ellipticCurve 38 : sect571k1 | ||
| 128 | secg-ellipticCurve 39 : sect571r1 | ||
| 129 | |||
| 130 | # WAP/TLS curve OIDs (http://www.wapforum.org/) | ||
| 131 | !Alias wap-wsg-idm-ecid wap-wsg 4 | ||
| 132 | wap-wsg-idm-ecid 1 : wap-wsg-idm-ecid-wtls1 | ||
| 133 | wap-wsg-idm-ecid 3 : wap-wsg-idm-ecid-wtls3 | ||
| 134 | wap-wsg-idm-ecid 4 : wap-wsg-idm-ecid-wtls4 | ||
| 135 | wap-wsg-idm-ecid 5 : wap-wsg-idm-ecid-wtls5 | ||
| 136 | wap-wsg-idm-ecid 6 : wap-wsg-idm-ecid-wtls6 | ||
| 137 | wap-wsg-idm-ecid 7 : wap-wsg-idm-ecid-wtls7 | ||
| 138 | wap-wsg-idm-ecid 8 : wap-wsg-idm-ecid-wtls8 | ||
| 139 | wap-wsg-idm-ecid 9 : wap-wsg-idm-ecid-wtls9 | ||
| 140 | wap-wsg-idm-ecid 10 : wap-wsg-idm-ecid-wtls10 | ||
| 141 | wap-wsg-idm-ecid 11 : wap-wsg-idm-ecid-wtls11 | ||
| 142 | wap-wsg-idm-ecid 12 : wap-wsg-idm-ecid-wtls12 | ||
| 143 | |||
| 144 | |||
| 145 | ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc | ||
| 146 | : CAST5-ECB : cast5-ecb | ||
| 147 | !Cname cast5-cfb64 | ||
| 148 | : CAST5-CFB : cast5-cfb | ||
| 149 | !Cname cast5-ofb64 | ||
| 150 | : CAST5-OFB : cast5-ofb | ||
| 151 | !Cname pbeWithMD5AndCast5-CBC | ||
| 152 | ISO-US 113533 7 66 12 : : pbeWithMD5AndCast5CBC | ||
| 153 | |||
| 154 | # Macs for CMP and CRMF | ||
| 155 | ISO-US 113533 7 66 13 : id-PasswordBasedMAC : password based MAC | ||
| 156 | ISO-US 113533 7 66 30 : id-DHBasedMac : Diffie-Hellman based MAC | ||
| 157 | |||
| 158 | ISO-US 113549 : rsadsi : RSA Data Security, Inc. | ||
| 159 | |||
| 160 | rsadsi 1 : pkcs : RSA Data Security, Inc. PKCS | ||
| 161 | |||
| 162 | pkcs 1 : pkcs1 | ||
| 163 | pkcs1 1 : : rsaEncryption | ||
| 164 | pkcs1 2 : RSA-MD2 : md2WithRSAEncryption | ||
| 165 | pkcs1 3 : RSA-MD4 : md4WithRSAEncryption | ||
| 166 | pkcs1 4 : RSA-MD5 : md5WithRSAEncryption | ||
| 167 | pkcs1 5 : RSA-SHA1 : sha1WithRSAEncryption | ||
| 168 | # According to PKCS #1 version 2.1 | ||
| 169 | pkcs1 7 : RSAES-OAEP : rsaesOaep | ||
| 170 | pkcs1 8 : MGF1 : mgf1 | ||
| 171 | pkcs1 10 : RSASSA-PSS : rsassaPss | ||
| 172 | |||
| 173 | pkcs1 11 : RSA-SHA256 : sha256WithRSAEncryption | ||
| 174 | pkcs1 12 : RSA-SHA384 : sha384WithRSAEncryption | ||
| 175 | pkcs1 13 : RSA-SHA512 : sha512WithRSAEncryption | ||
| 176 | pkcs1 14 : RSA-SHA224 : sha224WithRSAEncryption | ||
| 177 | |||
| 178 | pkcs 3 : pkcs3 | ||
| 179 | pkcs3 1 : : dhKeyAgreement | ||
| 180 | |||
| 181 | pkcs 5 : pkcs5 | ||
| 182 | pkcs5 1 : PBE-MD2-DES : pbeWithMD2AndDES-CBC | ||
| 183 | pkcs5 3 : PBE-MD5-DES : pbeWithMD5AndDES-CBC | ||
| 184 | pkcs5 4 : PBE-MD2-RC2-64 : pbeWithMD2AndRC2-CBC | ||
| 185 | pkcs5 6 : PBE-MD5-RC2-64 : pbeWithMD5AndRC2-CBC | ||
| 186 | pkcs5 10 : PBE-SHA1-DES : pbeWithSHA1AndDES-CBC | ||
| 187 | pkcs5 11 : PBE-SHA1-RC2-64 : pbeWithSHA1AndRC2-CBC | ||
| 188 | !Cname id_pbkdf2 | ||
| 189 | pkcs5 12 : : PBKDF2 | ||
| 190 | !Cname pbes2 | ||
| 191 | pkcs5 13 : : PBES2 | ||
| 192 | !Cname pbmac1 | ||
| 193 | pkcs5 14 : : PBMAC1 | ||
| 194 | |||
| 195 | pkcs 7 : pkcs7 | ||
| 196 | pkcs7 1 : : pkcs7-data | ||
| 197 | !Cname pkcs7-signed | ||
| 198 | pkcs7 2 : : pkcs7-signedData | ||
| 199 | !Cname pkcs7-enveloped | ||
| 200 | pkcs7 3 : : pkcs7-envelopedData | ||
| 201 | !Cname pkcs7-signedAndEnveloped | ||
| 202 | pkcs7 4 : : pkcs7-signedAndEnvelopedData | ||
| 203 | !Cname pkcs7-digest | ||
| 204 | pkcs7 5 : : pkcs7-digestData | ||
| 205 | !Cname pkcs7-encrypted | ||
| 206 | pkcs7 6 : : pkcs7-encryptedData | ||
| 207 | |||
| 208 | pkcs 9 : pkcs9 | ||
| 209 | !module pkcs9 | ||
| 210 | pkcs9 1 : : emailAddress | ||
| 211 | pkcs9 2 : : unstructuredName | ||
| 212 | pkcs9 3 : : contentType | ||
| 213 | pkcs9 4 : : messageDigest | ||
| 214 | pkcs9 5 : : signingTime | ||
| 215 | pkcs9 6 : : countersignature | ||
| 216 | pkcs9 7 : : challengePassword | ||
| 217 | pkcs9 8 : : unstructuredAddress | ||
| 218 | !Cname extCertAttributes | ||
| 219 | pkcs9 9 : : extendedCertificateAttributes | ||
| 220 | !global | ||
| 221 | |||
| 222 | !Cname ext-req | ||
| 223 | pkcs9 14 : extReq : Extension Request | ||
| 224 | |||
| 225 | !Cname SMIMECapabilities | ||
| 226 | pkcs9 15 : SMIME-CAPS : S/MIME Capabilities | ||
| 227 | |||
| 228 | # S/MIME | ||
| 229 | !Cname SMIME | ||
| 230 | pkcs9 16 : SMIME : S/MIME | ||
| 231 | SMIME 0 : id-smime-mod | ||
| 232 | SMIME 1 : id-smime-ct | ||
| 233 | SMIME 2 : id-smime-aa | ||
| 234 | SMIME 3 : id-smime-alg | ||
| 235 | SMIME 4 : id-smime-cd | ||
| 236 | SMIME 5 : id-smime-spq | ||
| 237 | SMIME 6 : id-smime-cti | ||
| 238 | |||
| 239 | # S/MIME Modules | ||
| 240 | id-smime-mod 1 : id-smime-mod-cms | ||
| 241 | id-smime-mod 2 : id-smime-mod-ess | ||
| 242 | id-smime-mod 3 : id-smime-mod-oid | ||
| 243 | id-smime-mod 4 : id-smime-mod-msg-v3 | ||
| 244 | id-smime-mod 5 : id-smime-mod-ets-eSignature-88 | ||
| 245 | id-smime-mod 6 : id-smime-mod-ets-eSignature-97 | ||
| 246 | id-smime-mod 7 : id-smime-mod-ets-eSigPolicy-88 | ||
| 247 | id-smime-mod 8 : id-smime-mod-ets-eSigPolicy-97 | ||
| 248 | |||
| 249 | # S/MIME Content Types | ||
| 250 | id-smime-ct 1 : id-smime-ct-receipt | ||
| 251 | id-smime-ct 2 : id-smime-ct-authData | ||
| 252 | id-smime-ct 3 : id-smime-ct-publishCert | ||
| 253 | id-smime-ct 4 : id-smime-ct-TSTInfo | ||
| 254 | id-smime-ct 5 : id-smime-ct-TDTInfo | ||
| 255 | id-smime-ct 6 : id-smime-ct-contentInfo | ||
| 256 | id-smime-ct 7 : id-smime-ct-DVCSRequestData | ||
| 257 | id-smime-ct 8 : id-smime-ct-DVCSResponseData | ||
| 258 | id-smime-ct 9 : id-smime-ct-compressedData | ||
| 259 | id-smime-ct 27 : id-ct-asciiTextWithCRLF | ||
| 260 | |||
| 261 | # S/MIME Attributes | ||
| 262 | id-smime-aa 1 : id-smime-aa-receiptRequest | ||
| 263 | id-smime-aa 2 : id-smime-aa-securityLabel | ||
| 264 | id-smime-aa 3 : id-smime-aa-mlExpandHistory | ||
| 265 | id-smime-aa 4 : id-smime-aa-contentHint | ||
| 266 | id-smime-aa 5 : id-smime-aa-msgSigDigest | ||
| 267 | # obsolete | ||
| 268 | id-smime-aa 6 : id-smime-aa-encapContentType | ||
| 269 | id-smime-aa 7 : id-smime-aa-contentIdentifier | ||
| 270 | # obsolete | ||
| 271 | id-smime-aa 8 : id-smime-aa-macValue | ||
| 272 | id-smime-aa 9 : id-smime-aa-equivalentLabels | ||
| 273 | id-smime-aa 10 : id-smime-aa-contentReference | ||
| 274 | id-smime-aa 11 : id-smime-aa-encrypKeyPref | ||
| 275 | id-smime-aa 12 : id-smime-aa-signingCertificate | ||
| 276 | id-smime-aa 13 : id-smime-aa-smimeEncryptCerts | ||
| 277 | id-smime-aa 14 : id-smime-aa-timeStampToken | ||
| 278 | id-smime-aa 15 : id-smime-aa-ets-sigPolicyId | ||
| 279 | id-smime-aa 16 : id-smime-aa-ets-commitmentType | ||
| 280 | id-smime-aa 17 : id-smime-aa-ets-signerLocation | ||
| 281 | id-smime-aa 18 : id-smime-aa-ets-signerAttr | ||
| 282 | id-smime-aa 19 : id-smime-aa-ets-otherSigCert | ||
| 283 | id-smime-aa 20 : id-smime-aa-ets-contentTimestamp | ||
| 284 | id-smime-aa 21 : id-smime-aa-ets-CertificateRefs | ||
| 285 | id-smime-aa 22 : id-smime-aa-ets-RevocationRefs | ||
| 286 | id-smime-aa 23 : id-smime-aa-ets-certValues | ||
| 287 | id-smime-aa 24 : id-smime-aa-ets-revocationValues | ||
| 288 | id-smime-aa 25 : id-smime-aa-ets-escTimeStamp | ||
| 289 | id-smime-aa 26 : id-smime-aa-ets-certCRLTimestamp | ||
| 290 | id-smime-aa 27 : id-smime-aa-ets-archiveTimeStamp | ||
| 291 | id-smime-aa 28 : id-smime-aa-signatureType | ||
| 292 | id-smime-aa 29 : id-smime-aa-dvcs-dvc | ||
| 293 | |||
| 294 | # S/MIME Algorithm Identifiers | ||
| 295 | # obsolete | ||
| 296 | id-smime-alg 1 : id-smime-alg-ESDHwith3DES | ||
| 297 | # obsolete | ||
| 298 | id-smime-alg 2 : id-smime-alg-ESDHwithRC2 | ||
| 299 | # obsolete | ||
| 300 | id-smime-alg 3 : id-smime-alg-3DESwrap | ||
| 301 | # obsolete | ||
| 302 | id-smime-alg 4 : id-smime-alg-RC2wrap | ||
| 303 | id-smime-alg 5 : id-smime-alg-ESDH | ||
| 304 | id-smime-alg 6 : id-smime-alg-CMS3DESwrap | ||
| 305 | id-smime-alg 7 : id-smime-alg-CMSRC2wrap | ||
| 306 | id-smime-alg 9 : id-alg-PWRI-KEK | ||
| 307 | |||
| 308 | # S/MIME Certificate Distribution | ||
| 309 | id-smime-cd 1 : id-smime-cd-ldap | ||
| 310 | |||
| 311 | # S/MIME Signature Policy Qualifier | ||
| 312 | id-smime-spq 1 : id-smime-spq-ets-sqt-uri | ||
| 313 | id-smime-spq 2 : id-smime-spq-ets-sqt-unotice | ||
| 314 | |||
| 315 | # S/MIME Commitment Type Identifier | ||
| 316 | id-smime-cti 1 : id-smime-cti-ets-proofOfOrigin | ||
| 317 | id-smime-cti 2 : id-smime-cti-ets-proofOfReceipt | ||
| 318 | id-smime-cti 3 : id-smime-cti-ets-proofOfDelivery | ||
| 319 | id-smime-cti 4 : id-smime-cti-ets-proofOfSender | ||
| 320 | id-smime-cti 5 : id-smime-cti-ets-proofOfApproval | ||
| 321 | id-smime-cti 6 : id-smime-cti-ets-proofOfCreation | ||
| 322 | |||
| 323 | pkcs9 20 : : friendlyName | ||
| 324 | pkcs9 21 : : localKeyID | ||
| 325 | !Cname ms-csp-name | ||
| 326 | 1 3 6 1 4 1 311 17 1 : CSPName : Microsoft CSP Name | ||
| 327 | 1 3 6 1 4 1 311 17 2 : LocalKeySet : Microsoft Local Key set | ||
| 328 | !Alias certTypes pkcs9 22 | ||
| 329 | certTypes 1 : : x509Certificate | ||
| 330 | certTypes 2 : : sdsiCertificate | ||
| 331 | !Alias crlTypes pkcs9 23 | ||
| 332 | crlTypes 1 : : x509Crl | ||
| 333 | |||
| 334 | !Alias pkcs12 pkcs 12 | ||
| 335 | !Alias pkcs12-pbeids pkcs12 1 | ||
| 336 | |||
| 337 | !Cname pbe-WithSHA1And128BitRC4 | ||
| 338 | pkcs12-pbeids 1 : PBE-SHA1-RC4-128 : pbeWithSHA1And128BitRC4 | ||
| 339 | !Cname pbe-WithSHA1And40BitRC4 | ||
| 340 | pkcs12-pbeids 2 : PBE-SHA1-RC4-40 : pbeWithSHA1And40BitRC4 | ||
| 341 | !Cname pbe-WithSHA1And3_Key_TripleDES-CBC | ||
| 342 | pkcs12-pbeids 3 : PBE-SHA1-3DES : pbeWithSHA1And3-KeyTripleDES-CBC | ||
| 343 | !Cname pbe-WithSHA1And2_Key_TripleDES-CBC | ||
| 344 | pkcs12-pbeids 4 : PBE-SHA1-2DES : pbeWithSHA1And2-KeyTripleDES-CBC | ||
| 345 | !Cname pbe-WithSHA1And128BitRC2-CBC | ||
| 346 | pkcs12-pbeids 5 : PBE-SHA1-RC2-128 : pbeWithSHA1And128BitRC2-CBC | ||
| 347 | !Cname pbe-WithSHA1And40BitRC2-CBC | ||
| 348 | pkcs12-pbeids 6 : PBE-SHA1-RC2-40 : pbeWithSHA1And40BitRC2-CBC | ||
| 349 | |||
| 350 | !Alias pkcs12-Version1 pkcs12 10 | ||
| 351 | !Alias pkcs12-BagIds pkcs12-Version1 1 | ||
| 352 | pkcs12-BagIds 1 : : keyBag | ||
| 353 | pkcs12-BagIds 2 : : pkcs8ShroudedKeyBag | ||
| 354 | pkcs12-BagIds 3 : : certBag | ||
| 355 | pkcs12-BagIds 4 : : crlBag | ||
| 356 | pkcs12-BagIds 5 : : secretBag | ||
| 357 | pkcs12-BagIds 6 : : safeContentsBag | ||
| 358 | |||
| 359 | rsadsi 2 2 : MD2 : md2 | ||
| 360 | rsadsi 2 4 : MD4 : md4 | ||
| 361 | rsadsi 2 5 : MD5 : md5 | ||
| 362 | : MD5-SHA1 : md5-sha1 | ||
| 363 | rsadsi 2 6 : : hmacWithMD5 | ||
| 364 | rsadsi 2 7 : : hmacWithSHA1 | ||
| 365 | |||
| 366 | # From RFC4231 | ||
| 367 | rsadsi 2 8 : : hmacWithSHA224 | ||
| 368 | rsadsi 2 9 : : hmacWithSHA256 | ||
| 369 | rsadsi 2 10 : : hmacWithSHA384 | ||
| 370 | rsadsi 2 11 : : hmacWithSHA512 | ||
| 371 | |||
| 372 | rsadsi 3 2 : RC2-CBC : rc2-cbc | ||
| 373 | : RC2-ECB : rc2-ecb | ||
| 374 | !Cname rc2-cfb64 | ||
| 375 | : RC2-CFB : rc2-cfb | ||
| 376 | !Cname rc2-ofb64 | ||
| 377 | : RC2-OFB : rc2-ofb | ||
| 378 | : RC2-40-CBC : rc2-40-cbc | ||
| 379 | : RC2-64-CBC : rc2-64-cbc | ||
| 380 | rsadsi 3 4 : RC4 : rc4 | ||
| 381 | : RC4-40 : rc4-40 | ||
| 382 | rsadsi 3 7 : DES-EDE3-CBC : des-ede3-cbc | ||
| 383 | rsadsi 3 8 : RC5-CBC : rc5-cbc | ||
| 384 | : RC5-ECB : rc5-ecb | ||
| 385 | !Cname rc5-cfb64 | ||
| 386 | : RC5-CFB : rc5-cfb | ||
| 387 | !Cname rc5-ofb64 | ||
| 388 | : RC5-OFB : rc5-ofb | ||
| 389 | |||
| 390 | !Cname ms-ext-req | ||
| 391 | 1 3 6 1 4 1 311 2 1 14 : msExtReq : Microsoft Extension Request | ||
| 392 | !Cname ms-code-ind | ||
| 393 | 1 3 6 1 4 1 311 2 1 21 : msCodeInd : Microsoft Individual Code Signing | ||
| 394 | !Cname ms-code-com | ||
| 395 | 1 3 6 1 4 1 311 2 1 22 : msCodeCom : Microsoft Commercial Code Signing | ||
| 396 | !Cname ms-ctl-sign | ||
| 397 | 1 3 6 1 4 1 311 10 3 1 : msCTLSign : Microsoft Trust List Signing | ||
| 398 | !Cname ms-sgc | ||
| 399 | 1 3 6 1 4 1 311 10 3 3 : msSGC : Microsoft Server Gated Crypto | ||
| 400 | !Cname ms-efs | ||
| 401 | 1 3 6 1 4 1 311 10 3 4 : msEFS : Microsoft Encrypted File System | ||
| 402 | !Cname ms-smartcard-login | ||
| 403 | 1 3 6 1 4 1 311 20 2 2 : msSmartcardLogin : Microsoft Smartcardlogin | ||
| 404 | !Cname ms-upn | ||
| 405 | 1 3 6 1 4 1 311 20 2 3 : msUPN : Microsoft Universal Principal Name | ||
| 406 | |||
| 407 | 1 3 6 1 4 1 188 7 1 1 2 : IDEA-CBC : idea-cbc | ||
| 408 | : IDEA-ECB : idea-ecb | ||
| 409 | !Cname idea-cfb64 | ||
| 410 | : IDEA-CFB : idea-cfb | ||
| 411 | !Cname idea-ofb64 | ||
| 412 | : IDEA-OFB : idea-ofb | ||
| 413 | |||
| 414 | 1 3 6 1 4 1 3029 1 2 : BF-CBC : bf-cbc | ||
| 415 | : BF-ECB : bf-ecb | ||
| 416 | !Cname bf-cfb64 | ||
| 417 | : BF-CFB : bf-cfb | ||
| 418 | !Cname bf-ofb64 | ||
| 419 | : BF-OFB : bf-ofb | ||
| 420 | |||
| 421 | !Cname id-pkix | ||
| 422 | 1 3 6 1 5 5 7 : PKIX | ||
| 423 | |||
| 424 | # PKIX Arcs | ||
| 425 | id-pkix 0 : id-pkix-mod | ||
| 426 | id-pkix 1 : id-pe | ||
| 427 | id-pkix 2 : id-qt | ||
| 428 | id-pkix 3 : id-kp | ||
| 429 | id-pkix 4 : id-it | ||
| 430 | id-pkix 5 : id-pkip | ||
| 431 | id-pkix 6 : id-alg | ||
| 432 | id-pkix 7 : id-cmc | ||
| 433 | id-pkix 8 : id-on | ||
| 434 | id-pkix 9 : id-pda | ||
| 435 | id-pkix 10 : id-aca | ||
| 436 | id-pkix 11 : id-qcs | ||
| 437 | id-pkix 12 : id-cct | ||
| 438 | id-pkix 21 : id-ppl | ||
| 439 | id-pkix 48 : id-ad | ||
| 440 | |||
| 441 | # PKIX Modules | ||
| 442 | id-pkix-mod 1 : id-pkix1-explicit-88 | ||
| 443 | id-pkix-mod 2 : id-pkix1-implicit-88 | ||
| 444 | id-pkix-mod 3 : id-pkix1-explicit-93 | ||
| 445 | id-pkix-mod 4 : id-pkix1-implicit-93 | ||
| 446 | id-pkix-mod 5 : id-mod-crmf | ||
| 447 | id-pkix-mod 6 : id-mod-cmc | ||
| 448 | id-pkix-mod 7 : id-mod-kea-profile-88 | ||
| 449 | id-pkix-mod 8 : id-mod-kea-profile-93 | ||
| 450 | id-pkix-mod 9 : id-mod-cmp | ||
| 451 | id-pkix-mod 10 : id-mod-qualified-cert-88 | ||
| 452 | id-pkix-mod 11 : id-mod-qualified-cert-93 | ||
| 453 | id-pkix-mod 12 : id-mod-attribute-cert | ||
| 454 | id-pkix-mod 13 : id-mod-timestamp-protocol | ||
| 455 | id-pkix-mod 14 : id-mod-ocsp | ||
| 456 | id-pkix-mod 15 : id-mod-dvcs | ||
| 457 | id-pkix-mod 16 : id-mod-cmp2000 | ||
| 458 | |||
| 459 | # PKIX Private Extensions | ||
| 460 | !Cname info-access | ||
| 461 | id-pe 1 : authorityInfoAccess : Authority Information Access | ||
| 462 | id-pe 2 : biometricInfo : Biometric Info | ||
| 463 | id-pe 3 : qcStatements | ||
| 464 | id-pe 4 : ac-auditEntity | ||
| 465 | id-pe 5 : ac-targeting | ||
| 466 | id-pe 6 : aaControls | ||
| 467 | id-pe 7 : sbgp-ipAddrBlock | ||
| 468 | id-pe 8 : sbgp-autonomousSysNum | ||
| 469 | id-pe 9 : sbgp-routerIdentifier | ||
| 470 | id-pe 10 : ac-proxying | ||
| 471 | !Cname sinfo-access | ||
| 472 | id-pe 11 : subjectInfoAccess : Subject Information Access | ||
| 473 | id-pe 14 : proxyCertInfo : Proxy Certificate Information | ||
| 474 | |||
| 475 | # PKIX policyQualifiers for Internet policy qualifiers | ||
| 476 | id-qt 1 : id-qt-cps : Policy Qualifier CPS | ||
| 477 | id-qt 2 : id-qt-unotice : Policy Qualifier User Notice | ||
| 478 | id-qt 3 : textNotice | ||
| 479 | |||
| 480 | # PKIX key purpose identifiers | ||
| 481 | !Cname server-auth | ||
| 482 | id-kp 1 : serverAuth : TLS Web Server Authentication | ||
| 483 | !Cname client-auth | ||
| 484 | id-kp 2 : clientAuth : TLS Web Client Authentication | ||
| 485 | !Cname code-sign | ||
| 486 | id-kp 3 : codeSigning : Code Signing | ||
| 487 | !Cname email-protect | ||
| 488 | id-kp 4 : emailProtection : E-mail Protection | ||
| 489 | id-kp 5 : ipsecEndSystem : IPSec End System | ||
| 490 | id-kp 6 : ipsecTunnel : IPSec Tunnel | ||
| 491 | id-kp 7 : ipsecUser : IPSec User | ||
| 492 | !Cname time-stamp | ||
| 493 | id-kp 8 : timeStamping : Time Stamping | ||
| 494 | # From OCSP spec RFC2560 | ||
| 495 | !Cname OCSP-sign | ||
| 496 | id-kp 9 : OCSPSigning : OCSP Signing | ||
| 497 | id-kp 10 : DVCS : dvcs | ||
| 498 | |||
| 499 | # CMP information types | ||
| 500 | id-it 1 : id-it-caProtEncCert | ||
| 501 | id-it 2 : id-it-signKeyPairTypes | ||
| 502 | id-it 3 : id-it-encKeyPairTypes | ||
| 503 | id-it 4 : id-it-preferredSymmAlg | ||
| 504 | id-it 5 : id-it-caKeyUpdateInfo | ||
| 505 | id-it 6 : id-it-currentCRL | ||
| 506 | id-it 7 : id-it-unsupportedOIDs | ||
| 507 | # obsolete | ||
| 508 | id-it 8 : id-it-subscriptionRequest | ||
| 509 | # obsolete | ||
| 510 | id-it 9 : id-it-subscriptionResponse | ||
| 511 | id-it 10 : id-it-keyPairParamReq | ||
| 512 | id-it 11 : id-it-keyPairParamRep | ||
| 513 | id-it 12 : id-it-revPassphrase | ||
| 514 | id-it 13 : id-it-implicitConfirm | ||
| 515 | id-it 14 : id-it-confirmWaitTime | ||
| 516 | id-it 15 : id-it-origPKIMessage | ||
| 517 | id-it 16 : id-it-suppLangTags | ||
| 518 | |||
| 519 | # CRMF registration | ||
| 520 | id-pkip 1 : id-regCtrl | ||
| 521 | id-pkip 2 : id-regInfo | ||
| 522 | |||
| 523 | # CRMF registration controls | ||
| 524 | id-regCtrl 1 : id-regCtrl-regToken | ||
| 525 | id-regCtrl 2 : id-regCtrl-authenticator | ||
| 526 | id-regCtrl 3 : id-regCtrl-pkiPublicationInfo | ||
| 527 | id-regCtrl 4 : id-regCtrl-pkiArchiveOptions | ||
| 528 | id-regCtrl 5 : id-regCtrl-oldCertID | ||
| 529 | id-regCtrl 6 : id-regCtrl-protocolEncrKey | ||
| 530 | |||
| 531 | # CRMF registration information | ||
| 532 | id-regInfo 1 : id-regInfo-utf8Pairs | ||
| 533 | id-regInfo 2 : id-regInfo-certReq | ||
| 534 | |||
| 535 | # algorithms | ||
| 536 | id-alg 1 : id-alg-des40 | ||
| 537 | id-alg 2 : id-alg-noSignature | ||
| 538 | id-alg 3 : id-alg-dh-sig-hmac-sha1 | ||
| 539 | id-alg 4 : id-alg-dh-pop | ||
| 540 | |||
| 541 | # CMC controls | ||
| 542 | id-cmc 1 : id-cmc-statusInfo | ||
| 543 | id-cmc 2 : id-cmc-identification | ||
| 544 | id-cmc 3 : id-cmc-identityProof | ||
| 545 | id-cmc 4 : id-cmc-dataReturn | ||
| 546 | id-cmc 5 : id-cmc-transactionId | ||
| 547 | id-cmc 6 : id-cmc-senderNonce | ||
| 548 | id-cmc 7 : id-cmc-recipientNonce | ||
| 549 | id-cmc 8 : id-cmc-addExtensions | ||
| 550 | id-cmc 9 : id-cmc-encryptedPOP | ||
| 551 | id-cmc 10 : id-cmc-decryptedPOP | ||
| 552 | id-cmc 11 : id-cmc-lraPOPWitness | ||
| 553 | id-cmc 15 : id-cmc-getCert | ||
| 554 | id-cmc 16 : id-cmc-getCRL | ||
| 555 | id-cmc 17 : id-cmc-revokeRequest | ||
| 556 | id-cmc 18 : id-cmc-regInfo | ||
| 557 | id-cmc 19 : id-cmc-responseInfo | ||
| 558 | id-cmc 21 : id-cmc-queryPending | ||
| 559 | id-cmc 22 : id-cmc-popLinkRandom | ||
| 560 | id-cmc 23 : id-cmc-popLinkWitness | ||
| 561 | id-cmc 24 : id-cmc-confirmCertAcceptance | ||
| 562 | |||
| 563 | # other names | ||
| 564 | id-on 1 : id-on-personalData | ||
| 565 | id-on 3 : id-on-permanentIdentifier : Permanent Identifier | ||
| 566 | |||
| 567 | # personal data attributes | ||
| 568 | id-pda 1 : id-pda-dateOfBirth | ||
| 569 | id-pda 2 : id-pda-placeOfBirth | ||
| 570 | id-pda 3 : id-pda-gender | ||
| 571 | id-pda 4 : id-pda-countryOfCitizenship | ||
| 572 | id-pda 5 : id-pda-countryOfResidence | ||
| 573 | |||
| 574 | # attribute certificate attributes | ||
| 575 | id-aca 1 : id-aca-authenticationInfo | ||
| 576 | id-aca 2 : id-aca-accessIdentity | ||
| 577 | id-aca 3 : id-aca-chargingIdentity | ||
| 578 | id-aca 4 : id-aca-group | ||
| 579 | # attention : the following seems to be obsolete, replace by 'role' | ||
| 580 | id-aca 5 : id-aca-role | ||
| 581 | id-aca 6 : id-aca-encAttrs | ||
| 582 | |||
| 583 | # qualified certificate statements | ||
| 584 | id-qcs 1 : id-qcs-pkixQCSyntax-v1 | ||
| 585 | |||
| 586 | # CMC content types | ||
| 587 | id-cct 1 : id-cct-crs | ||
| 588 | id-cct 2 : id-cct-PKIData | ||
| 589 | id-cct 3 : id-cct-PKIResponse | ||
| 590 | |||
| 591 | # Predefined Proxy Certificate policy languages | ||
| 592 | id-ppl 0 : id-ppl-anyLanguage : Any language | ||
| 593 | id-ppl 1 : id-ppl-inheritAll : Inherit all | ||
| 594 | id-ppl 2 : id-ppl-independent : Independent | ||
| 595 | |||
| 596 | # access descriptors for authority info access extension | ||
| 597 | !Cname ad-OCSP | ||
| 598 | id-ad 1 : OCSP : OCSP | ||
| 599 | !Cname ad-ca-issuers | ||
| 600 | id-ad 2 : caIssuers : CA Issuers | ||
| 601 | !Cname ad-timeStamping | ||
| 602 | id-ad 3 : ad_timestamping : AD Time Stamping | ||
| 603 | !Cname ad-dvcs | ||
| 604 | id-ad 4 : AD_DVCS : ad dvcs | ||
| 605 | id-ad 5 : caRepository : CA Repository | ||
| 606 | |||
| 607 | |||
| 608 | !Alias id-pkix-OCSP ad-OCSP | ||
| 609 | !module id-pkix-OCSP | ||
| 610 | !Cname basic | ||
| 611 | id-pkix-OCSP 1 : basicOCSPResponse : Basic OCSP Response | ||
| 612 | id-pkix-OCSP 2 : Nonce : OCSP Nonce | ||
| 613 | id-pkix-OCSP 3 : CrlID : OCSP CRL ID | ||
| 614 | id-pkix-OCSP 4 : acceptableResponses : Acceptable OCSP Responses | ||
| 615 | id-pkix-OCSP 5 : noCheck : OCSP No Check | ||
| 616 | id-pkix-OCSP 6 : archiveCutoff : OCSP Archive Cutoff | ||
| 617 | id-pkix-OCSP 7 : serviceLocator : OCSP Service Locator | ||
| 618 | id-pkix-OCSP 8 : extendedStatus : Extended OCSP Status | ||
| 619 | id-pkix-OCSP 9 : valid | ||
| 620 | id-pkix-OCSP 10 : path | ||
| 621 | id-pkix-OCSP 11 : trustRoot : Trust Root | ||
| 622 | !global | ||
| 623 | |||
| 624 | 1 3 14 3 2 : algorithm : algorithm | ||
| 625 | algorithm 3 : RSA-NP-MD5 : md5WithRSA | ||
| 626 | algorithm 6 : DES-ECB : des-ecb | ||
| 627 | algorithm 7 : DES-CBC : des-cbc | ||
| 628 | !Cname des-ofb64 | ||
| 629 | algorithm 8 : DES-OFB : des-ofb | ||
| 630 | !Cname des-cfb64 | ||
| 631 | algorithm 9 : DES-CFB : des-cfb | ||
| 632 | algorithm 11 : rsaSignature | ||
| 633 | !Cname dsa-2 | ||
| 634 | algorithm 12 : DSA-old : dsaEncryption-old | ||
| 635 | algorithm 13 : DSA-SHA : dsaWithSHA | ||
| 636 | algorithm 15 : RSA-SHA : shaWithRSAEncryption | ||
| 637 | !Cname des-ede-ecb | ||
| 638 | algorithm 17 : DES-EDE : des-ede | ||
| 639 | !Cname des-ede3-ecb | ||
| 640 | : DES-EDE3 : des-ede3 | ||
| 641 | : DES-EDE-CBC : des-ede-cbc | ||
| 642 | !Cname des-ede-cfb64 | ||
| 643 | : DES-EDE-CFB : des-ede-cfb | ||
| 644 | !Cname des-ede3-cfb64 | ||
| 645 | : DES-EDE3-CFB : des-ede3-cfb | ||
| 646 | !Cname des-ede-ofb64 | ||
| 647 | : DES-EDE-OFB : des-ede-ofb | ||
| 648 | !Cname des-ede3-ofb64 | ||
| 649 | : DES-EDE3-OFB : des-ede3-ofb | ||
| 650 | : DESX-CBC : desx-cbc | ||
| 651 | algorithm 18 : SHA : sha | ||
| 652 | algorithm 26 : SHA1 : sha1 | ||
| 653 | !Cname dsaWithSHA1-2 | ||
| 654 | algorithm 27 : DSA-SHA1-old : dsaWithSHA1-old | ||
| 655 | algorithm 29 : RSA-SHA1-2 : sha1WithRSA | ||
| 656 | |||
| 657 | 1 3 36 3 2 1 : RIPEMD160 : ripemd160 | ||
| 658 | 1 3 36 3 3 1 2 : RSA-RIPEMD160 : ripemd160WithRSA | ||
| 659 | |||
| 660 | !Cname sxnet | ||
| 661 | 1 3 101 1 4 1 : SXNetID : Strong Extranet ID | ||
| 662 | |||
| 663 | 2 5 : X500 : directory services (X.500) | ||
| 664 | |||
| 665 | X500 4 : X509 | ||
| 666 | X509 3 : CN : commonName | ||
| 667 | X509 4 : SN : surname | ||
| 668 | X509 5 : : serialNumber | ||
| 669 | X509 6 : C : countryName | ||
| 670 | X509 7 : L : localityName | ||
| 671 | X509 8 : ST : stateOrProvinceName | ||
| 672 | X509 9 : street : streetAddress | ||
| 673 | X509 10 : O : organizationName | ||
| 674 | X509 11 : OU : organizationalUnitName | ||
| 675 | X509 12 : title : title | ||
| 676 | X509 13 : : description | ||
| 677 | X509 14 : : searchGuide | ||
| 678 | X509 15 : : businessCategory | ||
| 679 | X509 16 : : postalAddress | ||
| 680 | X509 17 : : postalCode | ||
| 681 | X509 18 : : postOfficeBox | ||
| 682 | X509 19 : : physicalDeliveryOfficeName | ||
| 683 | X509 20 : : telephoneNumber | ||
| 684 | X509 21 : : telexNumber | ||
| 685 | X509 22 : : teletexTerminalIdentifier | ||
| 686 | X509 23 : : facsimileTelephoneNumber | ||
| 687 | X509 24 : : x121Address | ||
| 688 | X509 25 : : internationaliSDNNumber | ||
| 689 | X509 26 : : registeredAddress | ||
| 690 | X509 27 : : destinationIndicator | ||
| 691 | X509 28 : : preferredDeliveryMethod | ||
| 692 | X509 29 : : presentationAddress | ||
| 693 | X509 30 : : supportedApplicationContext | ||
| 694 | X509 31 : member : | ||
| 695 | X509 32 : owner : | ||
| 696 | X509 33 : : roleOccupant | ||
| 697 | X509 34 : seeAlso : | ||
| 698 | X509 35 : : userPassword | ||
| 699 | X509 36 : : userCertificate | ||
| 700 | X509 37 : : cACertificate | ||
| 701 | X509 38 : : authorityRevocationList | ||
| 702 | X509 39 : : certificateRevocationList | ||
| 703 | X509 40 : : crossCertificatePair | ||
| 704 | X509 41 : name : name | ||
| 705 | X509 42 : GN : givenName | ||
| 706 | X509 43 : initials : initials | ||
| 707 | X509 44 : : generationQualifier | ||
| 708 | X509 45 : : x500UniqueIdentifier | ||
| 709 | X509 46 : dnQualifier : dnQualifier | ||
| 710 | X509 47 : : enhancedSearchGuide | ||
| 711 | X509 48 : : protocolInformation | ||
| 712 | X509 49 : : distinguishedName | ||
| 713 | X509 50 : : uniqueMember | ||
| 714 | X509 51 : : houseIdentifier | ||
| 715 | X509 52 : : supportedAlgorithms | ||
| 716 | X509 53 : : deltaRevocationList | ||
| 717 | X509 54 : dmdName : | ||
| 718 | X509 65 : : pseudonym | ||
| 719 | X509 72 : role : role | ||
| 720 | |||
| 721 | X500 8 : X500algorithms : directory services - algorithms | ||
| 722 | X500algorithms 1 1 : RSA : rsa | ||
| 723 | X500algorithms 3 100 : RSA-MDC2 : mdc2WithRSA | ||
| 724 | X500algorithms 3 101 : MDC2 : mdc2 | ||
| 725 | |||
| 726 | X500 29 : id-ce | ||
| 727 | !Cname subject-directory-attributes | ||
| 728 | id-ce 9 : subjectDirectoryAttributes : X509v3 Subject Directory Attributes | ||
| 729 | !Cname subject-key-identifier | ||
| 730 | id-ce 14 : subjectKeyIdentifier : X509v3 Subject Key Identifier | ||
| 731 | !Cname key-usage | ||
| 732 | id-ce 15 : keyUsage : X509v3 Key Usage | ||
| 733 | !Cname private-key-usage-period | ||
| 734 | id-ce 16 : privateKeyUsagePeriod : X509v3 Private Key Usage Period | ||
| 735 | !Cname subject-alt-name | ||
| 736 | id-ce 17 : subjectAltName : X509v3 Subject Alternative Name | ||
| 737 | !Cname issuer-alt-name | ||
| 738 | id-ce 18 : issuerAltName : X509v3 Issuer Alternative Name | ||
| 739 | !Cname basic-constraints | ||
| 740 | id-ce 19 : basicConstraints : X509v3 Basic Constraints | ||
| 741 | !Cname crl-number | ||
| 742 | id-ce 20 : crlNumber : X509v3 CRL Number | ||
| 743 | !Cname crl-reason | ||
| 744 | id-ce 21 : CRLReason : X509v3 CRL Reason Code | ||
| 745 | !Cname invalidity-date | ||
| 746 | id-ce 24 : invalidityDate : Invalidity Date | ||
| 747 | !Cname delta-crl | ||
| 748 | id-ce 27 : deltaCRL : X509v3 Delta CRL Indicator | ||
| 749 | !Cname issuing-distribution-point | ||
| 750 | id-ce 28 : issuingDistributionPoint : X509v3 Issuing Distrubution Point | ||
| 751 | !Cname certificate-issuer | ||
| 752 | id-ce 29 : certificateIssuer : X509v3 Certificate Issuer | ||
| 753 | !Cname name-constraints | ||
| 754 | id-ce 30 : nameConstraints : X509v3 Name Constraints | ||
| 755 | !Cname crl-distribution-points | ||
| 756 | id-ce 31 : crlDistributionPoints : X509v3 CRL Distribution Points | ||
| 757 | !Cname certificate-policies | ||
| 758 | id-ce 32 : certificatePolicies : X509v3 Certificate Policies | ||
| 759 | !Cname any-policy | ||
| 760 | certificate-policies 0 : anyPolicy : X509v3 Any Policy | ||
| 761 | !Cname policy-mappings | ||
| 762 | id-ce 33 : policyMappings : X509v3 Policy Mappings | ||
| 763 | !Cname authority-key-identifier | ||
| 764 | id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier | ||
| 765 | !Cname policy-constraints | ||
| 766 | id-ce 36 : policyConstraints : X509v3 Policy Constraints | ||
| 767 | !Cname ext-key-usage | ||
| 768 | id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage | ||
| 769 | !Cname freshest-crl | ||
| 770 | id-ce 46 : freshestCRL : X509v3 Freshest CRL | ||
| 771 | !Cname inhibit-any-policy | ||
| 772 | id-ce 54 : inhibitAnyPolicy : X509v3 Inhibit Any Policy | ||
| 773 | !Cname target-information | ||
| 774 | id-ce 55 : targetInformation : X509v3 AC Targeting | ||
| 775 | !Cname no-rev-avail | ||
| 776 | id-ce 56 : noRevAvail : X509v3 No Revocation Available | ||
| 777 | |||
| 778 | # From RFC5280 | ||
| 779 | ext-key-usage 0 : anyExtendedKeyUsage : Any Extended Key Usage | ||
| 780 | |||
| 781 | |||
| 782 | !Cname netscape | ||
| 783 | 2 16 840 1 113730 : Netscape : Netscape Communications Corp. | ||
| 784 | !Cname netscape-cert-extension | ||
| 785 | netscape 1 : nsCertExt : Netscape Certificate Extension | ||
| 786 | !Cname netscape-data-type | ||
| 787 | netscape 2 : nsDataType : Netscape Data Type | ||
| 788 | !Cname netscape-cert-type | ||
| 789 | netscape-cert-extension 1 : nsCertType : Netscape Cert Type | ||
| 790 | !Cname netscape-base-url | ||
| 791 | netscape-cert-extension 2 : nsBaseUrl : Netscape Base Url | ||
| 792 | !Cname netscape-revocation-url | ||
| 793 | netscape-cert-extension 3 : nsRevocationUrl : Netscape Revocation Url | ||
| 794 | !Cname netscape-ca-revocation-url | ||
| 795 | netscape-cert-extension 4 : nsCaRevocationUrl : Netscape CA Revocation Url | ||
| 796 | !Cname netscape-renewal-url | ||
| 797 | netscape-cert-extension 7 : nsRenewalUrl : Netscape Renewal Url | ||
| 798 | !Cname netscape-ca-policy-url | ||
| 799 | netscape-cert-extension 8 : nsCaPolicyUrl : Netscape CA Policy Url | ||
| 800 | !Cname netscape-ssl-server-name | ||
| 801 | netscape-cert-extension 12 : nsSslServerName : Netscape SSL Server Name | ||
| 802 | !Cname netscape-comment | ||
| 803 | netscape-cert-extension 13 : nsComment : Netscape Comment | ||
| 804 | !Cname netscape-cert-sequence | ||
| 805 | netscape-data-type 5 : nsCertSequence : Netscape Certificate Sequence | ||
| 806 | !Cname ns-sgc | ||
| 807 | netscape 4 1 : nsSGC : Netscape Server Gated Crypto | ||
| 808 | |||
| 809 | # iso(1) | ||
| 810 | iso 3 : ORG : org | ||
| 811 | org 6 : DOD : dod | ||
| 812 | dod 1 : IANA : iana | ||
| 813 | !Alias internet iana | ||
| 814 | |||
| 815 | internet 1 : directory : Directory | ||
| 816 | internet 2 : mgmt : Management | ||
| 817 | internet 3 : experimental : Experimental | ||
| 818 | internet 4 : private : Private | ||
| 819 | internet 5 : security : Security | ||
| 820 | internet 6 : snmpv2 : SNMPv2 | ||
| 821 | # Documents refer to "internet 7" as "mail". This however leads to ambiguities | ||
| 822 | # with RFC2798, Section 9.1.3, where "mail" is defined as the short name for | ||
| 823 | # rfc822Mailbox. The short name is therefore here left out for a reason. | ||
| 824 | # Subclasses of "mail", e.g. "MIME MHS" don't consitute a problem, as | ||
| 825 | # references are realized via long name "Mail" (with capital M). | ||
| 826 | internet 7 : : Mail | ||
| 827 | |||
| 828 | Private 1 : enterprises : Enterprises | ||
| 829 | |||
| 830 | # RFC 2247 | ||
| 831 | Enterprises 1466 344 : dcobject : dcObject | ||
| 832 | |||
| 833 | # RFC 1495 | ||
| 834 | Mail 1 : mime-mhs : MIME MHS | ||
| 835 | mime-mhs 1 : mime-mhs-headings : mime-mhs-headings | ||
| 836 | mime-mhs 2 : mime-mhs-bodies : mime-mhs-bodies | ||
| 837 | mime-mhs-headings 1 : id-hex-partial-message : id-hex-partial-message | ||
| 838 | mime-mhs-headings 2 : id-hex-multipart-message : id-hex-multipart-message | ||
| 839 | |||
| 840 | # What the hell are these OIDs, really? | ||
| 841 | !Cname rle-compression | ||
| 842 | 1 1 1 1 666 1 : RLE : run length compression | ||
| 843 | !Cname zlib-compression | ||
| 844 | id-smime-alg 8 : ZLIB : zlib compression | ||
| 845 | |||
| 846 | # AES aka Rijndael | ||
| 847 | |||
| 848 | !Alias csor 2 16 840 1 101 3 | ||
| 849 | !Alias nistAlgorithms csor 4 | ||
| 850 | !Alias aes nistAlgorithms 1 | ||
| 851 | |||
| 852 | aes 1 : AES-128-ECB : aes-128-ecb | ||
| 853 | aes 2 : AES-128-CBC : aes-128-cbc | ||
| 854 | !Cname aes-128-ofb128 | ||
| 855 | aes 3 : AES-128-OFB : aes-128-ofb | ||
| 856 | !Cname aes-128-cfb128 | ||
| 857 | aes 4 : AES-128-CFB : aes-128-cfb | ||
| 858 | aes 5 : id-aes128-wrap | ||
| 859 | aes 6 : id-aes128-GCM : aes-128-gcm | ||
| 860 | aes 7 : id-aes128-CCM : aes-128-ccm | ||
| 861 | aes 8 : id-aes128-wrap-pad | ||
| 862 | |||
| 863 | aes 21 : AES-192-ECB : aes-192-ecb | ||
| 864 | aes 22 : AES-192-CBC : aes-192-cbc | ||
| 865 | !Cname aes-192-ofb128 | ||
| 866 | aes 23 : AES-192-OFB : aes-192-ofb | ||
| 867 | !Cname aes-192-cfb128 | ||
| 868 | aes 24 : AES-192-CFB : aes-192-cfb | ||
| 869 | aes 25 : id-aes192-wrap | ||
| 870 | aes 26 : id-aes192-GCM : aes-192-gcm | ||
| 871 | aes 27 : id-aes192-CCM : aes-192-ccm | ||
| 872 | aes 28 : id-aes192-wrap-pad | ||
| 873 | |||
| 874 | aes 41 : AES-256-ECB : aes-256-ecb | ||
| 875 | aes 42 : AES-256-CBC : aes-256-cbc | ||
| 876 | !Cname aes-256-ofb128 | ||
| 877 | aes 43 : AES-256-OFB : aes-256-ofb | ||
| 878 | !Cname aes-256-cfb128 | ||
| 879 | aes 44 : AES-256-CFB : aes-256-cfb | ||
| 880 | aes 45 : id-aes256-wrap | ||
| 881 | aes 46 : id-aes256-GCM : aes-256-gcm | ||
| 882 | aes 47 : id-aes256-CCM : aes-256-ccm | ||
| 883 | aes 48 : id-aes256-wrap-pad | ||
| 884 | |||
| 885 | # There are no OIDs for these modes... | ||
| 886 | |||
| 887 | : AES-128-CFB1 : aes-128-cfb1 | ||
| 888 | : AES-192-CFB1 : aes-192-cfb1 | ||
| 889 | : AES-256-CFB1 : aes-256-cfb1 | ||
| 890 | : AES-128-CFB8 : aes-128-cfb8 | ||
| 891 | : AES-192-CFB8 : aes-192-cfb8 | ||
| 892 | : AES-256-CFB8 : aes-256-cfb8 | ||
| 893 | : AES-128-CTR : aes-128-ctr | ||
| 894 | : AES-192-CTR : aes-192-ctr | ||
| 895 | : AES-256-CTR : aes-256-ctr | ||
| 896 | : AES-128-XTS : aes-128-xts | ||
| 897 | : AES-256-XTS : aes-256-xts | ||
| 898 | : DES-CFB1 : des-cfb1 | ||
| 899 | : DES-CFB8 : des-cfb8 | ||
| 900 | : DES-EDE3-CFB1 : des-ede3-cfb1 | ||
| 901 | : DES-EDE3-CFB8 : des-ede3-cfb8 | ||
| 902 | |||
| 903 | # OIDs for SHA224, SHA256, SHA385 and SHA512, according to x9.84. | ||
| 904 | !Alias nist_hashalgs nistAlgorithms 2 | ||
| 905 | nist_hashalgs 1 : SHA256 : sha256 | ||
| 906 | nist_hashalgs 2 : SHA384 : sha384 | ||
| 907 | nist_hashalgs 3 : SHA512 : sha512 | ||
| 908 | nist_hashalgs 4 : SHA224 : sha224 | ||
| 909 | |||
| 910 | # OIDs for dsa-with-sha224 and dsa-with-sha256 | ||
| 911 | !Alias dsa_with_sha2 nistAlgorithms 3 | ||
| 912 | dsa_with_sha2 1 : dsa_with_SHA224 | ||
| 913 | dsa_with_sha2 2 : dsa_with_SHA256 | ||
| 914 | |||
| 915 | # Hold instruction CRL entry extension | ||
| 916 | !Cname hold-instruction-code | ||
| 917 | id-ce 23 : holdInstructionCode : Hold Instruction Code | ||
| 918 | !Alias holdInstruction X9-57 2 | ||
| 919 | !Cname hold-instruction-none | ||
| 920 | holdInstruction 1 : holdInstructionNone : Hold Instruction None | ||
| 921 | !Cname hold-instruction-call-issuer | ||
| 922 | holdInstruction 2 : holdInstructionCallIssuer : Hold Instruction Call Issuer | ||
| 923 | !Cname hold-instruction-reject | ||
| 924 | holdInstruction 3 : holdInstructionReject : Hold Instruction Reject | ||
| 925 | |||
| 926 | # OID's from ITU-T. Most of this is defined in RFC 1274. A couple of | ||
| 927 | # them are also mentioned in RFC 2247 | ||
| 928 | itu-t 9 : data | ||
| 929 | data 2342 : pss | ||
| 930 | pss 19200300 : ucl | ||
| 931 | ucl 100 : pilot | ||
| 932 | pilot 1 : : pilotAttributeType | ||
| 933 | pilot 3 : : pilotAttributeSyntax | ||
| 934 | pilot 4 : : pilotObjectClass | ||
| 935 | pilot 10 : : pilotGroups | ||
| 936 | pilotAttributeSyntax 4 : : iA5StringSyntax | ||
| 937 | pilotAttributeSyntax 5 : : caseIgnoreIA5StringSyntax | ||
| 938 | pilotObjectClass 3 : : pilotObject | ||
| 939 | pilotObjectClass 4 : : pilotPerson | ||
| 940 | pilotObjectClass 5 : account | ||
| 941 | pilotObjectClass 6 : document | ||
| 942 | pilotObjectClass 7 : room | ||
| 943 | pilotObjectClass 9 : : documentSeries | ||
| 944 | pilotObjectClass 13 : domain : Domain | ||
| 945 | pilotObjectClass 14 : : rFC822localPart | ||
| 946 | pilotObjectClass 15 : : dNSDomain | ||
| 947 | pilotObjectClass 17 : : domainRelatedObject | ||
| 948 | pilotObjectClass 18 : : friendlyCountry | ||
| 949 | pilotObjectClass 19 : : simpleSecurityObject | ||
| 950 | pilotObjectClass 20 : : pilotOrganization | ||
| 951 | pilotObjectClass 21 : : pilotDSA | ||
| 952 | pilotObjectClass 22 : : qualityLabelledData | ||
| 953 | pilotAttributeType 1 : UID : userId | ||
| 954 | pilotAttributeType 2 : : textEncodedORAddress | ||
| 955 | pilotAttributeType 3 : mail : rfc822Mailbox | ||
| 956 | pilotAttributeType 4 : info | ||
| 957 | pilotAttributeType 5 : : favouriteDrink | ||
| 958 | pilotAttributeType 6 : : roomNumber | ||
| 959 | pilotAttributeType 7 : photo | ||
| 960 | pilotAttributeType 8 : : userClass | ||
| 961 | pilotAttributeType 9 : host | ||
| 962 | pilotAttributeType 10 : manager | ||
| 963 | pilotAttributeType 11 : : documentIdentifier | ||
| 964 | pilotAttributeType 12 : : documentTitle | ||
| 965 | pilotAttributeType 13 : : documentVersion | ||
| 966 | pilotAttributeType 14 : : documentAuthor | ||
| 967 | pilotAttributeType 15 : : documentLocation | ||
| 968 | pilotAttributeType 20 : : homeTelephoneNumber | ||
| 969 | pilotAttributeType 21 : secretary | ||
| 970 | pilotAttributeType 22 : : otherMailbox | ||
| 971 | pilotAttributeType 23 : : lastModifiedTime | ||
| 972 | pilotAttributeType 24 : : lastModifiedBy | ||
| 973 | pilotAttributeType 25 : DC : domainComponent | ||
| 974 | pilotAttributeType 26 : : aRecord | ||
| 975 | pilotAttributeType 27 : : pilotAttributeType27 | ||
| 976 | pilotAttributeType 28 : : mXRecord | ||
| 977 | pilotAttributeType 29 : : nSRecord | ||
| 978 | pilotAttributeType 30 : : sOARecord | ||
| 979 | pilotAttributeType 31 : : cNAMERecord | ||
| 980 | pilotAttributeType 37 : : associatedDomain | ||
| 981 | pilotAttributeType 38 : : associatedName | ||
| 982 | pilotAttributeType 39 : : homePostalAddress | ||
| 983 | pilotAttributeType 40 : : personalTitle | ||
| 984 | pilotAttributeType 41 : : mobileTelephoneNumber | ||
| 985 | pilotAttributeType 42 : : pagerTelephoneNumber | ||
| 986 | pilotAttributeType 43 : : friendlyCountryName | ||
| 987 | # The following clashes with 2.5.4.45, so commented away | ||
| 988 | #pilotAttributeType 44 : uid : uniqueIdentifier | ||
| 989 | pilotAttributeType 45 : : organizationalStatus | ||
| 990 | pilotAttributeType 46 : : janetMailbox | ||
| 991 | pilotAttributeType 47 : : mailPreferenceOption | ||
| 992 | pilotAttributeType 48 : : buildingName | ||
| 993 | pilotAttributeType 49 : : dSAQuality | ||
| 994 | pilotAttributeType 50 : : singleLevelQuality | ||
| 995 | pilotAttributeType 51 : : subtreeMinimumQuality | ||
| 996 | pilotAttributeType 52 : : subtreeMaximumQuality | ||
| 997 | pilotAttributeType 53 : : personalSignature | ||
| 998 | pilotAttributeType 54 : : dITRedirect | ||
| 999 | pilotAttributeType 55 : audio | ||
| 1000 | pilotAttributeType 56 : : documentPublisher | ||
| 1001 | |||
| 1002 | international-organizations 42 : id-set : Secure Electronic Transactions | ||
| 1003 | |||
| 1004 | id-set 0 : set-ctype : content types | ||
| 1005 | id-set 1 : set-msgExt : message extensions | ||
| 1006 | id-set 3 : set-attr | ||
| 1007 | id-set 5 : set-policy | ||
| 1008 | id-set 7 : set-certExt : certificate extensions | ||
| 1009 | id-set 8 : set-brand | ||
| 1010 | |||
| 1011 | set-ctype 0 : setct-PANData | ||
| 1012 | set-ctype 1 : setct-PANToken | ||
| 1013 | set-ctype 2 : setct-PANOnly | ||
| 1014 | set-ctype 3 : setct-OIData | ||
| 1015 | set-ctype 4 : setct-PI | ||
| 1016 | set-ctype 5 : setct-PIData | ||
| 1017 | set-ctype 6 : setct-PIDataUnsigned | ||
| 1018 | set-ctype 7 : setct-HODInput | ||
| 1019 | set-ctype 8 : setct-AuthResBaggage | ||
| 1020 | set-ctype 9 : setct-AuthRevReqBaggage | ||
| 1021 | set-ctype 10 : setct-AuthRevResBaggage | ||
| 1022 | set-ctype 11 : setct-CapTokenSeq | ||
| 1023 | set-ctype 12 : setct-PInitResData | ||
| 1024 | set-ctype 13 : setct-PI-TBS | ||
| 1025 | set-ctype 14 : setct-PResData | ||
| 1026 | set-ctype 16 : setct-AuthReqTBS | ||
| 1027 | set-ctype 17 : setct-AuthResTBS | ||
| 1028 | set-ctype 18 : setct-AuthResTBSX | ||
| 1029 | set-ctype 19 : setct-AuthTokenTBS | ||
| 1030 | set-ctype 20 : setct-CapTokenData | ||
| 1031 | set-ctype 21 : setct-CapTokenTBS | ||
| 1032 | set-ctype 22 : setct-AcqCardCodeMsg | ||
| 1033 | set-ctype 23 : setct-AuthRevReqTBS | ||
| 1034 | set-ctype 24 : setct-AuthRevResData | ||
| 1035 | set-ctype 25 : setct-AuthRevResTBS | ||
| 1036 | set-ctype 26 : setct-CapReqTBS | ||
| 1037 | set-ctype 27 : setct-CapReqTBSX | ||
| 1038 | set-ctype 28 : setct-CapResData | ||
| 1039 | set-ctype 29 : setct-CapRevReqTBS | ||
| 1040 | set-ctype 30 : setct-CapRevReqTBSX | ||
| 1041 | set-ctype 31 : setct-CapRevResData | ||
| 1042 | set-ctype 32 : setct-CredReqTBS | ||
| 1043 | set-ctype 33 : setct-CredReqTBSX | ||
| 1044 | set-ctype 34 : setct-CredResData | ||
| 1045 | set-ctype 35 : setct-CredRevReqTBS | ||
| 1046 | set-ctype 36 : setct-CredRevReqTBSX | ||
| 1047 | set-ctype 37 : setct-CredRevResData | ||
| 1048 | set-ctype 38 : setct-PCertReqData | ||
| 1049 | set-ctype 39 : setct-PCertResTBS | ||
| 1050 | set-ctype 40 : setct-BatchAdminReqData | ||
| 1051 | set-ctype 41 : setct-BatchAdminResData | ||
| 1052 | set-ctype 42 : setct-CardCInitResTBS | ||
| 1053 | set-ctype 43 : setct-MeAqCInitResTBS | ||
| 1054 | set-ctype 44 : setct-RegFormResTBS | ||
| 1055 | set-ctype 45 : setct-CertReqData | ||
| 1056 | set-ctype 46 : setct-CertReqTBS | ||
| 1057 | set-ctype 47 : setct-CertResData | ||
| 1058 | set-ctype 48 : setct-CertInqReqTBS | ||
| 1059 | set-ctype 49 : setct-ErrorTBS | ||
| 1060 | set-ctype 50 : setct-PIDualSignedTBE | ||
| 1061 | set-ctype 51 : setct-PIUnsignedTBE | ||
| 1062 | set-ctype 52 : setct-AuthReqTBE | ||
| 1063 | set-ctype 53 : setct-AuthResTBE | ||
| 1064 | set-ctype 54 : setct-AuthResTBEX | ||
| 1065 | set-ctype 55 : setct-AuthTokenTBE | ||
| 1066 | set-ctype 56 : setct-CapTokenTBE | ||
| 1067 | set-ctype 57 : setct-CapTokenTBEX | ||
| 1068 | set-ctype 58 : setct-AcqCardCodeMsgTBE | ||
| 1069 | set-ctype 59 : setct-AuthRevReqTBE | ||
| 1070 | set-ctype 60 : setct-AuthRevResTBE | ||
| 1071 | set-ctype 61 : setct-AuthRevResTBEB | ||
| 1072 | set-ctype 62 : setct-CapReqTBE | ||
| 1073 | set-ctype 63 : setct-CapReqTBEX | ||
| 1074 | set-ctype 64 : setct-CapResTBE | ||
| 1075 | set-ctype 65 : setct-CapRevReqTBE | ||
| 1076 | set-ctype 66 : setct-CapRevReqTBEX | ||
| 1077 | set-ctype 67 : setct-CapRevResTBE | ||
| 1078 | set-ctype 68 : setct-CredReqTBE | ||
| 1079 | set-ctype 69 : setct-CredReqTBEX | ||
| 1080 | set-ctype 70 : setct-CredResTBE | ||
| 1081 | set-ctype 71 : setct-CredRevReqTBE | ||
| 1082 | set-ctype 72 : setct-CredRevReqTBEX | ||
| 1083 | set-ctype 73 : setct-CredRevResTBE | ||
| 1084 | set-ctype 74 : setct-BatchAdminReqTBE | ||
| 1085 | set-ctype 75 : setct-BatchAdminResTBE | ||
| 1086 | set-ctype 76 : setct-RegFormReqTBE | ||
| 1087 | set-ctype 77 : setct-CertReqTBE | ||
| 1088 | set-ctype 78 : setct-CertReqTBEX | ||
| 1089 | set-ctype 79 : setct-CertResTBE | ||
| 1090 | set-ctype 80 : setct-CRLNotificationTBS | ||
| 1091 | set-ctype 81 : setct-CRLNotificationResTBS | ||
| 1092 | set-ctype 82 : setct-BCIDistributionTBS | ||
| 1093 | |||
| 1094 | set-msgExt 1 : setext-genCrypt : generic cryptogram | ||
| 1095 | set-msgExt 3 : setext-miAuth : merchant initiated auth | ||
| 1096 | set-msgExt 4 : setext-pinSecure | ||
| 1097 | set-msgExt 5 : setext-pinAny | ||
| 1098 | set-msgExt 7 : setext-track2 | ||
| 1099 | set-msgExt 8 : setext-cv : additional verification | ||
| 1100 | |||
| 1101 | set-policy 0 : set-policy-root | ||
| 1102 | |||
| 1103 | set-certExt 0 : setCext-hashedRoot | ||
| 1104 | set-certExt 1 : setCext-certType | ||
| 1105 | set-certExt 2 : setCext-merchData | ||
| 1106 | set-certExt 3 : setCext-cCertRequired | ||
| 1107 | set-certExt 4 : setCext-tunneling | ||
| 1108 | set-certExt 5 : setCext-setExt | ||
| 1109 | set-certExt 6 : setCext-setQualf | ||
| 1110 | set-certExt 7 : setCext-PGWYcapabilities | ||
| 1111 | set-certExt 8 : setCext-TokenIdentifier | ||
| 1112 | set-certExt 9 : setCext-Track2Data | ||
| 1113 | set-certExt 10 : setCext-TokenType | ||
| 1114 | set-certExt 11 : setCext-IssuerCapabilities | ||
| 1115 | |||
| 1116 | set-attr 0 : setAttr-Cert | ||
| 1117 | set-attr 1 : setAttr-PGWYcap : payment gateway capabilities | ||
| 1118 | set-attr 2 : setAttr-TokenType | ||
| 1119 | set-attr 3 : setAttr-IssCap : issuer capabilities | ||
| 1120 | |||
| 1121 | setAttr-Cert 0 : set-rootKeyThumb | ||
| 1122 | setAttr-Cert 1 : set-addPolicy | ||
| 1123 | |||
| 1124 | setAttr-TokenType 1 : setAttr-Token-EMV | ||
| 1125 | setAttr-TokenType 2 : setAttr-Token-B0Prime | ||
| 1126 | |||
| 1127 | setAttr-IssCap 3 : setAttr-IssCap-CVM | ||
| 1128 | setAttr-IssCap 4 : setAttr-IssCap-T2 | ||
| 1129 | setAttr-IssCap 5 : setAttr-IssCap-Sig | ||
| 1130 | |||
| 1131 | setAttr-IssCap-CVM 1 : setAttr-GenCryptgrm : generate cryptogram | ||
| 1132 | setAttr-IssCap-T2 1 : setAttr-T2Enc : encrypted track 2 | ||
| 1133 | setAttr-IssCap-T2 2 : setAttr-T2cleartxt : cleartext track 2 | ||
| 1134 | |||
| 1135 | setAttr-IssCap-Sig 1 : setAttr-TokICCsig : ICC or token signature | ||
| 1136 | setAttr-IssCap-Sig 2 : setAttr-SecDevSig : secure device signature | ||
| 1137 | |||
| 1138 | set-brand 1 : set-brand-IATA-ATA | ||
| 1139 | set-brand 30 : set-brand-Diners | ||
| 1140 | set-brand 34 : set-brand-AmericanExpress | ||
| 1141 | set-brand 35 : set-brand-JCB | ||
| 1142 | set-brand 4 : set-brand-Visa | ||
| 1143 | set-brand 5 : set-brand-MasterCard | ||
| 1144 | set-brand 6011 : set-brand-Novus | ||
| 1145 | |||
| 1146 | rsadsi 3 10 : DES-CDMF : des-cdmf | ||
| 1147 | rsadsi 1 1 6 : rsaOAEPEncryptionSET | ||
| 1148 | |||
| 1149 | : Oakley-EC2N-3 : ipsec3 | ||
| 1150 | : Oakley-EC2N-4 : ipsec4 | ||
| 1151 | |||
| 1152 | iso 0 10118 3 0 55 : whirlpool | ||
| 1153 | |||
| 1154 | # GOST OIDs | ||
| 1155 | |||
| 1156 | member-body 643 2 2 : cryptopro | ||
| 1157 | member-body 643 2 9 : cryptocom | ||
| 1158 | |||
| 1159 | cryptopro 3 : id-GostR3411-94-with-GostR3410-2001 : GOST R 34.11-94 with GOST R 34.10-2001 | ||
| 1160 | cryptopro 4 : id-GostR3411-94-with-GostR3410-94 : GOST R 34.11-94 with GOST R 34.10-94 | ||
| 1161 | !Cname id-GostR3411-94 | ||
| 1162 | cryptopro 9 : md_gost94 : GOST R 34.11-94 | ||
| 1163 | cryptopro 10 : id-HMACGostR3411-94 : HMAC GOST 34.11-94 | ||
| 1164 | !Cname id-GostR3410-2001 | ||
| 1165 | cryptopro 19 : gost2001 : GOST R 34.10-2001 | ||
| 1166 | !Cname id-GostR3410-94 | ||
| 1167 | cryptopro 20 : gost94 : GOST R 34.10-94 | ||
| 1168 | !Cname id-Gost28147-89 | ||
| 1169 | cryptopro 21 : gost89 : GOST 28147-89 | ||
| 1170 | : gost89-cnt | ||
| 1171 | !Cname id-Gost28147-89-MAC | ||
| 1172 | cryptopro 22 : gost-mac : GOST 28147-89 MAC | ||
| 1173 | !Cname id-GostR3411-94-prf | ||
| 1174 | cryptopro 23 : prf-gostr3411-94 : GOST R 34.11-94 PRF | ||
| 1175 | cryptopro 98 : id-GostR3410-2001DH : GOST R 34.10-2001 DH | ||
| 1176 | cryptopro 99 : id-GostR3410-94DH : GOST R 34.10-94 DH | ||
| 1177 | |||
| 1178 | cryptopro 14 1 : id-Gost28147-89-CryptoPro-KeyMeshing | ||
| 1179 | cryptopro 14 0 : id-Gost28147-89-None-KeyMeshing | ||
| 1180 | |||
| 1181 | # GOST parameter set OIDs | ||
| 1182 | |||
| 1183 | cryptopro 30 0 : id-GostR3411-94-TestParamSet | ||
| 1184 | cryptopro 30 1 : id-GostR3411-94-CryptoProParamSet | ||
| 1185 | |||
| 1186 | cryptopro 31 0 : id-Gost28147-89-TestParamSet | ||
| 1187 | cryptopro 31 1 : id-Gost28147-89-CryptoPro-A-ParamSet | ||
| 1188 | cryptopro 31 2 : id-Gost28147-89-CryptoPro-B-ParamSet | ||
| 1189 | cryptopro 31 3 : id-Gost28147-89-CryptoPro-C-ParamSet | ||
| 1190 | cryptopro 31 4 : id-Gost28147-89-CryptoPro-D-ParamSet | ||
| 1191 | cryptopro 31 5 : id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet | ||
| 1192 | cryptopro 31 6 : id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet | ||
| 1193 | cryptopro 31 7 : id-Gost28147-89-CryptoPro-RIC-1-ParamSet | ||
| 1194 | |||
| 1195 | cryptopro 32 0 : id-GostR3410-94-TestParamSet | ||
| 1196 | cryptopro 32 2 : id-GostR3410-94-CryptoPro-A-ParamSet | ||
| 1197 | cryptopro 32 3 : id-GostR3410-94-CryptoPro-B-ParamSet | ||
| 1198 | cryptopro 32 4 : id-GostR3410-94-CryptoPro-C-ParamSet | ||
| 1199 | cryptopro 32 5 : id-GostR3410-94-CryptoPro-D-ParamSet | ||
| 1200 | |||
| 1201 | cryptopro 33 1 : id-GostR3410-94-CryptoPro-XchA-ParamSet | ||
| 1202 | cryptopro 33 2 : id-GostR3410-94-CryptoPro-XchB-ParamSet | ||
| 1203 | cryptopro 33 3 : id-GostR3410-94-CryptoPro-XchC-ParamSet | ||
| 1204 | |||
| 1205 | cryptopro 35 0 : id-GostR3410-2001-TestParamSet | ||
| 1206 | cryptopro 35 1 : id-GostR3410-2001-CryptoPro-A-ParamSet | ||
| 1207 | cryptopro 35 2 : id-GostR3410-2001-CryptoPro-B-ParamSet | ||
| 1208 | cryptopro 35 3 : id-GostR3410-2001-CryptoPro-C-ParamSet | ||
| 1209 | |||
| 1210 | cryptopro 36 0 : id-GostR3410-2001-CryptoPro-XchA-ParamSet | ||
| 1211 | cryptopro 36 1 : id-GostR3410-2001-CryptoPro-XchB-ParamSet | ||
| 1212 | |||
| 1213 | id-GostR3410-94 1 : id-GostR3410-94-a | ||
| 1214 | id-GostR3410-94 2 : id-GostR3410-94-aBis | ||
| 1215 | id-GostR3410-94 3 : id-GostR3410-94-b | ||
| 1216 | id-GostR3410-94 4 : id-GostR3410-94-bBis | ||
| 1217 | |||
| 1218 | # Cryptocom LTD GOST OIDs | ||
| 1219 | |||
| 1220 | cryptocom 1 6 1 : id-Gost28147-89-cc : GOST 28147-89 Cryptocom ParamSet | ||
| 1221 | !Cname id-GostR3410-94-cc | ||
| 1222 | cryptocom 1 5 3 : gost94cc : GOST 34.10-94 Cryptocom | ||
| 1223 | !Cname id-GostR3410-2001-cc | ||
| 1224 | cryptocom 1 5 4 : gost2001cc : GOST 34.10-2001 Cryptocom | ||
| 1225 | |||
| 1226 | cryptocom 1 3 3 : id-GostR3411-94-with-GostR3410-94-cc : GOST R 34.11-94 with GOST R 34.10-94 Cryptocom | ||
| 1227 | cryptocom 1 3 4 : id-GostR3411-94-with-GostR3410-2001-cc : GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom | ||
| 1228 | |||
| 1229 | cryptocom 1 8 1 : id-GostR3410-2001-ParamSet-cc : GOST R 3410-2001 Parameter Set Cryptocom | ||
| 1230 | |||
| 1231 | # Definitions for Camellia cipher - CBC MODE | ||
| 1232 | |||
| 1233 | 1 2 392 200011 61 1 1 1 2 : CAMELLIA-128-CBC : camellia-128-cbc | ||
| 1234 | 1 2 392 200011 61 1 1 1 3 : CAMELLIA-192-CBC : camellia-192-cbc | ||
| 1235 | 1 2 392 200011 61 1 1 1 4 : CAMELLIA-256-CBC : camellia-256-cbc | ||
| 1236 | 1 2 392 200011 61 1 1 3 2 : id-camellia128-wrap | ||
| 1237 | 1 2 392 200011 61 1 1 3 3 : id-camellia192-wrap | ||
| 1238 | 1 2 392 200011 61 1 1 3 4 : id-camellia256-wrap | ||
| 1239 | |||
| 1240 | # Definitions for Camellia cipher - ECB, CFB, OFB MODE | ||
| 1241 | |||
| 1242 | !Alias ntt-ds 0 3 4401 5 | ||
| 1243 | !Alias camellia ntt-ds 3 1 9 | ||
| 1244 | |||
| 1245 | camellia 1 : CAMELLIA-128-ECB : camellia-128-ecb | ||
| 1246 | !Cname camellia-128-ofb128 | ||
| 1247 | camellia 3 : CAMELLIA-128-OFB : camellia-128-ofb | ||
| 1248 | !Cname camellia-128-cfb128 | ||
| 1249 | camellia 4 : CAMELLIA-128-CFB : camellia-128-cfb | ||
| 1250 | |||
| 1251 | camellia 21 : CAMELLIA-192-ECB : camellia-192-ecb | ||
| 1252 | !Cname camellia-192-ofb128 | ||
| 1253 | camellia 23 : CAMELLIA-192-OFB : camellia-192-ofb | ||
| 1254 | !Cname camellia-192-cfb128 | ||
| 1255 | camellia 24 : CAMELLIA-192-CFB : camellia-192-cfb | ||
| 1256 | |||
| 1257 | camellia 41 : CAMELLIA-256-ECB : camellia-256-ecb | ||
| 1258 | !Cname camellia-256-ofb128 | ||
| 1259 | camellia 43 : CAMELLIA-256-OFB : camellia-256-ofb | ||
| 1260 | !Cname camellia-256-cfb128 | ||
| 1261 | camellia 44 : CAMELLIA-256-CFB : camellia-256-cfb | ||
| 1262 | |||
| 1263 | # There are no OIDs for these modes... | ||
| 1264 | |||
| 1265 | : CAMELLIA-128-CFB1 : camellia-128-cfb1 | ||
| 1266 | : CAMELLIA-192-CFB1 : camellia-192-cfb1 | ||
| 1267 | : CAMELLIA-256-CFB1 : camellia-256-cfb1 | ||
| 1268 | : CAMELLIA-128-CFB8 : camellia-128-cfb8 | ||
| 1269 | : CAMELLIA-192-CFB8 : camellia-192-cfb8 | ||
| 1270 | : CAMELLIA-256-CFB8 : camellia-256-cfb8 | ||
| 1271 | |||
| 1272 | # Definitions for SEED cipher - ECB, CBC, OFB mode | ||
| 1273 | |||
| 1274 | member-body 410 200004 : KISA : kisa | ||
| 1275 | kisa 1 3 : SEED-ECB : seed-ecb | ||
| 1276 | kisa 1 4 : SEED-CBC : seed-cbc | ||
| 1277 | !Cname seed-cfb128 | ||
| 1278 | kisa 1 5 : SEED-CFB : seed-cfb | ||
| 1279 | !Cname seed-ofb128 | ||
| 1280 | kisa 1 6 : SEED-OFB : seed-ofb | ||
| 1281 | |||
| 1282 | # There is no OID that just denotes "HMAC" oddly enough... | ||
| 1283 | |||
| 1284 | : HMAC : hmac | ||
| 1285 | # Nor CMAC either | ||
| 1286 | : CMAC : cmac | ||
| 1287 | |||
| 1288 | # Synthetic composite ciphersuites | ||
| 1289 | : RC4-HMAC-MD5 : rc4-hmac-md5 | ||
| 1290 | : AES-128-CBC-HMAC-SHA1 : aes-128-cbc-hmac-sha1 | ||
| 1291 | : AES-192-CBC-HMAC-SHA1 : aes-192-cbc-hmac-sha1 | ||
| 1292 | : AES-256-CBC-HMAC-SHA1 : aes-256-cbc-hmac-sha1 | ||
diff --git a/src/lib/libcrypto/objects/objxref.pl b/src/lib/libcrypto/objects/objxref.pl new file mode 100644 index 0000000000..731d3ae22c --- /dev/null +++ b/src/lib/libcrypto/objects/objxref.pl | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | |||
| 5 | my %xref_tbl; | ||
| 6 | my %oid_tbl; | ||
| 7 | |||
| 8 | my ($mac_file, $xref_file) = @ARGV; | ||
| 9 | |||
| 10 | open(IN, $mac_file) || die "Can't open $mac_file"; | ||
| 11 | |||
| 12 | # Read in OID nid values for a lookup table. | ||
| 13 | |||
| 14 | while (<IN>) | ||
| 15 | { | ||
| 16 | chomp; | ||
| 17 | my ($name, $num) = /^(\S+)\s+(\S+)$/; | ||
| 18 | $oid_tbl{$name} = $num; | ||
| 19 | } | ||
| 20 | close IN; | ||
| 21 | |||
| 22 | open(IN, $xref_file) || die "Can't open $xref_file"; | ||
| 23 | |||
| 24 | my $ln = 1; | ||
| 25 | |||
| 26 | while (<IN>) | ||
| 27 | { | ||
| 28 | chomp; | ||
| 29 | s/#.*$//; | ||
| 30 | next if (/^\S*$/); | ||
| 31 | my ($xr, $p1, $p2) = /^(\S+)\s+(\S+)\s+(\S+)/; | ||
| 32 | check_oid($xr); | ||
| 33 | check_oid($p1); | ||
| 34 | check_oid($p2); | ||
| 35 | $xref_tbl{$xr} = [$p1, $p2, $ln]; | ||
| 36 | } | ||
| 37 | |||
| 38 | my @xrkeys = keys %xref_tbl; | ||
| 39 | |||
| 40 | my @srt1 = sort { $oid_tbl{$a} <=> $oid_tbl{$b}} @xrkeys; | ||
| 41 | |||
| 42 | for(my $i = 0; $i <= $#srt1; $i++) | ||
| 43 | { | ||
| 44 | $xref_tbl{$srt1[$i]}[2] = $i; | ||
| 45 | } | ||
| 46 | |||
| 47 | my @srt2 = sort | ||
| 48 | { | ||
| 49 | my$ap1 = $oid_tbl{$xref_tbl{$a}[0]}; | ||
| 50 | my$bp1 = $oid_tbl{$xref_tbl{$b}[0]}; | ||
| 51 | return $ap1 - $bp1 if ($ap1 != $bp1); | ||
| 52 | my$ap2 = $oid_tbl{$xref_tbl{$a}[1]}; | ||
| 53 | my$bp2 = $oid_tbl{$xref_tbl{$b}[1]}; | ||
| 54 | |||
| 55 | return $ap2 - $bp2; | ||
| 56 | } @xrkeys; | ||
| 57 | |||
| 58 | my $pname = $0; | ||
| 59 | |||
| 60 | $pname =~ s|^.[^/]/||; | ||
| 61 | |||
| 62 | print <<EOF; | ||
| 63 | /* AUTOGENERATED BY $pname, DO NOT EDIT */ | ||
| 64 | |||
| 65 | typedef struct | ||
| 66 | { | ||
| 67 | int sign_id; | ||
| 68 | int hash_id; | ||
| 69 | int pkey_id; | ||
| 70 | } nid_triple; | ||
| 71 | |||
| 72 | static const nid_triple sigoid_srt[] = | ||
| 73 | { | ||
| 74 | EOF | ||
| 75 | |||
| 76 | foreach (@srt1) | ||
| 77 | { | ||
| 78 | my $xr = $_; | ||
| 79 | my ($p1, $p2) = @{$xref_tbl{$_}}; | ||
| 80 | print "\t{NID_$xr, NID_$p1, NID_$p2},\n"; | ||
| 81 | } | ||
| 82 | |||
| 83 | print "\t};"; | ||
| 84 | print <<EOF; | ||
| 85 | |||
| 86 | |||
| 87 | static const nid_triple * const sigoid_srt_xref[] = | ||
| 88 | { | ||
| 89 | EOF | ||
| 90 | |||
| 91 | foreach (@srt2) | ||
| 92 | { | ||
| 93 | my $x = $xref_tbl{$_}[2]; | ||
| 94 | print "\t\&sigoid_srt\[$x\],\n"; | ||
| 95 | } | ||
| 96 | |||
| 97 | print "\t};\n\n"; | ||
| 98 | |||
| 99 | sub check_oid | ||
| 100 | { | ||
| 101 | my ($chk) = @_; | ||
| 102 | if (!exists $oid_tbl{$chk}) | ||
| 103 | { | ||
| 104 | die "Not Found \"$chk\"\n"; | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
