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 | 7 |
8 #ifndef _SOFTOKEN_H_ | 8 #ifndef _SOFTOKEN_H_ |
9 #define _SOFTOKEN_H_ | 9 #define _SOFTOKEN_H_ |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 unsigned char *input, unsigned int input_len); | 130 unsigned char *input, unsigned int input_len); |
131 extern | 131 extern |
132 SECStatus RSA_DecryptRaw(NSSLOWKEYPrivateKey *key, unsigned char *output, | 132 SECStatus RSA_DecryptRaw(NSSLOWKEYPrivateKey *key, unsigned char *output, |
133 unsigned int *output_len, | 133 unsigned int *output_len, |
134 unsigned int max_output_len, | 134 unsigned int max_output_len, |
135 unsigned char *input, unsigned int input_len); | 135 unsigned char *input, unsigned int input_len); |
136 #ifdef NSS_ENABLE_ECC | 136 #ifdef NSS_ENABLE_ECC |
137 /* | 137 /* |
138 ** pepare an ECParam structure from DEREncoded params | 138 ** pepare an ECParam structure from DEREncoded params |
139 */ | 139 */ |
140 extern SECStatus EC_FillParams(PRArenaPool *arena, | 140 extern SECStatus EC_FillParams(PLArenaPool *arena, |
141 const SECItem *encodedParams, ECParams *params); | 141 const SECItem *encodedParams, ECParams *params); |
142 extern SECStatus EC_DecodeParams(const SECItem *encodedParams, | 142 extern SECStatus EC_DecodeParams(const SECItem *encodedParams, |
143 ECParams **ecparams); | 143 ECParams **ecparams); |
144 extern SECStatus EC_CopyParams(PRArenaPool *arena, ECParams *dstParams, | 144 extern SECStatus EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, |
145 const ECParams *srcParams); | 145 const ECParams *srcParams); |
146 #endif | 146 #endif |
147 | 147 |
148 | 148 |
149 /* | 149 /* |
150 ** Prepare a buffer for padded CBC encryption, growing to the appropriate | 150 ** Prepare a buffer for padded CBC encryption, growing to the appropriate |
151 ** boundary, filling with the appropriate padding. | 151 ** boundary, filling with the appropriate padding. |
152 ** | 152 ** |
153 ** blockSize must be a power of 2. | 153 ** blockSize must be a power of 2. |
154 ** | 154 ** |
155 ** We add from 1 to blockSize bytes -- we *always* grow. | 155 ** We add from 1 to blockSize bytes -- we *always* grow. |
156 ** The extra bytes contain the value of the length of the padding: | 156 ** The extra bytes contain the value of the length of the padding: |
157 ** if we have 2 bytes of padding, then the padding is "0x02, 0x02". | 157 ** if we have 2 bytes of padding, then the padding is "0x02, 0x02". |
158 ** | 158 ** |
159 ** NOTE: If arena is non-NULL, we re-allocate from there, otherwise | 159 ** NOTE: If arena is non-NULL, we re-allocate from there, otherwise |
160 ** we assume (and use) PR memory (re)allocation. | 160 ** we assume (and use) PR memory (re)allocation. |
161 */ | 161 */ |
162 extern unsigned char * CBC_PadBuffer(PRArenaPool *arena, unsigned char *inbuf, | 162 extern unsigned char * CBC_PadBuffer(PLArenaPool *arena, unsigned char *inbuf, |
163 unsigned int inlen, unsigned int *outlen, | 163 unsigned int inlen, unsigned int *outlen, |
164 int blockSize); | 164 int blockSize); |
165 | 165 |
166 | 166 |
167 /****************************************/ | 167 /****************************************/ |
168 /* | 168 /* |
169 ** Power-Up selftests required for FIPS and invoked only | 169 ** Power-Up selftests required for FIPS and invoked only |
170 ** under PKCS #11 FIPS mode. | 170 ** under PKCS #11 FIPS mode. |
171 */ | 171 */ |
172 extern CK_RV sftk_fipsPowerUpSelfTest( void ); | 172 extern CK_RV sftk_fipsPowerUpSelfTest( void ); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 #ifndef NO_FORK_CHECK | 368 #ifndef NO_FORK_CHECK |
369 #define NO_FORK_CHECK | 369 #define NO_FORK_CHECK |
370 #endif | 370 #endif |
371 | 371 |
372 #endif | 372 #endif |
373 | 373 |
374 | 374 |
375 SEC_END_PROTOS | 375 SEC_END_PROTOS |
376 | 376 |
377 #endif /* _SOFTOKEN_H_ */ | 377 #endif /* _SOFTOKEN_H_ */ |
OLD | NEW |