| OLD | NEW |
| 1 /* | 1 /* |
| 2 * softoken.h - private data structures and prototypes for the softoken lib | 2 * softoken.h - private data structures and prototypes for the softoken lib |
| 3 * | 3 * |
| 4 * This Source Code Form is subject to the terms of the Mozilla Public | 4 * This Source Code Form is subject to the terms of the Mozilla Public |
| 5 * License, v. 2.0. If a copy of the MPL was not distributed with this | 5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 7 /* $Id: softoken.h,v 1.28 2012/04/25 14:50:10 gerv%gerv.net Exp $ */ | 7 /* $Id: softoken.h,v 1.29 2013/02/05 02:19:52 ryan.sleevi%gmail.com Exp $ */ |
| 8 | 8 |
| 9 #ifndef _SOFTOKEN_H_ | 9 #ifndef _SOFTOKEN_H_ |
| 10 #define _SOFTOKEN_H_ | 10 #define _SOFTOKEN_H_ |
| 11 | 11 |
| 12 #include "blapi.h" | 12 #include "blapi.h" |
| 13 #include "lowkeyti.h" | 13 #include "lowkeyti.h" |
| 14 #include "softoknt.h" | 14 #include "softoknt.h" |
| 15 #include "secoidt.h" | 15 #include "secoidt.h" |
| 16 | 16 |
| 17 #include "pkcs11t.h" /* CK_RV Required for sftk_fipsPowerUpSelfTest(). */ | 17 #include "pkcs11t.h" |
| 18 | 18 |
| 19 SEC_BEGIN_PROTOS | 19 SEC_BEGIN_PROTOS |
| 20 | 20 |
| 21 /* | 21 /* |
| 22 ** RSA encryption/decryption. When encrypting/decrypting the output | 22 ** RSA encryption/decryption. When encrypting/decrypting the output |
| 23 ** buffer must be at least the size of the public key modulus. | 23 ** buffer must be at least the size of the public key modulus. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 /* | 26 /* |
| 27 ** Format some data into a PKCS#1 encryption block, preparing the | 27 ** Format some data into a PKCS#1 encryption block, preparing the |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 unsigned char *sign, unsigned int sign_len); | 87 unsigned char *sign, unsigned int sign_len); |
| 88 extern | 88 extern |
| 89 SECStatus RSA_EncryptBlock(NSSLOWKEYPublicKey *key, unsigned char *output, | 89 SECStatus RSA_EncryptBlock(NSSLOWKEYPublicKey *key, unsigned char *output, |
| 90 unsigned int *outputLen, unsigned int maxOutputLen, | 90 unsigned int *outputLen, unsigned int maxOutputLen, |
| 91 unsigned char *input, unsigned int inputLen); | 91 unsigned char *input, unsigned int inputLen); |
| 92 extern | 92 extern |
| 93 SECStatus RSA_DecryptBlock(NSSLOWKEYPrivateKey *key, unsigned char *output, | 93 SECStatus RSA_DecryptBlock(NSSLOWKEYPrivateKey *key, unsigned char *output, |
| 94 unsigned int *outputLen, unsigned int maxOutputLen, | 94 unsigned int *outputLen, unsigned int maxOutputLen, |
| 95 unsigned char *input, unsigned int inputLen); | 95 unsigned char *input, unsigned int inputLen); |
| 96 | 96 |
| 97 extern |
| 98 SECStatus RSA_EncryptOAEP(CK_RSA_PKCS_OAEP_PARAMS *oaepParams, |
| 99 NSSLOWKEYPublicKey *key, |
| 100 unsigned char *output, unsigned int *outputLen, |
| 101 unsigned int maxOutputLen, |
| 102 const unsigned char *input, unsigned int inputLen); |
| 103 |
| 104 extern |
| 105 SECStatus RSA_DecryptOAEP(CK_RSA_PKCS_OAEP_PARAMS *oaepParams, |
| 106 NSSLOWKEYPrivateKey *key, |
| 107 unsigned char *output, unsigned int *outputLen, |
| 108 unsigned int maxOutputLen, |
| 109 const unsigned char *input, unsigned int inputLen); |
| 110 |
| 97 /* | 111 /* |
| 98 * added to make pkcs #11 happy | 112 * added to make pkcs #11 happy |
| 99 * RAW is RSA_X_509 | 113 * RAW is RSA_X_509 |
| 100 */ | 114 */ |
| 101 extern | 115 extern |
| 102 SECStatus RSA_SignRaw( NSSLOWKEYPrivateKey *key, unsigned char *output, | 116 SECStatus RSA_SignRaw( NSSLOWKEYPrivateKey *key, unsigned char *output, |
| 103 unsigned int *output_len, unsigned int maxOutputLen, | 117 unsigned int *output_len, unsigned int maxOutputLen, |
| 104 unsigned char *input, unsigned int input_len); | 118 unsigned char *input, unsigned int input_len); |
| 105 extern | 119 extern |
| 106 SECStatus RSA_CheckSignRaw( NSSLOWKEYPublicKey *key, unsigned char *sign, | 120 SECStatus RSA_CheckSignRaw( NSSLOWKEYPublicKey *key, unsigned char *sign, |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 #ifndef NO_FORK_CHECK | 369 #ifndef NO_FORK_CHECK |
| 356 #define NO_FORK_CHECK | 370 #define NO_FORK_CHECK |
| 357 #endif | 371 #endif |
| 358 | 372 |
| 359 #endif | 373 #endif |
| 360 | 374 |
| 361 | 375 |
| 362 SEC_END_PROTOS | 376 SEC_END_PROTOS |
| 363 | 377 |
| 364 #endif /* _SOFTOKEN_H_ */ | 378 #endif /* _SOFTOKEN_H_ */ |
| OLD | NEW |