| OLD | NEW |
| 1 /* ***** BEGIN LICENSE BLOCK ***** | 1 /* ***** BEGIN LICENSE BLOCK ***** |
| 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 3 * | 3 * |
| 4 * The contents of this file are subject to the Mozilla Public License Version | 4 * The contents of this file are subject to the Mozilla Public License Version |
| 5 * 1.1 (the "License"); you may not use this file except in compliance with | 5 * 1.1 (the "License"); you may not use this file except in compliance with |
| 6 * the License. You may obtain a copy of the License at | 6 * the License. You may obtain a copy of the License at |
| 7 * http://www.mozilla.org/MPL/ | 7 * http://www.mozilla.org/MPL/ |
| 8 * | 8 * |
| 9 * Software distributed under the License is distributed on an "AS IS" basis, | 9 * Software distributed under the License is distributed on an "AS IS" basis, |
| 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 * the provisions above, a recipient may use your version of this file under | 32 * the provisions above, a recipient may use your version of this file under |
| 33 * the terms of any one of the MPL, the GPL or the LGPL. | 33 * the terms of any one of the MPL, the GPL or the LGPL. |
| 34 * | 34 * |
| 35 * ***** END LICENSE BLOCK ***** */ | 35 * ***** END LICENSE BLOCK ***** */ |
| 36 | 36 |
| 37 #ifndef CRYPTO_THIRD_PARTY_NSS_CHROMIUM_NSS_H_ | 37 #ifndef CRYPTO_THIRD_PARTY_NSS_CHROMIUM_NSS_H_ |
| 38 #define CRYPTO_THIRD_PARTY_NSS_CHROMIUM_NSS_H_ | 38 #define CRYPTO_THIRD_PARTY_NSS_CHROMIUM_NSS_H_ |
| 39 | 39 |
| 40 // This file contains some functions we borrowed from NSS. | 40 // This file contains some functions we borrowed from NSS. |
| 41 | 41 |
| 42 #include <prtypes.h> |
| 43 #include <hasht.h> |
| 42 #include <keyhi.h> | 44 #include <keyhi.h> |
| 43 #include <secmod.h> | 45 #include <secmod.h> |
| 44 | 46 |
| 45 #include "crypto/crypto_export.h" | 47 #include "crypto/crypto_export.h" |
| 46 | 48 |
| 49 extern "C" SECStatus emsa_pss_verify(const unsigned char *mHash, |
| 50 const unsigned char *em, |
| 51 unsigned int emLen, |
| 52 HASH_HashType hashAlg, |
| 53 HASH_HashType maskHashAlg, |
| 54 unsigned int sLen); |
| 55 |
| 47 // Like PK11_ImportEncryptedPrivateKeyInfo, but hardcoded for EC, and returns | 56 // Like PK11_ImportEncryptedPrivateKeyInfo, but hardcoded for EC, and returns |
| 48 // the SECKEYPrivateKey. | 57 // the SECKEYPrivateKey. |
| 49 // See https://bugzilla.mozilla.org/show_bug.cgi?id=211546 | 58 // See https://bugzilla.mozilla.org/show_bug.cgi?id=211546 |
| 50 // When we use NSS 3.13.2 or later, | 59 // When we use NSS 3.13.2 or later, |
| 51 // PK11_ImportEncryptedPrivateKeyInfoAndReturnKey can be used instead. | 60 // PK11_ImportEncryptedPrivateKeyInfoAndReturnKey can be used instead. |
| 52 SECStatus ImportEncryptedECPrivateKeyInfoAndReturnKey( | 61 SECStatus ImportEncryptedECPrivateKeyInfoAndReturnKey( |
| 53 PK11SlotInfo* slot, | 62 PK11SlotInfo* slot, |
| 54 SECKEYEncryptedPrivateKeyInfo* epki, | 63 SECKEYEncryptedPrivateKeyInfo* epki, |
| 55 SECItem* password, | 64 SECItem* password, |
| 56 SECItem* nickname, | 65 SECItem* nickname, |
| 57 SECItem* public_value, | 66 SECItem* public_value, |
| 58 PRBool permanent, | 67 PRBool permanent, |
| 59 PRBool sensitive, | 68 PRBool sensitive, |
| 60 SECKEYPrivateKey** private_key, | 69 SECKEYPrivateKey** private_key, |
| 61 void* wincx); | 70 void* wincx); |
| 62 | 71 |
| 63 // Like SEC_DerSignData. | 72 // Like SEC_DerSignData. |
| 64 CRYPTO_EXPORT SECStatus DerSignData(PLArenaPool *arena, | 73 CRYPTO_EXPORT SECStatus DerSignData(PLArenaPool *arena, |
| 65 SECItem *result, | 74 SECItem *result, |
| 66 SECItem *input, | 75 SECItem *input, |
| 67 SECKEYPrivateKey *key, | 76 SECKEYPrivateKey *key, |
| 68 SECOidTag algo_id); | 77 SECOidTag algo_id); |
| 69 | 78 |
| 70 #endif // CRYPTO_THIRD_PARTY_NSS_CHROMIUM_NSS_H_ | 79 #endif // CRYPTO_THIRD_PARTY_NSS_CHROMIUM_NSS_H_ |
| OLD | NEW |