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 #ifndef _LOWKEYI_H_ | 5 #ifndef _LOWKEYI_H_ |
6 #define _LOWKEYI_H_ | 6 #define _LOWKEYI_H_ |
7 | 7 |
8 #include "prtypes.h" | 8 #include "prtypes.h" |
9 #include "seccomon.h" | 9 #include "seccomon.h" |
10 #include "secoidt.h" | 10 #include "secoidt.h" |
11 #include "lowkeyti.h" | 11 #include "lowkeyti.h" |
12 | 12 |
13 SEC_BEGIN_PROTOS | 13 SEC_BEGIN_PROTOS |
14 | 14 |
15 /* | 15 /* |
16 * See bugzilla bug 125359 | 16 * See bugzilla bug 125359 |
17 * Since NSS (via PKCS#11) wants to handle big integers as unsigned ints, | 17 * Since NSS (via PKCS#11) wants to handle big integers as unsigned ints, |
18 * all of the templates above that en/decode into integers must be converted | 18 * all of the templates above that en/decode into integers must be converted |
19 * from ASN.1's signed integer type. This is done by marking either the | 19 * from ASN.1's signed integer type. This is done by marking either the |
20 * source or destination (encoding or decoding, respectively) type as | 20 * source or destination (encoding or decoding, respectively) type as |
21 * siUnsignedInteger. | 21 * siUnsignedInteger. |
22 */ | 22 */ |
23 extern void prepare_low_rsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key); | 23 extern void prepare_low_rsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key); |
24 extern void prepare_low_pqg_params_for_asn1(PQGParams *params); | 24 extern void prepare_low_pqg_params_for_asn1(PQGParams *params); |
25 extern void prepare_low_dsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key); | 25 extern void prepare_low_dsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key); |
26 extern void prepare_low_dsa_priv_key_export_for_asn1(NSSLOWKEYPrivateKey *key); | 26 extern void prepare_low_dsa_priv_key_export_for_asn1(NSSLOWKEYPrivateKey *key); |
27 extern void prepare_low_dh_priv_key_for_asn1(NSSLOWKEYPrivateKey *key); | 27 extern void prepare_low_dh_priv_key_for_asn1(NSSLOWKEYPrivateKey *key); |
28 #ifdef NSS_ENABLE_ECC | 28 #ifndef NSS_DISABLE_ECC |
29 extern void prepare_low_ec_priv_key_for_asn1(NSSLOWKEYPrivateKey *key); | 29 extern void prepare_low_ec_priv_key_for_asn1(NSSLOWKEYPrivateKey *key); |
30 extern void prepare_low_ecparams_for_asn1(ECParams *params); | 30 extern void prepare_low_ecparams_for_asn1(ECParams *params); |
31 #endif /* NSS_ENABLE_ECC */ | 31 #endif /* NSS_DISABLE_ECC */ |
32 | 32 |
33 /* | 33 /* |
34 ** Destroy a private key object. | 34 ** Destroy a private key object. |
35 ** "key" the object | 35 ** "key" the object |
36 ** "freeit" if PR_TRUE then free the object as well as its sub-objects | 36 ** "freeit" if PR_TRUE then free the object as well as its sub-objects |
37 */ | 37 */ |
38 extern void nsslowkey_DestroyPrivateKey(NSSLOWKEYPrivateKey *key); | 38 extern void nsslowkey_DestroyPrivateKey(NSSLOWKEYPrivateKey *key); |
39 | 39 |
40 /* | 40 /* |
41 ** Destroy a public key object. | 41 ** Destroy a public key object. |
(...skipping 23 matching lines...) Expand all Loading... |
65 /* Make a copy of a low private key in it's own arena. | 65 /* Make a copy of a low private key in it's own arena. |
66 * a return of NULL indicates an error. | 66 * a return of NULL indicates an error. |
67 */ | 67 */ |
68 extern NSSLOWKEYPrivateKey * | 68 extern NSSLOWKEYPrivateKey * |
69 nsslowkey_CopyPrivateKey(NSSLOWKEYPrivateKey *privKey); | 69 nsslowkey_CopyPrivateKey(NSSLOWKEYPrivateKey *privKey); |
70 | 70 |
71 | 71 |
72 SEC_END_PROTOS | 72 SEC_END_PROTOS |
73 | 73 |
74 #endif /* _LOWKEYI_H_ */ | 74 #endif /* _LOWKEYI_H_ */ |
OLD | NEW |