From 6b063f32d92d9784c3441f691f4e80e2bc81cfb1 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 1 Aug 2003 17:06:48 +0000 Subject: [PATCH] Make the EFB NIDs have empty OIDs aliased to the real EFB OID. --- crypto/evp/evp_lib.c | 24 +++++++++++++++ crypto/objects/obj_dat.h | 61 ++++++++++---------------------------- crypto/objects/obj_mac.h | 25 +--------------- crypto/objects/obj_mac.num | 5 +--- crypto/objects/objects.txt | 20 +++++-------- 5 files changed, 49 insertions(+), 86 deletions(-) diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index 52a3b287be..f14028dc31 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -133,6 +133,30 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx) return NID_rc4; + case NID_aes_128_cfb128: + case NID_aes_128_cfb8: + case NID_aes_128_cfb1: + + return NID_aes_128_cfb128; + + case NID_aes_192_cfb128: + case NID_aes_192_cfb8: + case NID_aes_192_cfb1: + + return NID_aes_192_cfb128; + + case NID_aes_256_cfb128: + case NID_aes_256_cfb8: + case NID_aes_256_cfb1: + + return NID_aes_256_cfb128; + + case NID_des_cfb64: + case NID_des_cfb8: + case NID_des_cfb1: + + return NID_des_cfb64; + default: /* Check it has an OID and it is valid */ otmp = OBJ_nid2obj(nid); diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h index d85c2fe779..08a9928e96 100644 --- a/crypto/objects/obj_dat.h +++ b/crypto/objects/obj_dat.h @@ -62,12 +62,12 @@ * [including the GNU Public Licence.] */ -#define NUM_NID 661 -#define NUM_SN 654 -#define NUM_LN 654 -#define NUM_OBJ 628 +#define NUM_NID 658 +#define NUM_SN 651 +#define NUM_LN 651 +#define NUM_OBJ 617 -static unsigned char lvalues[4559]={ +static unsigned char lvalues[4455]={ 0x00, /* [ 0] OBJ_undef */ 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ @@ -685,17 +685,6 @@ static unsigned char lvalues[4559]={ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x06,/* [4425] OBJ_rsaOAEPEncryptionSET */ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x02,/* [4434] OBJ_ms_smartcard_login */ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x03,/* [4444] OBJ_ms_upn */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,0x01,/* [4454] OBJ_aes_128_cfb1 */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,0x02,/* [4464] OBJ_aes_192_cfb1 */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,0x03,/* [4474] OBJ_aes_256_cfb1 */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,0x04,/* [4484] OBJ_aes_128_cfb8 */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,0x05,/* [4494] OBJ_aes_192_cfb8 */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,0x06,/* [4504] OBJ_aes_256_cfb8 */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,0x07,/* [4514] OBJ_des_cfb1 */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17, /* [4524] OBJ_shmoo */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01, /* [4531] OBJ_ben */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,/* [4539] OBJ_openssl */ -0x2B,0x06,0x01,0x04,0x01,0xEF,0x17,0x01,0x01,0x08,/* [4548] OBJ_des_cfb8 */ }; static ASN1_OBJECT nid_objs[NUM_NID]={ @@ -1739,17 +1728,14 @@ static ASN1_OBJECT nid_objs[NUM_NID]={ 10,&(lvalues[4434]),0}, {"msUPN","Microsoft Universal Principal Name",NID_ms_upn,10, &(lvalues[4444]),0}, -{"AES-128-CFB1","aes-128-cfb1",NID_aes_128_cfb1,10,&(lvalues[4454]),0}, -{"AES-192-CFB1","aes-192-cfb1",NID_aes_192_cfb1,10,&(lvalues[4464]),0}, -{"AES-256-CFB1","aes-256-cfb1",NID_aes_256_cfb1,10,&(lvalues[4474]),0}, -{"AES-128-CFB8","aes-128-cfb8",NID_aes_128_cfb8,10,&(lvalues[4484]),0}, -{"AES-192-CFB8","aes-192-cfb8",NID_aes_192_cfb8,10,&(lvalues[4494]),0}, -{"AES-256-CFB8","aes-256-cfb8",NID_aes_256_cfb8,10,&(lvalues[4504]),0}, -{"DES-CFB1","des-cfb1",NID_des_cfb1,10,&(lvalues[4514]),0}, -{"SHMOO","shmoo",NID_shmoo,7,&(lvalues[4524]),0}, -{"BEN","ben",NID_ben,8,&(lvalues[4531]),0}, -{"OpenSSL","openssl",NID_openssl,9,&(lvalues[4539]),0}, -{"DES-CFB8","des-cfb8",NID_des_cfb8,10,&(lvalues[4548]),0}, +{"AES-128-CFB1","aes-128-cfb1",NID_aes_128_cfb1,0,NULL}, +{"AES-192-CFB1","aes-192-cfb1",NID_aes_192_cfb1,0,NULL}, +{"AES-256-CFB1","aes-256-cfb1",NID_aes_256_cfb1,0,NULL}, +{"AES-128-CFB8","aes-128-cfb8",NID_aes_128_cfb8,0,NULL}, +{"AES-192-CFB8","aes-192-cfb8",NID_aes_192_cfb8,0,NULL}, +{"AES-256-CFB8","aes-256-cfb8",NID_aes_256_cfb8,0,NULL}, +{"DES-CFB1","des-cfb1",NID_des_cfb1,0,NULL}, +{"DES-CFB8","des-cfb8",NID_des_cfb8,0,NULL}, }; static ASN1_OBJECT *sn_objs[NUM_SN]={ @@ -1772,7 +1758,6 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[655]),/* "AES-256-CFB8" */ &(nid_objs[426]),/* "AES-256-ECB" */ &(nid_objs[428]),/* "AES-256-OFB" */ -&(nid_objs[658]),/* "BEN" */ &(nid_objs[91]),/* "BF-CBC" */ &(nid_objs[93]),/* "BF-CFB" */ &(nid_objs[92]),/* "BF-ECB" */ @@ -1792,7 +1777,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[643]),/* "DES-CDMF" */ &(nid_objs[30]),/* "DES-CFB" */ &(nid_objs[656]),/* "DES-CFB1" */ -&(nid_objs[660]),/* "DES-CFB8" */ +&(nid_objs[657]),/* "DES-CFB8" */ &(nid_objs[29]),/* "DES-ECB" */ &(nid_objs[32]),/* "DES-EDE" */ &(nid_objs[43]),/* "DES-EDE-CBC" */ @@ -1834,7 +1819,6 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[180]),/* "OCSPSigning" */ &(nid_objs[379]),/* "ORG" */ &(nid_objs[18]),/* "OU" */ -&(nid_objs[659]),/* "OpenSSL" */ &(nid_objs[ 9]),/* "PBE-MD2-DES" */ &(nid_objs[168]),/* "PBE-MD2-RC2-64" */ &(nid_objs[10]),/* "PBE-MD5-DES" */ @@ -1877,7 +1861,6 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[115]),/* "RSA-SHA1-2" */ &(nid_objs[41]),/* "SHA" */ &(nid_objs[64]),/* "SHA1" */ -&(nid_objs[657]),/* "SHMOO" */ &(nid_objs[188]),/* "SMIME" */ &(nid_objs[167]),/* "SMIME-CAPS" */ &(nid_objs[100]),/* "SN" */ @@ -2538,7 +2521,6 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[484]),/* "associatedDomain" */ &(nid_objs[485]),/* "associatedName" */ &(nid_objs[501]),/* "audio" */ -&(nid_objs[658]),/* "ben" */ &(nid_objs[91]),/* "bf-cbc" */ &(nid_objs[93]),/* "bf-cfb" */ &(nid_objs[92]),/* "bf-ecb" */ @@ -2572,7 +2554,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[643]),/* "des-cdmf" */ &(nid_objs[30]),/* "des-cfb" */ &(nid_objs[656]),/* "des-cfb1" */ -&(nid_objs[660]),/* "des-cfb8" */ +&(nid_objs[657]),/* "des-cfb8" */ &(nid_objs[29]),/* "des-ecb" */ &(nid_objs[32]),/* "des-ede" */ &(nid_objs[43]),/* "des-ede-cbc" */ @@ -2827,7 +2809,6 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[488]),/* "mobileTelephoneNumber" */ &(nid_objs[481]),/* "nSRecord" */ &(nid_objs[173]),/* "name" */ -&(nid_objs[659]),/* "openssl" */ &(nid_objs[379]),/* "org" */ &(nid_objs[17]),/* "organizationName" */ &(nid_objs[491]),/* "organizationalStatus" */ @@ -3042,7 +3023,6 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[115]),/* "sha1WithRSA" */ &(nid_objs[65]),/* "sha1WithRSAEncryption" */ &(nid_objs[42]),/* "shaWithRSAEncryption" */ -&(nid_objs[657]),/* "shmoo" */ &(nid_objs[52]),/* "signingTime" */ &(nid_objs[454]),/* "simpleSecurityObject" */ &(nid_objs[496]),/* "singleLevelQuality" */ @@ -3301,7 +3281,6 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[407]),/* OBJ_X9_62_characteristic_two_field 1 2 840 10045 1 2 */ &(nid_objs[408]),/* OBJ_X9_62_id_ecPublicKey 1 2 840 10045 2 1 */ &(nid_objs[416]),/* OBJ_ecdsa_with_SHA1 1 2 840 10045 4 1 */ -&(nid_objs[657]),/* OBJ_shmoo 1 3 6 1 4 1 14231 */ &(nid_objs[258]),/* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */ &(nid_objs[175]),/* OBJ_id_pe 1 3 6 1 5 5 7 1 */ &(nid_objs[259]),/* OBJ_id_qt 1 3 6 1 5 5 7 2 */ @@ -3341,7 +3320,6 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[413]),/* OBJ_X9_62_prime239v2 1 2 840 10045 3 1 5 */ &(nid_objs[414]),/* OBJ_X9_62_prime239v3 1 2 840 10045 3 1 6 */ &(nid_objs[415]),/* OBJ_X9_62_prime256v1 1 2 840 10045 3 1 7 */ -&(nid_objs[658]),/* OBJ_ben 1 3 6 1 4 1 14231 1 */ &(nid_objs[269]),/* OBJ_id_pkix1_explicit_88 1 3 6 1 5 5 7 0 1 */ &(nid_objs[270]),/* OBJ_id_pkix1_implicit_88 1 3 6 1 5 5 7 0 2 */ &(nid_objs[271]),/* OBJ_id_pkix1_explicit_93 1 3 6 1 5 5 7 0 3 */ @@ -3490,7 +3468,6 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[417]),/* OBJ_ms_csp_name 1 3 6 1 4 1 311 17 1 */ &(nid_objs[390]),/* OBJ_dcObject 1 3 6 1 4 1 1466 344 */ &(nid_objs[91]),/* OBJ_bf_cbc 1 3 6 1 4 1 3029 1 2 */ -&(nid_objs[659]),/* OBJ_openssl 1 3 6 1 4 1 14231 1 1 */ &(nid_objs[315]),/* OBJ_id_regCtrl_regToken 1 3 6 1 5 5 7 5 1 1 */ &(nid_objs[316]),/* OBJ_id_regCtrl_authenticator 1 3 6 1 5 5 7 5 1 2 */ &(nid_objs[317]),/* OBJ_id_regCtrl_pkiPublicationInfo 1 3 6 1 5 5 7 5 1 3 */ @@ -3619,14 +3596,6 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[138]),/* OBJ_ms_efs 1 3 6 1 4 1 311 10 3 4 */ &(nid_objs[648]),/* OBJ_ms_smartcard_login 1 3 6 1 4 1 311 20 2 2 */ &(nid_objs[649]),/* OBJ_ms_upn 1 3 6 1 4 1 311 20 2 3 */ -&(nid_objs[650]),/* OBJ_aes_128_cfb1 1 3 6 1 4 1 14231 1 1 1 */ -&(nid_objs[651]),/* OBJ_aes_192_cfb1 1 3 6 1 4 1 14231 1 1 2 */ -&(nid_objs[652]),/* OBJ_aes_256_cfb1 1 3 6 1 4 1 14231 1 1 3 */ -&(nid_objs[653]),/* OBJ_aes_128_cfb8 1 3 6 1 4 1 14231 1 1 4 */ -&(nid_objs[654]),/* OBJ_aes_192_cfb8 1 3 6 1 4 1 14231 1 1 5 */ -&(nid_objs[655]),/* OBJ_aes_256_cfb8 1 3 6 1 4 1 14231 1 1 6 */ -&(nid_objs[656]),/* OBJ_des_cfb1 1 3 6 1 4 1 14231 1 1 7 */ -&(nid_objs[660]),/* OBJ_des_cfb8 1 3 6 1 4 1 14231 1 1 8 */ &(nid_objs[196]),/* OBJ_id_smime_mod_cms 1 2 840 113549 1 9 16 0 1 */ &(nid_objs[197]),/* OBJ_id_smime_mod_ess 1 2 840 113549 1 9 16 0 2 */ &(nid_objs[198]),/* OBJ_id_smime_mod_oid 1 2 840 113549 1 9 16 0 3 */ diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h index 84b4fb196b..04ee272ffe 100644 --- a/crypto/objects/obj_mac.h +++ b/crypto/objects/obj_mac.h @@ -2009,60 +2009,37 @@ #define NID_aes_256_cfb128 429 #define OBJ_aes_256_cfb128 OBJ_aes,44L -#define SN_shmoo "SHMOO" -#define LN_shmoo "shmoo" -#define NID_shmoo 657 -#define OBJ_shmoo 1L,3L,6L,1L,4L,1L,14231L - -#define SN_ben "BEN" -#define LN_ben "ben" -#define NID_ben 658 -#define OBJ_ben OBJ_shmoo,1L - -#define SN_openssl "OpenSSL" -#define LN_openssl "openssl" -#define NID_openssl 659 -#define OBJ_openssl OBJ_ben,1L - #define SN_aes_128_cfb1 "AES-128-CFB1" #define LN_aes_128_cfb1 "aes-128-cfb1" #define NID_aes_128_cfb1 650 -#define OBJ_aes_128_cfb1 OBJ_openssl,1L #define SN_aes_192_cfb1 "AES-192-CFB1" #define LN_aes_192_cfb1 "aes-192-cfb1" #define NID_aes_192_cfb1 651 -#define OBJ_aes_192_cfb1 OBJ_openssl,2L #define SN_aes_256_cfb1 "AES-256-CFB1" #define LN_aes_256_cfb1 "aes-256-cfb1" #define NID_aes_256_cfb1 652 -#define OBJ_aes_256_cfb1 OBJ_openssl,3L #define SN_aes_128_cfb8 "AES-128-CFB8" #define LN_aes_128_cfb8 "aes-128-cfb8" #define NID_aes_128_cfb8 653 -#define OBJ_aes_128_cfb8 OBJ_openssl,4L #define SN_aes_192_cfb8 "AES-192-CFB8" #define LN_aes_192_cfb8 "aes-192-cfb8" #define NID_aes_192_cfb8 654 -#define OBJ_aes_192_cfb8 OBJ_openssl,5L #define SN_aes_256_cfb8 "AES-256-CFB8" #define LN_aes_256_cfb8 "aes-256-cfb8" #define NID_aes_256_cfb8 655 -#define OBJ_aes_256_cfb8 OBJ_openssl,6L #define SN_des_cfb1 "DES-CFB1" #define LN_des_cfb1 "des-cfb1" #define NID_des_cfb1 656 -#define OBJ_des_cfb1 OBJ_openssl,7L #define SN_des_cfb8 "DES-CFB8" #define LN_des_cfb8 "des-cfb8" -#define NID_des_cfb8 660 -#define OBJ_des_cfb8 OBJ_openssl,8L +#define NID_des_cfb8 657 #define SN_hold_instruction_code "holdInstructionCode" #define LN_hold_instruction_code "Hold Instruction Code" diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num index 82d261d1b3..091a9a4eb7 100644 --- a/crypto/objects/obj_mac.num +++ b/crypto/objects/obj_mac.num @@ -654,7 +654,4 @@ aes_128_cfb8 653 aes_192_cfb8 654 aes_256_cfb8 655 des_cfb1 656 -shmoo 657 -ben 658 -openssl 659 -des_cfb8 660 +des_cfb8 657 diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt index b981ba7b11..5299d7b3aa 100644 --- a/crypto/objects/objects.txt +++ b/crypto/objects/objects.txt @@ -681,20 +681,16 @@ aes 43 : AES-256-OFB : aes-256-ofb !Cname aes-256-cfb128 aes 44 : AES-256-CFB : aes-256-cfb -1 3 6 1 4 1 14231 : SHMOO : shmoo -shmoo 1 : BEN : ben -ben 1 : OpenSSL : openssl - # There are no OIDs for these modes... -openssl 1 : AES-128-CFB1 : aes-128-cfb1 -openssl 2 : AES-192-CFB1 : aes-192-cfb1 -openssl 3 : AES-256-CFB1 : aes-256-cfb1 -openssl 4 : AES-128-CFB8 : aes-128-cfb8 -openssl 5 : AES-192-CFB8 : aes-192-cfb8 -openssl 6 : AES-256-CFB8 : aes-256-cfb8 -openssl 7 : DES-CFB1 : des-cfb1 -openssl 8 : DES-CFB8 : des-cfb8 + : AES-128-CFB1 : aes-128-cfb1 + : AES-192-CFB1 : aes-192-cfb1 + : AES-256-CFB1 : aes-256-cfb1 + : AES-128-CFB8 : aes-128-cfb8 + : AES-192-CFB8 : aes-192-cfb8 + : AES-256-CFB8 : aes-256-cfb8 + : DES-CFB1 : des-cfb1 + : DES-CFB8 : des-cfb8 # Hold instruction CRL entry extension !Cname hold-instruction-code -- 2.25.1