This is the beginning of PKCS#12 integration. This just adds the PKCS#12
authorDr. Stephen Henson <steve@openssl.org>
Sun, 28 Mar 1999 01:00:56 +0000 (01:00 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 28 Mar 1999 01:00:56 +0000 (01:00 +0000)
objects to objects.h

NOTE: during this integration it will not be possible to compile my PKCS#12
program against OpenSSL because there will be conflicts between the external
functionality and that being added to the core code.

CHANGES
crypto/objects/obj_dat.h
crypto/objects/objects.h

diff --git a/CHANGES b/CHANGES
index e02e748..92021d3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,11 @@
 
  Changes between 0.9.2b and 0.9.3
 
+  *) PKCS12 integration: and so it begins... First of several patches to
+     slowly integrate PKCS#12 functionality into OpenSSL. Add PKCS#12
+     objects to object.h
+     [Steve Henson]
+
   *) Add a new 'indent' option to some X509V3 extension code. Initial ASN1
      and display support for Thawte strong extranet extension.
      [Steve Henson]
index b5dd338..7964a9f 100644 (file)
  * perl obj_dat.pl < objects.h > obj_dat.h
  */
 
-#define NUM_NID 144
+#define NUM_NID 161
 #define NUM_SN 115
-#define NUM_LN 140
-#define NUM_OBJ 116
+#define NUM_LN 157
+#define NUM_OBJ 133
 
