Initial experimental support for X9.42 DH parameter format to handle

RFC5114 parameters and X9.42 DH public and private keys.
(backport from HEAD)
This commit is contained in:
Dr. Stephen Henson
2012-04-07 20:22:11 +00:00
parent 4e891a191d
commit 491734eb21
14 changed files with 313 additions and 24 deletions

View File

@@ -62,12 +62,12 @@
* [including the GNU Public Licence.]
*/
#define NUM_NID 920
#define NUM_SN 913
#define NUM_LN 913
#define NUM_OBJ 857
#define NUM_NID 921
#define NUM_SN 914
#define NUM_LN 914
#define NUM_OBJ 858
static const unsigned char lvalues[5980]={
static const unsigned char lvalues[5987]={
0x00, /* [ 0] OBJ_undef */
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */
@@ -925,6 +925,7 @@ static const unsigned char lvalues[5980]={
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x08,/* [5952] OBJ_mgf1 */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x0A,/* [5961] OBJ_rsassaPss */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x07,/* [5970] OBJ_rsaesOaep */
0x2A,0x86,0x48,0xCE,0x3E,0x02,0x01, /* [5979] OBJ_dhpublicnumber */
};
static const ASN1_OBJECT nid_objs[NUM_NID]={
@@ -2406,6 +2407,7 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={
{"AES-256-CBC-HMAC-SHA1","aes-256-cbc-hmac-sha1",
NID_aes_256_cbc_hmac_sha1,0,NULL,0},
{"RSAES-OAEP","rsaesOaep",NID_rsaesOaep,9,&(lvalues[5970]),0},
{"dhpublicnumber","X9.42 DH",NID_dhpublicnumber,7,&(lvalues[5979]),0},
};
static const unsigned int sn_objs[NUM_SN]={
@@ -2675,6 +2677,7 @@ static const unsigned int sn_objs[NUM_SN]={
107, /* "description" */
871, /* "destinationIndicator" */
28, /* "dhKeyAgreement" */
920, /* "dhpublicnumber" */
382, /* "directory" */
887, /* "distinguishedName" */
892, /* "dmdName" */
@@ -3458,6 +3461,7 @@ static const unsigned int ln_objs[NUM_LN]={
85, /* "X509v3 Subject Alternative Name" */
769, /* "X509v3 Subject Directory Attributes" */
82, /* "X509v3 Subject Key Identifier" */
920, /* "X9.42 DH" */
184, /* "X9.57" */
185, /* "X9.57 CM ?" */
478, /* "aRecord" */
@@ -4615,6 +4619,7 @@ static const unsigned int obj_objs[NUM_OBJ]={
416, /* OBJ_ecdsa_with_SHA1 1 2 840 10045 4 1 */
791, /* OBJ_ecdsa_with_Recommended 1 2 840 10045 4 2 */
792, /* OBJ_ecdsa_with_Specified 1 2 840 10045 4 3 */
920, /* OBJ_dhpublicnumber 1 2 840 10046 2 1 */
258, /* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */
175, /* OBJ_id_pe 1 3 6 1 5 5 7 1 */
259, /* OBJ_id_qt 1 3 6 1 5 5 7 2 */