LEFT | RIGHT |
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 CONST_OID descbc[] = { ALGORITHM, 0x07 }; | 193 CONST_OID descbc[] = { ALGORITHM, 0x07 }; |
194 CONST_OID desofb[] = { ALGORITHM, 0x08 }; | 194 CONST_OID desofb[] = { ALGORITHM, 0x08 }; |
195 CONST_OID descfb[] = { ALGORITHM, 0x09 }; | 195 CONST_OID descfb[] = { ALGORITHM, 0x09 }; |
196 CONST_OID desmac[] = { ALGORITHM, 0x0a }; | 196 CONST_OID desmac[] = { ALGORITHM, 0x0a }; |
197 CONST_OID sdn702DSASignature[] = { ALGORITHM, 0x0c }; | 197 CONST_OID sdn702DSASignature[] = { ALGORITHM, 0x0c }; |
198 CONST_OID isoSHAWithRSASignature[] = { ALGORITHM, 0x0f }; | 198 CONST_OID isoSHAWithRSASignature[] = { ALGORITHM, 0x0f }; |
199 CONST_OID desede[] = { ALGORITHM, 0x11 }; | 199 CONST_OID desede[] = { ALGORITHM, 0x11 }; |
200 CONST_OID sha1[] = { ALGORITHM, 0x1a }; | 200 CONST_OID sha1[] = { ALGORITHM, 0x1a }; |
201 CONST_OID bogusDSASignaturewithSHA1Digest[] = { ALGORITHM, 0x1b }; | 201 CONST_OID bogusDSASignaturewithSHA1Digest[] = { ALGORITHM, 0x1b }; |
202 CONST_OID isoSHA1WithRSASignature[] = { ALGORITHM, 0x1d }; | 202 CONST_OID isoSHA1WithRSASignature[] = { ALGORITHM, 0x1d }; |
203 CONST_OID chacha20_poly1305[] = { ALGORITHM, 0x1e }; | |
204 | 203 |
205 CONST_OID pkcs1RSAEncryption[] = { PKCS1, 0x01 }; | 204 CONST_OID pkcs1RSAEncryption[] = { PKCS1, 0x01 }; |
206 CONST_OID pkcs1MD2WithRSAEncryption[] = { PKCS1, 0x02 }; | 205 CONST_OID pkcs1MD2WithRSAEncryption[] = { PKCS1, 0x02 }; |
207 CONST_OID pkcs1MD4WithRSAEncryption[] = { PKCS1, 0x03 }; | 206 CONST_OID pkcs1MD4WithRSAEncryption[] = { PKCS1, 0x03 }; |
208 CONST_OID pkcs1MD5WithRSAEncryption[] = { PKCS1, 0x04 }; | 207 CONST_OID pkcs1MD5WithRSAEncryption[] = { PKCS1, 0x04 }; |
209 CONST_OID pkcs1SHA1WithRSAEncryption[] = { PKCS1, 0x05 }; | 208 CONST_OID pkcs1SHA1WithRSAEncryption[] = { PKCS1, 0x05 }; |
210 CONST_OID pkcs1RSAOAEPEncryption[] = { PKCS1, 0x07 }; | 209 CONST_OID pkcs1RSAOAEPEncryption[] = { PKCS1, 0x07 }; |
211 CONST_OID pkcs1MGF1[] = { PKCS1, 0x08 }; | 210 CONST_OID pkcs1MGF1[] = { PKCS1, 0x08 }; |
212 CONST_OID pkcs1PSpecified[] = { PKCS1, 0x09 }; | 211 CONST_OID pkcs1PSpecified[] = { PKCS1, 0x09 }; |
213 CONST_OID pkcs1RSAPSSSignature[] = { PKCS1, 10 }; | 212 CONST_OID pkcs1RSAPSSSignature[] = { PKCS1, 10 }; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 /* OIDs for Netscape defined algorithms */ | 460 /* OIDs for Netscape defined algorithms */ |
462 CONST_OID netscapeSMimeKEA[] = { NETSCAPE_ALGS, 0x01 }; | 461 CONST_OID netscapeSMimeKEA[] = { NETSCAPE_ALGS, 0x01 }; |
463 | 462 |
464 /* Fortezza algorithm OIDs */ | 463 /* Fortezza algorithm OIDs */ |
465 CONST_OID skipjackCBC[] = { MISSI, 0x04 }; | 464 CONST_OID skipjackCBC[] = { MISSI, 0x04 }; |
466 CONST_OID dhPublicKey[] = { ANSI_X942_ALGORITHM, 0x1 }; | 465 CONST_OID dhPublicKey[] = { ANSI_X942_ALGORITHM, 0x1 }; |
467 | 466 |
468 CONST_OID idea_CBC[] = { ASCOM_IDEA_ALG, 2 }; | 467 CONST_OID idea_CBC[] = { ASCOM_IDEA_ALG, 2 }; |
469 CONST_OID aes128_GCM[] = { AES, 0x6 }; | 468 CONST_OID aes128_GCM[] = { AES, 0x6 }; |
470 CONST_OID aes192_GCM[] = { AES, 0x1a }; | 469 CONST_OID aes192_GCM[] = { AES, 0x1a }; |
471 CONST_OID aes256_GCM[] »» » » = { AES, 0x23 }; | 470 CONST_OID aes256_GCM[] »» » » = { AES, 0x2e }; |
472 CONST_OID aes128_ECB[] = { AES, 1 }; | 471 CONST_OID aes128_ECB[] = { AES, 1 }; |
473 CONST_OID aes128_CBC[] = { AES, 2 }; | 472 CONST_OID aes128_CBC[] = { AES, 2 }; |
474 #ifdef DEFINE_ALL_AES_CIPHERS | 473 #ifdef DEFINE_ALL_AES_CIPHERS |
475 CONST_OID aes128_OFB[] = { AES, 3 }; | 474 CONST_OID aes128_OFB[] = { AES, 3 }; |
476 CONST_OID aes128_CFB[] = { AES, 4 }; | 475 CONST_OID aes128_CFB[] = { AES, 4 }; |
477 #endif | 476 #endif |
478 CONST_OID aes128_KEY_WRAP[] = { AES, 5 }; | 477 CONST_OID aes128_KEY_WRAP[] = { AES, 5 }; |
479 | 478 |
480 CONST_OID aes192_ECB[] = { AES, 21 }; | 479 CONST_OID aes192_ECB[] = { AES, 21 }; |
481 CONST_OID aes192_CBC[] = { AES, 22 }; | 480 CONST_OID aes192_CBC[] = { AES, 22 }; |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 ODE( SEC_OID_TLS_DHE_DSS_EXPORT, | 1702 ODE( SEC_OID_TLS_DHE_DSS_EXPORT, |
1704 "TLS DHE-DSS-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_E
XTENSION ), | 1703 "TLS DHE-DSS-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_E
XTENSION ), |
1705 ODE( SEC_OID_TLS_DH_RSA_EXPORT, | 1704 ODE( SEC_OID_TLS_DH_RSA_EXPORT, |
1706 "TLS DH-RSA-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EX
TENSION ), | 1705 "TLS DH-RSA-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EX
TENSION ), |
1707 ODE( SEC_OID_TLS_DH_DSS_EXPORT, | 1706 ODE( SEC_OID_TLS_DH_DSS_EXPORT, |
1708 "TLS DH-DSS-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EX
TENSION ), | 1707 "TLS DH-DSS-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_EX
TENSION ), |
1709 ODE( SEC_OID_TLS_DH_ANON_EXPORT, | 1708 ODE( SEC_OID_TLS_DH_ANON_EXPORT, |
1710 "TLS DH-ANON-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_E
XTENSION ), | 1709 "TLS DH-ANON-EXPORT key exchange", CKM_INVALID_MECHANISM, INVALID_CERT_E
XTENSION ), |
1711 ODE( SEC_OID_APPLY_SSL_POLICY, | 1710 ODE( SEC_OID_APPLY_SSL_POLICY, |
1712 "Apply SSL policy (pseudo-OID)", CKM_INVALID_MECHANISM, INVALID_CERT_EXT
ENSION ), | 1711 "Apply SSL policy (pseudo-OID)", CKM_INVALID_MECHANISM, INVALID_CERT_EXT
ENSION ), |
1713 | 1712 ODE( SEC_OID_CHACHA20_POLY1305, |
1714 OD( chacha20_poly1305, SEC_OID_CHACHA20_POLY1305, | |
1715 "ChaCha20-Poly1305", CKM_NSS_CHACHA20_POLY1305, INVALID_CERT_EXTENSION )
, | 1713 "ChaCha20-Poly1305", CKM_NSS_CHACHA20_POLY1305, INVALID_CERT_EXTENSION )
, |
1716 | 1714 |
1717 }; | 1715 }; |
1718 | 1716 |
1719 /* PRIVATE EXTENDED SECOID Table | 1717 /* PRIVATE EXTENDED SECOID Table |
1720 * This table is private. Its structure is opaque to the outside. | 1718 * This table is private. Its structure is opaque to the outside. |
1721 * 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. |
1722 * Every member of this struct must have accessor functions (set, get) | 1720 * Every member of this struct must have accessor functions (set, get) |
1723 * and those functions must operate by value, not by reference. | 1721 * and those functions must operate by value, not by reference. |
1724 * 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· |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2257 void UTIL_SetForkState(PRBool forked) | 2255 void UTIL_SetForkState(PRBool forked) |
2258 { | 2256 { |
2259 parentForkedAfterC_Initialize = forked; | 2257 parentForkedAfterC_Initialize = forked; |
2260 } | 2258 } |
2261 | 2259 |
2262 const char * | 2260 const char * |
2263 NSSUTIL_GetVersion(void) | 2261 NSSUTIL_GetVersion(void) |
2264 { | 2262 { |
2265 return NSSUTIL_VERSION; | 2263 return NSSUTIL_VERSION; |
2266 } | 2264 } |
LEFT | RIGHT |