-static unsigned char lvalues[740]={
+static unsigned char lvalues[914]={
 0x00,                                        /* [  0] OBJ_undef */
 0x2A,0x86,0x48,0x86,0xF7,0x0D,               /* [  1] OBJ_rsadsi */
 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,          /* [  7] OBJ_pkcs */
@@ -183,6 +183,23 @@ static unsigned char lvalues[740]={
 0x55,0x1D,0x15,                              /* [728] OBJ_crl_reason */
 0x55,0x1D,0x18,                              /* [731] OBJ_invalidity_date */
 0x2B,0x65,0x01,0x04,0x01,                    /* [734] OBJ_sxnet */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x01,/* [739] OBJ_pbe_WithSHA1And128BitRC4 */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x02,/* [749] OBJ_pbe_WithSHA1And40BitRC4 */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x03,/* [759] OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x04,/* [769] OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x05,/* [779] OBJ_pbe_WithSHA1And128BitRC2_CBC */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x06,/* [789] OBJ_pbe_WithSHA1And40BitRC2_CBC */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x01,/* [799] OBJ_keyBag */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x02,/* [810] OBJ_pkcs8ShroudedKeyBag */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x03,/* [821] OBJ_certBag */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x04,/* [832] OBJ_crlBag */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x05,/* [843] OBJ_secretBag */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x06,/* [854] OBJ_safeContentsBag */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x14,/* [865] OBJ_friendlyName */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x15,/* [874] OBJ_localKeyID */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x01,/* [883] OBJ_x509Certificate */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x02,/* [893] OBJ_sdsiCertificate */
+0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x17,0x01,/* [903] OBJ_x509Crl */
 };
 
 static ASN1_OBJECT nid_objs[NUM_NID]={
@@ -382,6 +399,35 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"invalidityDate","Invalidity Date",NID_invalidity_date,3,
        &(lvalues[731]),0},
 {"SXNetID","Strong Extranet ID",NID_sxnet,5,&(lvalues[734]),0},
+{"pbeWithSHA1And128BitRC4","pbeWithSHA1And128BitRC4",
+       NID_pbe_WithSHA1And128BitRC4,10,&(lvalues[739]),0},
+{"pbeWithSHA1And40BitRC4","pbeWithSHA1And40BitRC4",
+       NID_pbe_WithSHA1And40BitRC4,10,&(lvalues[749]),0},
+{"pbeWithSHA1And3-KeyTripleDES-CBC",
+       "pbeWithSHA1And3-KeyTripleDES-CBC",
+       NID_pbe_WithSHA1And3_Key_TripleDES_CBC,10,&(lvalues[759]),0},
+{"pbeWithSHA1And2-KeyTripleDES-CBC",
+       "pbeWithSHA1And2-KeyTripleDES-CBC",
+       NID_pbe_WithSHA1And2_Key_TripleDES_CBC,10,&(lvalues[769]),0},
+{"pbeWithSHA1And128BitRC2-CBC","pbeWithSHA1And128BitRC2-CBC",
+       NID_pbe_WithSHA1And128BitRC2_CBC,10,&(lvalues[779]),0},
+{"pbeWithSHA1And40BitRC2-CBC","pbeWithSHA1And40BitRC2-CBC",
+       NID_pbe_WithSHA1And40BitRC2_CBC,10,&(lvalues[789]),0},
+{"keyBag","keyBag",NID_keyBag,11,&(lvalues[799]),0},
+{"pkcs8ShroudedKeyBag","pkcs8ShroudedKeyBag",NID_pkcs8ShroudedKeyBag,
+       11,&(lvalues[810]),0},
+{"certBag","certBag",NID_certBag,11,&(lvalues[821]),0},
+{"crlBag","crlBag",NID_crlBag,11,&(lvalues[832]),0},
+{"secretBag","secretBag",NID_secretBag,11,&(lvalues[843]),0},
+{"safeContentsBag","safeContentsBag",NID_safeContentsBag,11,
+       &(lvalues[854]),0},
+{"friendlyName","friendlyName",NID_friendlyName,9,&(lvalues[865]),0},
+{"localKeyID","localKeyID",NID_localKeyID,9,&(lvalues[874]),0},
+{"x509Certificate","x509Certificate",NID_x509Certificate,10,
+       &(lvalues[883]),0},
+{"sdsiCertificate","sdsiCertificate",NID_sdsiCertificate,10,
+       &(lvalues[893]),0},
+{"x509Crl","x509Crl",NID_x509Crl,10,&(lvalues[903]),0},
 };
 
 static ASN1_OBJECT *sn_objs[NUM_SN]={
@@ -551,11 +597,13 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
 &(nid_objs[110]),/* "cast5-cfb" */
 &(nid_objs[109]),/* "cast5-ecb" */
 &(nid_objs[111]),/* "cast5-ofb" */
+&(nid_objs[152]),/* "certBag" */
 &(nid_objs[54]),/* "challengePassword" */
 &(nid_objs[13]),/* "commonName" */
 &(nid_objs[50]),/* "contentType" */
 &(nid_objs[53]),/* "countersignature" */
 &(nid_objs[14]),/* "countryName" */
+&(nid_objs[153]),/* "crlBag" */
 &(nid_objs[31]),/* "des-cbc" */
 &(nid_objs[30]),/* "des-cfb" */
 &(nid_objs[29]),/* "des-ecb" */
@@ -578,12 +626,15 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
 &(nid_objs[70]),/* "dsaWithSHA1-old" */
 &(nid_objs[48]),/* "emailAddress" */
 &(nid_objs[56]),/* "extendedCertificateAttributes" */
+&(nid_objs[156]),/* "friendlyName" */
 &(nid_objs[99]),/* "givenName" */
 &(nid_objs[34]),/* "idea-cbc" */
 &(nid_objs[35]),/* "idea-cfb" */
 &(nid_objs[36]),/* "idea-ecb" */
 &(nid_objs[46]),/* "idea-ofb" */
 &(nid_objs[101]),/* "initials" */
+&(nid_objs[150]),/* "keyBag" */
+&(nid_objs[157]),/* "localKeyID" */
 &(nid_objs[15]),/* "localityName" */
 &(nid_objs[ 3]),/* "md2" */
 &(nid_objs[ 7]),/* "md2WithRSAEncryption" */
@@ -599,6 +650,12 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
 &(nid_objs[ 9]),/* "pbeWithMD2AndDES-CBC" */
 &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */
 &(nid_objs[10]),/* "pbeWithMD5AndDES-CBC" */
+&(nid_objs[148]),/* "pbeWithSHA1And128BitRC2-CBC" */
+&(nid_objs[144]),/* "pbeWithSHA1And128BitRC4" */
+&(nid_objs[147]),/* "pbeWithSHA1And2-KeyTripleDES-CBC" */
+&(nid_objs[146]),/* "pbeWithSHA1And3-KeyTripleDES-CBC" */
+&(nid_objs[149]),/* "pbeWithSHA1And40BitRC2-CBC" */
+&(nid_objs[145]),/* "pbeWithSHA1And40BitRC4" */
 &(nid_objs[68]),/* "pbeWithSHA1AndRC2-CBC" */
 &(nid_objs[69]),/* "pbeWithSHA1AndRC4" */
 &(nid_objs[ 2]),/* "pkcs" */
@@ -610,6 +667,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
 &(nid_objs[23]),/* "pkcs7-envelopedData" */
 &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */
 &(nid_objs[22]),/* "pkcs7-signedData" */
+&(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */
 &(nid_objs[47]),/* "pkcs9" */
 &(nid_objs[98]),/* "rc2-40-cbc" */
 &(nid_objs[37]),/* "rc2-cbc" */
@@ -628,6 +686,9 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
 &(nid_objs[ 6]),/* "rsaEncryption" */
 &(nid_objs[ 1]),/* "rsadsi" */
 &(nid_objs[124]),/* "run length compression" */
+&(nid_objs[155]),/* "safeContentsBag" */
+&(nid_objs[159]),/* "sdsiCertificate" */
+&(nid_objs[154]),/* "secretBag" */
 &(nid_objs[105]),/* "serialNumber" */
 &(nid_objs[41]),/* "sha" */
 &(nid_objs[64]),/* "sha1" */
@@ -642,6 +703,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
 &(nid_objs[102]),/* "uniqueIdentifier" */
 &(nid_objs[55]),/* "unstructuredAddress" */
 &(nid_objs[49]),/* "unstructuredName" */
+&(nid_objs[158]),/* "x509Certificate" */
+&(nid_objs[160]),/* "x509Crl" */
 &(nid_objs[125]),/* "zlib compression" */
 };
 
@@ -747,6 +810,8 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
 &(nid_objs[54]),/* OBJ_pkcs9_challengePassword      1 2 840 113549 1 9 7 */
 &(nid_objs[55]),/* OBJ_pkcs9_unstructuredAddress    1 2 840 113549 1 9 8 */
 &(nid_objs[56]),/* OBJ_pkcs9_extCertAttributes      1 2 840 113549 1 9 9 */
+&(nid_objs[156]),/* OBJ_friendlyName                 1 2 840 113549 1 9  20 */
+&(nid_objs[157]),/* OBJ_localKeyID                   1 2 840 113549 1 9  21 */
 &(nid_objs[71]),/* OBJ_netscape_cert_type           2 16 840 1 113730 1 1 */
 &(nid_objs[72]),/* OBJ_netscape_base_url            2 16 840 1 113730 1 2 */
 &(nid_objs[73]),/* OBJ_netscape_revocation_url      2 16 840 1 113730 1 3 */
@@ -757,10 +822,25 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
 &(nid_objs[78]),/* OBJ_netscape_comment             2 16 840 1 113730 1 13 */
 &(nid_objs[79]),/* OBJ_netscape_cert_sequence       2 16 840 1 113730 2 5 */
 &(nid_objs[139]),/* OBJ_ns_sgc                       2 16 840 1 113730 4 1 */
+&(nid_objs[158]),/* OBJ_x509Certificate              1 2 840 113549 1 9  22  1 */
+&(nid_objs[159]),/* OBJ_sdsiCertificate              1 2 840 113549 1 9  22  2 */
+&(nid_objs[160]),/* OBJ_x509Crl                      1 2 840 113549 1 9  23  1 */
+&(nid_objs[144]),/* OBJ_pbe_WithSHA1And128BitRC4     1 2 840 113549 1 12  1  1 */
+&(nid_objs[145]),/* OBJ_pbe_WithSHA1And40BitRC4      1 2 840 113549 1 12  1  2 */
+&(nid_objs[146]),/* OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC 1 2 840 113549 1 12  1  3 */
+&(nid_objs[147]),/* OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC 1 2 840 113549 1 12  1  4 */
+&(nid_objs[148]),/* OBJ_pbe_WithSHA1And128BitRC2_CBC 1 2 840 113549 1 12  1  5 */
+&(nid_objs[149]),/* OBJ_pbe_WithSHA1And40BitRC2_CBC  1 2 840 113549 1 12  1  6 */
 &(nid_objs[134]),/* OBJ_ms_code_ind                  1 3 6 1 4 1 311 2 1 21 */
 &(nid_objs[135]),/* OBJ_ms_code_com                  1 3 6 1 4 1 311 2 1 22 */
 &(nid_objs[136]),/* OBJ_ms_ctl_sign                  1 3 6 1 4 1 311 10 3 1 */
 &(nid_objs[137]),/* OBJ_ms_sgc                       1 3 6 1 4 1 311 10 3 3 */
 &(nid_objs[138]),/* OBJ_ms_efs                       1 3 6 1 4 1 311 10 3 4 */
+&(nid_objs[150]),/* OBJ_keyBag                       1 2 840 113549 1 12  10  1  1 */
+&(nid_objs[151]),/* OBJ_pkcs8ShroudedKeyBag          1 2 840 113549 1 12  10  1  2 */
+&(nid_objs[152]),/* OBJ_certBag                      1 2 840 113549 1 12  10  1  3 */
+&(nid_objs[153]),/* OBJ_crlBag                       1 2 840 113549 1 12  10  1  4 */
+&(nid_objs[154]),/* OBJ_secretBag                    1 2 840 113549 1 12  10  1  5 */
+&(nid_objs[155]),/* OBJ_safeContentsBag              1 2 840 113549 1 12  10  1  6 */
 };
 
index bc140ee..431d86e 100644 (file)
@@ -759,6 +759,89 @@ extern "C" {
 #define NID_sxnet                      143
 #define OBJ_sxnet                      1L,3L,101L,1L,4L,1L
 
+/* PKCS12 and related OBJECT IDENTIFIERS */
+
+#define OBJ_pkcs12                     OBJ_pkcs,12L
+#define OBJ_pkcs12_pbeids              OBJ_pkcs12, 1
+
+#define LN_pbe_WithSHA1And128BitRC4    "pbeWithSHA1And128BitRC4"
+#define NID_pbe_WithSHA1And128BitRC4   144
+#define OBJ_pbe_WithSHA1And128BitRC4   OBJ_pkcs12_pbeids, 1L
+
+#define LN_pbe_WithSHA1And40BitRC4     "pbeWithSHA1And40BitRC4"
+#define NID_pbe_WithSHA1And40BitRC4    145
+#define OBJ_pbe_WithSHA1And40BitRC4    OBJ_pkcs12_pbeids, 2L
+
+#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC  "pbeWithSHA1And3-KeyTripleDES-CBC"
+#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146
+#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 3L
+
+#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC  "pbeWithSHA1And2-KeyTripleDES-CBC"
+#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147
+#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 4L
+
+#define LN_pbe_WithSHA1And128BitRC2_CBC                "pbeWithSHA1And128BitRC2-CBC"
+#define NID_pbe_WithSHA1And128BitRC2_CBC       148
+#define OBJ_pbe_WithSHA1And128BitRC2_CBC       OBJ_pkcs12_pbeids, 5L
+
+#define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC"
+#define NID_pbe_WithSHA1And40BitRC2_CBC        149
+#define OBJ_pbe_WithSHA1And40BitRC2_CBC        OBJ_pkcs12_pbeids, 6L
+
+#define OBJ_pkcs12_Version1    OBJ_pkcs12, 10L
+
+#define OBJ_pkcs12_BagIds      OBJ_pkcs12_Version1, 1L
+
+#define LN_keyBag              "keyBag"
+#define NID_keyBag             150
+#define OBJ_keyBag             OBJ_pkcs12_BagIds, 1L
+
+#define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag"
+#define NID_pkcs8ShroudedKeyBag        151
+#define OBJ_pkcs8ShroudedKeyBag        OBJ_pkcs12_BagIds, 2L
+
+#define LN_certBag             "certBag"
+#define NID_certBag            152
+#define OBJ_certBag            OBJ_pkcs12_BagIds, 3L
+
+#define LN_crlBag              "crlBag"
+#define NID_crlBag             153
+#define OBJ_crlBag             OBJ_pkcs12_BagIds, 4L
+
+#define LN_secretBag           "secretBag"
+#define NID_secretBag          154
+#define OBJ_secretBag          OBJ_pkcs12_BagIds, 5L
+
+#define LN_safeContentsBag     "safeContentsBag"
+#define NID_safeContentsBag    155
+#define OBJ_safeContentsBag    OBJ_pkcs12_BagIds, 6L
+
+#define LN_friendlyName                "friendlyName"
+#define        NID_friendlyName        156
+#define OBJ_friendlyName       OBJ_pkcs9, 20L
+
+#define LN_localKeyID          "localKeyID"
+#define        NID_localKeyID          157
+#define OBJ_localKeyID         OBJ_pkcs9, 21L
+
+#define OBJ_certTypes          OBJ_pkcs9, 22L
+
+#define LN_x509Certificate     "x509Certificate"
+#define        NID_x509Certificate     158
+#define OBJ_x509Certificate    OBJ_certTypes, 1L
+
+#define LN_sdsiCertificate     "sdsiCertificate"
+#define        NID_sdsiCertificate     159
+#define OBJ_sdsiCertificate    OBJ_certTypes, 2L
+
+#define OBJ_crlTypes           OBJ_pkcs9, 23L
+
+#define LN_x509Crl             "x509Crl"
+#define        NID_x509Crl             160
+#define OBJ_x509Crl            OBJ_crlTypes, 1L
+
+
+
 #include "bio.h"
 #include "asn1.h"