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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 #define ANSI_X962_SIGNATURE_OID ANSI_X962_OID, 0x04 | 156 #define ANSI_X962_SIGNATURE_OID ANSI_X962_OID, 0x04 |
157 #define ANSI_X962_SPECIFY_OID ANSI_X962_SIGNATURE_OID, 0x03 | 157 #define ANSI_X962_SPECIFY_OID ANSI_X962_SIGNATURE_OID, 0x03 |
158 | 158 |
159 /* for Camellia: iso(1) member-body(2) jisc(392) | 159 /* for Camellia: iso(1) member-body(2) jisc(392) |
160 * mitsubishi(200011) isl(61) security(1) algorithm(1) | 160 * mitsubishi(200011) isl(61) security(1) algorithm(1) |
161 */ | 161 */ |
162 #define MITSUBISHI_ALG 0x2a,0x83,0x08,0x8c,0x9a,0x4b,0x3d,0x01,0x01 | 162 #define MITSUBISHI_ALG 0x2a,0x83,0x08,0x8c,0x9a,0x4b,0x3d,0x01,0x01 |
163 #define CAMELLIA_ENCRYPT_OID MITSUBISHI_ALG,1 | 163 #define CAMELLIA_ENCRYPT_OID MITSUBISHI_ALG,1 |
164 #define CAMELLIA_WRAP_OID MITSUBISHI_ALG,3 | 164 #define CAMELLIA_WRAP_OID MITSUBISHI_ALG,3 |
165 | 165 |
166 /* For IDEA: 1.3.6.1.4.1.188.7.1.1 | |
167 */ | |
168 #define ASCOM_OID 0x2b,0x6,0x1,0x4,0x1,0xbc | |
169 #define ASCOM_IDEA_ALG ASCOM_OID,0x7,0x1,0x1 | |
170 | |
166 /* for SEED : iso(1) member-body(2) korea(410) | 171 /* for SEED : iso(1) member-body(2) korea(410) |
167 * kisa(200004) algorithm(1) | 172 * kisa(200004) algorithm(1) |
168 */ | 173 */ |
169 #define SEED_OID 0x2a,0x83,0x1a,0x8c,0x9a,0x44,0x01 | 174 #define SEED_OID 0x2a,0x83,0x1a,0x8c,0x9a,0x44,0x01 |
170 | 175 |
171 #define CONST_OID static const unsigned char | 176 #define CONST_OID static const unsigned char |
172 | 177 |
173 CONST_OID md2[] = { DIGEST, 0x02 }; | 178 CONST_OID md2[] = { DIGEST, 0x02 }; |
174 CONST_OID md4[] = { DIGEST, 0x04 }; | 179 CONST_OID md4[] = { DIGEST, 0x04 }; |
175 CONST_OID md5[] = { DIGEST, 0x05 }; | 180 CONST_OID md5[] = { DIGEST, 0x05 }; |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
452 CONST_OID pkixOCSPResponderExtendedKeyUsage[] = { PKIX_KEY_USAGE, 9 }; | 457 CONST_OID pkixOCSPResponderExtendedKeyUsage[] = { PKIX_KEY_USAGE, 9 }; |
453 CONST_OID msExtendedKeyUsageTrustListSigning[] = { MS_CRYPTO_EKU, 1 }; | 458 CONST_OID msExtendedKeyUsageTrustListSigning[] = { MS_CRYPTO_EKU, 1 }; |
454 | 459 |
455 /* OIDs for Netscape defined algorithms */ | 460 /* OIDs for Netscape defined algorithms */ |
456 CONST_OID netscapeSMimeKEA[] = { NETSCAPE_ALGS, 0x01 }; | 461 CONST_OID netscapeSMimeKEA[] = { NETSCAPE_ALGS, 0x01 }; |
457 | 462 |
458 /* Fortezza algorithm OIDs */ | 463 /* Fortezza algorithm OIDs */ |
459 CONST_OID skipjackCBC[] = { MISSI, 0x04 }; | 464 CONST_OID skipjackCBC[] = { MISSI, 0x04 }; |
460 CONST_OID dhPublicKey[] = { ANSI_X942_ALGORITHM, 0x1 }; | 465 CONST_OID dhPublicKey[] = { ANSI_X942_ALGORITHM, 0x1 }; |
461 | 466 |
467 CONST_OID idea_CBC[] = { ASCOM_IDEA_ALG, 2 }; | |
468 CONST_OID aes128_GCM[] = { AES, 0x6 }; | |
469 CONST_OID aes192_GCM[] = { AES, 0x1a }; | |
470 CONST_OID aes256_GCM[] = { AES, 0x2e }; | |
462 CONST_OID aes128_ECB[] = { AES, 1 }; | 471 CONST_OID aes128_ECB[] = { AES, 1 }; |
463 CONST_OID aes128_CBC[] = { AES, 2 }; | 472 CONST_OID aes128_CBC[] = { AES, 2 }; |
464 #ifdef DEFINE_ALL_AES_CIPHERS | 473 #ifdef DEFINE_ALL_AES_CIPHERS |
465 CONST_OID aes128_OFB[] = { AES, 3 }; | 474 CONST_OID aes128_OFB[] = { AES, 3 }; |
466 CONST_OID aes128_CFB[] = { AES, 4 }; | 475 CONST_OID aes128_CFB[] = { AES, 4 }; |
467 #endif | 476 #endif |
468 CONST_OID aes128_KEY_WRAP[] = { AES, 5 }; | 477 CONST_OID aes128_KEY_WRAP[] = { AES, 5 }; |
469 | 478 |
470 CONST_OID aes192_ECB[] = { AES, 21 }; | 479 CONST_OID aes192_ECB[] = { AES, 21 }; |
471 CONST_OID aes192_CBC[] = { AES, 22 }; | 480 CONST_OID aes192_CBC[] = { AES, 22 }; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
572 | 581 |
573 CONST_OID seed_CBC[] = { SEED_OID, 4 }; | 582 CONST_OID seed_CBC[] = { SEED_OID, 4 }; |
574 | 583 |
575 CONST_OID evIncorporationLocality[] = { EV_NAME_ATTRIBUTE, 1 }; | 584 CONST_OID evIncorporationLocality[] = { EV_NAME_ATTRIBUTE, 1 }; |
576 CONST_OID evIncorporationState[] = { EV_NAME_ATTRIBUTE, 2 }; | 585 CONST_OID evIncorporationState[] = { EV_NAME_ATTRIBUTE, 2 }; |
577 CONST_OID evIncorporationCountry[] = { EV_NAME_ATTRIBUTE, 3 }; | 586 CONST_OID evIncorporationCountry[] = { EV_NAME_ATTRIBUTE, 3 }; |
578 | 587 |
579 #define OI(x) { siDEROID, (unsigned char *)x, sizeof x } | 588 #define OI(x) { siDEROID, (unsigned char *)x, sizeof x } |
580 #ifndef SECOID_NO_STRINGS | 589 #ifndef SECOID_NO_STRINGS |
581 #define OD(oid,tag,desc,mech,ext) { OI(oid), tag, desc, mech, ext } | 590 #define OD(oid,tag,desc,mech,ext) { OI(oid), tag, desc, mech, ext } |
591 #define ODE(tag,desc,mech,ext) { { siDEROID, NULL, 0 }, tag, desc, mech, ext } | |
582 #else | 592 #else |
583 #define OD(oid,tag,desc,mech,ext) { OI(oid), tag, 0, mech, ext } | 593 #define OD(oid,tag,desc,mech,ext) { OI(oid), tag, 0, mech, ext } |
594 #define ODE(tag,desc,mech,ext) { { siDEROID, NULL, 0 }, tag, 0, mech, ext } | |
584 #endif | 595 #endif |
585 | 596 |
586 #if defined(NSS_ALLOW_UNSUPPORTED_CRITICAL) | 597 #if defined(NSS_ALLOW_UNSUPPORTED_CRITICAL) |
587 #define FAKE_SUPPORTED_CERT_EXTENSION SUPPORTED_CERT_EXTENSION | 598 #define FAKE_SUPPORTED_CERT_EXTENSION SUPPORTED_CERT_EXTENSION |
588 #else | 599 #else |
589 #define FAKE_SUPPORTED_CERT_EXTENSION UNSUPPORTED_CERT_EXTENSION | 600 #define FAKE_SUPPORTED_CERT_EXTENSION UNSUPPORTED_CERT_EXTENSION |
590 #endif | 601 #endif |
591 | 602 |
592 /* | 603 /* |
593 * NOTE: the order of these entries must mach the SECOidTag enum in secoidt.h! | 604 * NOTE: the order of these entries must mach the SECOidTag enum in secoidt.h! |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1632 CKM_INVALID_MECHANISM /* not yet defined */, INVALID_CERT_EXTENSION), | 1643 CKM_INVALID_MECHANISM /* not yet defined */, INVALID_CERT_EXTENSION), |
1633 OD( nistDSASignaturewithSHA256Digest, | 1644 OD( nistDSASignaturewithSHA256Digest, |
1634 SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA256_DIGEST, | 1645 SEC_OID_NIST_DSA_SIGNATURE_WITH_SHA256_DIGEST, |
1635 "DSA with SHA-256 Signature", | 1646 "DSA with SHA-256 Signature", |
1636 CKM_INVALID_MECHANISM /* not yet defined */, INVALID_CERT_EXTENSION), | 1647 CKM_INVALID_MECHANISM /* not yet defined */, INVALID_CERT_EXTENSION), |
1637 OD( msExtendedKeyUsageTrustListSigning, | 1648 OD( msExtendedKeyUsageTrustListSigning, |
1638 SEC_OID_MS_EXT_KEY_USAGE_CTL_SIGNING, | 1649 SEC_OID_MS_EXT_KEY_USAGE_CTL_SIGNING, |
1639 "Microsoft Trust List Signing", | 1650 "Microsoft Trust List Signing", |
1640 CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), | 1651 CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), |
1641 OD( x520Name, SEC_OID_AVA_NAME, | 1652 OD( x520Name, SEC_OID_AVA_NAME, |
1642 » "X520 Name", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ) | 1653 » "X520 Name", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), |
1654 | |
1655 OD( aes128_GCM, SEC_OID_AES_128_GCM, | |
1656 » "AES-128-GCM", CKM_AES_GCM, INVALID_CERT_EXTENSION ), | |
1657 OD( aes192_GCM, SEC_OID_AES_192_GCM, | |
1658 » "AES-192-GCM", CKM_AES_GCM, INVALID_CERT_EXTENSION ), | |
1659 OD( aes256_GCM, SEC_OID_AES_256_GCM, | |
1660 » "AES-256-GCM", CKM_AES_GCM, INVALID_CERT_EXTENSION ), | |
1661 OD( idea_CBC, SEC_OID_IDEA_CBC, | |
1662 » "IDEA_CBC", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), | |
1663 | |
1664 ODE( SEC_OID_RC2_40_CBC, | |
1665 » "RC2-40-CBC", CKM_RC2_CBC, INVALID_CERT_EXTENSION ), | |
1666 ODE( SEC_OID_DES_40_CBC, | |
1667 » "DES-40-CBC", CKM_RC2_CBC, INVALID_CERT_EXTENSION ), | |
1668 ODE( SEC_OID_RC4_40, | |
1669 » "RC4-40", CKM_RC4, INVALID_CERT_EXTENSION ), | |
1670 ODE( SEC_OID_RC4_56, | |
1671 » "RC4-56", CKM_RC4, INVALID_CERT_EXTENSION ), | |
1672 ODE( SEC_OID_NULL_CIPHER, | |
1673 » "NULL cipher", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), | |
1674 ODE( SEC_OID_HMAC_MD5, | |
1675 » "HMAC-MD5", CKM_MD5_HMAC, INVALID_CERT_EXTENSION ), | |
1676 ODE( SEC_OID_TLS_RSA, | |
1677 » "TLS RSA key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), | |
1678 ODE( SEC_OID_TLS_DHE_RSA, | |
1679 » "TLS DHE-RSA key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSIO N ), | |
1680 ODE( SEC_OID_TLS_DHE_DSS, | |
1681 » "TLS DHE-DSS key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSIO N ), | |
1682 ODE( SEC_OID_TLS_DH_RSA, | |
1683 » "TLS DH-RSA key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), | |
1684 ODE( SEC_OID_TLS_DH_DSS, | |
1685 » "TLS DH-DSS key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION ), | |
1686 ODE( SEC_OID_TLS_DH_ANON, | |
1687 » "TLS DH-ANON key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSIO N ), | |
1688 ODE( SEC_OID_TLS_ECDHE_ECDSA, | |
1689 » "TLS ECDHE-ECDSA key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTE NSION ), | |
1690 ODE( SEC_OID_TLS_ECDHE_RSA, | |
1691 » "TLS ECDHE-RSA key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENS ION ), | |
1692 ODE( SEC_OID_TLS_ECDH_ECDSA, | |
1693 » "TLS ECDH-ECDSA key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTEN SION ), | |
1694 ODE( SEC_OID_TLS_ECDH_RSA, | |
1695 » "TLS ECDH-RSA key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSI ON ), | |
1696 ODE( SEC_OID_TLS_ECDH_ANON, | |
1697 » "TLS ECDH-ANON key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENS ION ), | |
1698 ODE( SEC_OID_TLS_RSA_EXPORT, | |
1699 » "TLS RSA-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EXTEN SION ), | |
1700 ODE( SEC_OID_TLS_DHE_RSA_EXPORT, | |
1701 » "TLS DHE-RSA-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_E XTENSION ), | |
1702 ODE( SEC_OID_TLS_DHE_DSS_EXPORT, | |
1703 » "TLS DHE-DSS-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_E XTENSION ), | |
1704 ODE( SEC_OID_TLS_DH_RSA_EXPORT, | |
1705 » "TLS DH-RSA-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EX TENSION ), | |
1706 ODE( SEC_OID_TLS_DH_DSS_EXPORT, | |
1707 » "TLS DH-DSS-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EX TENSION ), | |
1708 ODE( SEC_OID_TLS_DH_ANON_EXPORT, | |
1709 » "TLS DH-ANON-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_E XTENSION ), | |
1710 ODE( SEC_OID_APPLY_SSL_POLICY, | |
1711 » "Apply SSL policy (pseudo-OID)", CKM_INVALID_MECHANISM, INVALID_CERT_EXT ENSION ), | |
1712 ODE( SEC_OID_CHACHA20_POLY1305, | |
1713 » "ChaCha20-Poly1305", CKM_NSS_CHACHA20_POLY1305, INVALID_CERT_EXTENSION ) , | |
1714 | |
1643 }; | 1715 }; |
1644 | 1716 |
1645 /* PRIVATE EXTENDED SECOID Table | 1717 /* PRIVATE EXTENDED SECOID Table |
1646 * This table is private. Its structure is opaque to the outside. | 1718 * This table is private. Its structure is opaque to the outside. |
1647 * It is indexed by the same SECOidTag as the oids table above. | 1719 * It is indexed by the same SECOidTag as the oids table above. |
1648 * Every member of this struct must have accessor functions (set, get) | 1720 * Every member of this struct must have accessor functions (set, get) |
1649 * and those functions must operate by value, not by reference. | 1721 * and those functions must operate by value, not by reference. |
1650 * The addresses of the contents of this table must not be exposed | 1722 * The addresses of the contents of this table must not be exposed |
1651 * by the accessor functions. | 1723 * by the accessor functions. |
1652 */ | 1724 */ |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1865 /* normal static table processing */ | 1937 /* normal static table processing */ |
1866 static PLHashTable *oidhash = NULL; | 1938 static PLHashTable *oidhash = NULL; |
1867 static PLHashTable *oidmechhash = NULL; | 1939 static PLHashTable *oidmechhash = NULL; |
1868 | 1940 |
1869 static PLHashNumber | 1941 static PLHashNumber |
1870 secoid_HashNumber(const void *key) | 1942 secoid_HashNumber(const void *key) |
1871 { | 1943 { |
1872 return (PLHashNumber)((char *)key - (char *)NULL); | 1944 return (PLHashNumber)((char *)key - (char *)NULL); |
1873 } | 1945 } |
1874 | 1946 |
1947 #define DEF_FLAGS (NSS_USE_ALG_IN_CERT_SIGNATURE|NSS_USE_ALG_IN_SSL_KX|NSS_USE_A LG_IN_SSL_KX) | |
svaldez
2016/04/04 15:59:51
nit: dupped
| |
1875 static void | 1948 static void |
1876 handleHashAlgSupport(char * envVal) | 1949 handleHashAlgSupport(char * envVal) |
1877 { | 1950 { |
1878 char * myVal = PORT_Strdup(envVal); /* Get a copy we can alter */ | 1951 char * myVal = PORT_Strdup(envVal); /* Get a copy we can alter */ |
1879 char * arg = myVal; | 1952 char * arg = myVal; |
1880 | 1953 |
1881 while (arg && *arg) { | 1954 while (arg && *arg) { |
1882 char * nextArg = PL_strpbrk(arg, ";"); | 1955 char * nextArg = PL_strpbrk(arg, ";"); |
1883 PRUint32 notEnable; | 1956 PRUint32 notEnable; |
1884 | 1957 |
1885 if (nextArg) { | 1958 if (nextArg) { |
1886 while (*nextArg == ';') { | 1959 while (*nextArg == ';') { |
1887 *nextArg++ = '\0'; | 1960 *nextArg++ = '\0'; |
1888 } | 1961 } |
1889 } | 1962 } |
1890 » notEnable = (*arg == '-') ? (NSS_USE_ALG_IN_CERT_SIGNATURE|NSS_USE_ALG_I N_SSL_KX) : 0; | 1963 » notEnable = (*arg == '-') ? (DEF_FLAGS) : 0; |
1891 if ((*arg == '+' || *arg == '-') && *++arg) { | 1964 if ((*arg == '+' || *arg == '-') && *++arg) { |
1892 int i; | 1965 int i; |
1893 | 1966 |
1894 for (i = 1; i < SEC_OID_TOTAL; i++) { | 1967 for (i = 1; i < SEC_OID_TOTAL; i++) { |
1895 if (oids[i].desc && strstr(arg, oids[i].desc)) { | 1968 if (oids[i].desc && strstr(arg, oids[i].desc)) { |
1896 xOids[i].notPolicyFlags = notEnable | | 1969 xOids[i].notPolicyFlags = notEnable | |
1897 » » (xOids[i].notPolicyFlags & ~(NSS_USE_ALG_IN_CERT_SIGNATURE|N SS_USE_ALG_IN_SSL_KX)); | 1970 » » (xOids[i].notPolicyFlags & ~(DEF_FLAGS)); |
1898 } | 1971 } |
1899 } | 1972 } |
1900 } | 1973 } |
1901 arg = nextArg; | 1974 arg = nextArg; |
1902 } | 1975 } |
1903 PORT_Free(myVal); /* can handle NULL argument OK */ | 1976 PORT_Free(myVal); /* can handle NULL argument OK */ |
1904 } | 1977 } |
1905 | 1978 |
1906 SECStatus | 1979 SECStatus |
1907 SECOID_Init(void) | 1980 SECOID_Init(void) |
1908 { | 1981 { |
1909 PLHashEntry *entry; | 1982 PLHashEntry *entry; |
1910 const SECOidData *oid; | 1983 const SECOidData *oid; |
1911 int i; | 1984 int i; |
1912 char * envVal; | 1985 char * envVal; |
1913 | 1986 |
1914 #define NSS_VERSION_VARIABLE __nss_util_version | 1987 #define NSS_VERSION_VARIABLE __nss_util_version |
1915 #include "verref.h" | 1988 #include "verref.h" |
1916 | 1989 |
1917 if (oidhash) { | 1990 if (oidhash) { |
1918 return SECSuccess; /* already initialized */ | 1991 return SECSuccess; /* already initialized */ |
1919 } | 1992 } |
1920 | 1993 |
1921 if (!PR_GetEnv("NSS_ALLOW_WEAK_SIGNATURE_ALG")) { | 1994 if (!PR_GetEnvSecure("NSS_ALLOW_WEAK_SIGNATURE_ALG")) { |
1922 /* initialize any policy flags that are disabled by default */ | 1995 /* initialize any policy flags that are disabled by default */ |
1923 xOids[SEC_OID_MD2 ].notPolicyFlags = ~0; | 1996 xOids[SEC_OID_MD2 ].notPolicyFlags = ~0; |
1924 xOids[SEC_OID_MD4 ].notPolicyFlags = ~0; | 1997 xOids[SEC_OID_MD4 ].notPolicyFlags = ~0; |
1925 xOids[SEC_OID_MD5 ].notPolicyFlags = ~0; | 1998 xOids[SEC_OID_MD5 ].notPolicyFlags = ~0; |
1926 xOids[SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION ].notPolicyFlags = ~0; | 1999 xOids[SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION ].notPolicyFlags = ~0; |
1927 xOids[SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION ].notPolicyFlags = ~0; | 2000 xOids[SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION ].notPolicyFlags = ~0; |
1928 xOids[SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION ].notPolicyFlags = ~0; | 2001 xOids[SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION ].notPolicyFlags = ~0; |
1929 xOids[SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC].notPolicyFlags = ~0; | 2002 xOids[SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC].notPolicyFlags = ~0; |
1930 xOids[SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC].notPolicyFlags = ~0; | 2003 xOids[SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC].notPolicyFlags = ~0; |
1931 } | 2004 } |
1932 | 2005 |
1933 envVal = PR_GetEnv("NSS_HASH_ALG_SUPPORT"); | 2006 /* turn off NSS_USE_POLICY_IN_SSL by default */ |
2007 xOids[SEC_OID_APPLY_SSL_POLICY].notPolicyFlags = NSS_USE_POLICY_IN_SSL; | |
2008 | |
2009 envVal = PR_GetEnvSecure("NSS_HASH_ALG_SUPPORT"); | |
1934 if (envVal) | 2010 if (envVal) |
1935 handleHashAlgSupport(envVal); | 2011 handleHashAlgSupport(envVal); |
1936 | 2012 |
1937 if (secoid_InitDynOidData() != SECSuccess) { | 2013 if (secoid_InitDynOidData() != SECSuccess) { |
1938 PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); | 2014 PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); |
1939 PORT_Assert(0); /* this function should never fail */ | 2015 PORT_Assert(0); /* this function should never fail */ |
1940 return SECFailure; | 2016 return SECFailure; |
1941 } | 2017 } |
1942 | 2018 |
1943 oidhash = PL_NewHashTable(0, SECITEM_Hash, SECITEM_HashCompare, | 2019 oidhash = PL_NewHashTable(0, SECITEM_Hash, SECITEM_HashCompare, |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2179 void UTIL_SetForkState(PRBool forked) | 2255 void UTIL_SetForkState(PRBool forked) |
2180 { | 2256 { |
2181 parentForkedAfterC_Initialize = forked; | 2257 parentForkedAfterC_Initialize = forked; |
2182 } | 2258 } |
2183 | 2259 |
2184 const char * | 2260 const char * |
2185 NSSUTIL_GetVersion(void) | 2261 NSSUTIL_GetVersion(void) |
2186 { | 2262 { |
2187 return NSSUTIL_VERSION; | 2263 return NSSUTIL_VERSION; |
2188 } | 2264 } |
OLD | NEW |