OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 #include "secoid.h" | 5 #include "secoid.h" |
6 #include "pkcs11t.h" | 6 #include "pkcs11t.h" |
7 #include "secitem.h" | 7 #include "secitem.h" |
8 #include "secerr.h" | 8 #include "secerr.h" |
9 #include "prenv.h" | 9 #include "prenv.h" |
10 #include "plhash.h" | 10 #include "plhash.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 #define PKIX_ID_PKIP PKIX, 5 | 139 #define PKIX_ID_PKIP PKIX, 5 |
140 #define PKIX_ID_REGCTRL PKIX_ID_PKIP, 1 | 140 #define PKIX_ID_REGCTRL PKIX_ID_PKIP, 1 |
141 #define PKIX_ID_REGINFO PKIX_ID_PKIP, 2 | 141 #define PKIX_ID_REGINFO PKIX_ID_PKIP, 2 |
142 | 142 |
143 /* Microsoft Object ID space */ | 143 /* Microsoft Object ID space */ |
144 /* { 1.3.6.1.4.1.311 } */ | 144 /* { 1.3.6.1.4.1.311 } */ |
145 #define MICROSOFT_OID 0x2b, 0x6, 0x1, 0x4, 0x1, 0x82, 0x37 | 145 #define MICROSOFT_OID 0x2b, 0x6, 0x1, 0x4, 0x1, 0x82, 0x37 |
146 #define EV_NAME_ATTRIBUTE MICROSOFT_OID, 60, 2, 1 | 146 #define EV_NAME_ATTRIBUTE MICROSOFT_OID, 60, 2, 1 |
147 | 147 |
| 148 /* Microsoft Crypto 2.0 ID space */ |
| 149 /* { 1.3.6.1.4.1.311.10 } */ |
| 150 #define MS_CRYPTO_20 MICROSOFT_OID, 10 |
| 151 /* Microsoft Crypto 2.0 Extended Key Usage ID space */ |
| 152 /* { 1.3.6.1.4.1.311.10.3 } */ |
| 153 #define MS_CRYPTO_EKU MS_CRYPTO_20, 3 |
| 154 |
148 #define CERTICOM_OID 0x2b, 0x81, 0x04 | 155 #define CERTICOM_OID 0x2b, 0x81, 0x04 |
149 #define SECG_OID CERTICOM_OID, 0x00 | 156 #define SECG_OID CERTICOM_OID, 0x00 |
150 | 157 |
151 #define ANSI_X962_OID 0x2a, 0x86, 0x48, 0xce, 0x3d | 158 #define ANSI_X962_OID 0x2a, 0x86, 0x48, 0xce, 0x3d |
152 #define ANSI_X962_CURVE_OID ANSI_X962_OID, 0x03 | 159 #define ANSI_X962_CURVE_OID ANSI_X962_OID, 0x03 |
153 #define ANSI_X962_GF2m_OID ANSI_X962_CURVE_OID, 0x00 | 160 #define ANSI_X962_GF2m_OID ANSI_X962_CURVE_OID, 0x00 |
154 #define ANSI_X962_GFp_OID ANSI_X962_CURVE_OID, 0x01 | 161 #define ANSI_X962_GFp_OID ANSI_X962_CURVE_OID, 0x01 |
155 #define ANSI_X962_SIGNATURE_OID ANSI_X962_OID, 0x04 | 162 #define ANSI_X962_SIGNATURE_OID ANSI_X962_OID, 0x04 |
156 #define ANSI_X962_SPECIFY_OID ANSI_X962_SIGNATURE_OID, 0x03 | 163 #define ANSI_X962_SPECIFY_OID ANSI_X962_SIGNATURE_OID, 0x03 |
157 | 164 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 CONST_OID pkixRegCtrlProtEncKey[] = { PKIX_ID_REGCTRL, 6}; | 448 CONST_OID pkixRegCtrlProtEncKey[] = { PKIX_ID_REGCTRL, 6}; |
442 CONST_OID pkixRegInfoUTF8Pairs[] = { PKIX_ID_REGINFO, 1}; | 449 CONST_OID pkixRegInfoUTF8Pairs[] = { PKIX_ID_REGINFO, 1}; |
443 CONST_OID pkixRegInfoCertReq[] = { PKIX_ID_REGINFO, 2}; | 450 CONST_OID pkixRegInfoCertReq[] = { PKIX_ID_REGINFO, 2}; |
444 | 451 |
445 CONST_OID pkixExtendedKeyUsageServerAuth[] = { PKIX_KEY_USAGE, 1 }; | 452 CONST_OID pkixExtendedKeyUsageServerAuth[] = { PKIX_KEY_USAGE, 1 }; |
446 CONST_OID pkixExtendedKeyUsageClientAuth[] = { PKIX_KEY_USAGE, 2 }; | 453 CONST_OID pkixExtendedKeyUsageClientAuth[] = { PKIX_KEY_USAGE, 2 }; |
447 CONST_OID pkixExtendedKeyUsageCodeSign[] = { PKIX_KEY_USAGE, 3 }; | 454 CONST_OID pkixExtendedKeyUsageCodeSign[] = { PKIX_KEY_USAGE, 3 }; |
448 CONST_OID pkixExtendedKeyUsageEMailProtect[] = { PKIX_KEY_USAGE, 4 }; | 455 CONST_OID pkixExtendedKeyUsageEMailProtect[] = { PKIX_KEY_USAGE, 4 }; |
449 CONST_OID pkixExtendedKeyUsageTimeStamp[] = { PKIX_KEY_USAGE, 8 }; | 456 CONST_OID pkixExtendedKeyUsageTimeStamp[] = { PKIX_KEY_USAGE, 8 }; |
450 CONST_OID pkixOCSPResponderExtendedKeyUsage[] = { PKIX_KEY_USAGE, 9 }; | 457 CONST_OID pkixOCSPResponderExtendedKeyUsage[] = { PKIX_KEY_USAGE, 9 }; |
| 458 CONST_OID msExtendedKeyUsageTrustListSigning[] = { MS_CRYPTO_EKU, 1 }; |
451 | 459 |
452 /* OIDs for Netscape defined algorithms */ | 460 /* OIDs for Netscape defined algorithms */ |
453 CONST_OID netscapeSMimeKEA[] = { NETSCAPE_ALGS, 0x01 }; | 461 CONST_OID netscapeSMimeKEA[] = { NETSCAPE_ALGS, 0x01 }; |
454 | 462 |
455 /* Fortezza algorithm OIDs */ | 463 /* Fortezza algorithm OIDs */ |
456 CONST_OID skipjackCBC[] = { MISSI, 0x04 }; | 464 CONST_OID skipjackCBC[] = { MISSI, 0x04 }; |
457 CONST_OID dhPublicKey[] = { ANSI_X942_ALGORITHM, 0x1 }; | 465 CONST_OID dhPublicKey[] = { ANSI_X942_ALGORITHM, 0x1 }; |
458 | 466 |
459 CONST_OID aes128_ECB[] = { AES, 1 }; | 467 CONST_OID aes128_ECB[] = { AES, 1 }; |
460 CONST_OID aes128_CBC[] = { AES, 2 }; | 468 CONST_OID aes128_CBC[] = { AES, 2 }; |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 "Business Category", | 1634 "Business Category", |
1627 CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), | 1635 CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), |
1628 | 1636 |
1629 OD( nistDSASignaturewithSHA224Digest, | 1637 OD( nistDSASignaturewithSHA224Digest, |
1630 SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA224_DIGEST, | 1638 SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA224_DIGEST, |
1631 "DSA with SHA-224 Signature", | 1639 "DSA with SHA-224 Signature", |
1632 CKM_INVALID_MECHANISM /* not yet defined */, INVALID_CERT_EXTENSION), | 1640 CKM_INVALID_MECHANISM /* not yet defined */, INVALID_CERT_EXTENSION), |
1633 OD( nistDSASignaturewithSHA256Digest, | 1641 OD( nistDSASignaturewithSHA256Digest, |
1634 SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA256_DIGEST, | 1642 SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA256_DIGEST, |
1635 "DSA with SHA-256 Signature", | 1643 "DSA with SHA-256 Signature", |
1636 » CKM_INVALID_MECHANISM /* not yet defined */, INVALID_CERT_EXTENSION) | 1644 » CKM_INVALID_MECHANISM /* not yet defined */, INVALID_CERT_EXTENSION), |
| 1645 OD( msExtendedKeyUsageTrustListSigning, |
| 1646 SEC_OID_MS_EXT_KEY_USAGE_CTL_SIGNING, |
| 1647 "Microsoft Trust List Signing", |
| 1648 » CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ) |
1637 }; | 1649 }; |
1638 | 1650 |
1639 /* PRIVATE EXTENDED SECOID Table | 1651 /* PRIVATE EXTENDED SECOID Table |
1640 * This table is private. Its structure is opaque to the outside. | 1652 * This table is private. Its structure is opaque to the outside. |
1641 * It is indexed by the same SECOidTag as the oids table above. | 1653 * It is indexed by the same SECOidTag as the oids table above. |
1642 * Every member of this struct must have accessor functions (set, get) | 1654 * Every member of this struct must have accessor functions (set, get) |
1643 * and those functions must operate by value, not by reference. | 1655 * and those functions must operate by value, not by reference. |
1644 * The addresses of the contents of this table must not be exposed | 1656 * The addresses of the contents of this table must not be exposed |
1645 * by the accessor functions. | 1657 * by the accessor functions. |
1646 */ | 1658 */ |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2173 void UTIL_SetForkState(PRBool forked) | 2185 void UTIL_SetForkState(PRBool forked) |
2174 { | 2186 { |
2175 parentForkedAfterC_Initialize = forked; | 2187 parentForkedAfterC_Initialize = forked; |
2176 } | 2188 } |
2177 | 2189 |
2178 const char * | 2190 const char * |
2179 NSSUTIL_GetVersion(void) | 2191 NSSUTIL_GetVersion(void) |
2180 { | 2192 { |
2181 return NSSUTIL_VERSION; | 2193 return NSSUTIL_VERSION; |
2182 } | 2194 } |
OLD | NEW |