Bug 460926 A11y hierachy is broken on Ubuntu 8.10 (GNOME 2.24), r=Evan.Yan sr=roc
[wine-gecko.git] / security / nss / lib / softoken / lowkeyi.h
blobec6f0e961ce19ecef26a117b488b0779ca930bbb
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
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
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
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
11 * for the specific language governing rights and limitations under the
12 * License.
14 * The Original Code is the Netscape security libraries.
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by the Initial Developer are Copyright (C) 1994-2000
19 * the Initial Developer. All Rights Reserved.
21 * Contributor(s):
22 * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
37 /* $Id: lowkeyi.h,v 1.11 2007/06/13 00:24:56 rrelyea%redhat.com Exp $ */
39 #ifndef _LOWKEYI_H_
40 #define _LOWKEYI_H_
42 #include "prtypes.h"
43 #include "seccomon.h"
44 #include "secoidt.h"
45 #include "lowkeyti.h"
47 SEC_BEGIN_PROTOS
50 * See bugzilla bug 125359
51 * Since NSS (via PKCS#11) wants to handle big integers as unsigned ints,
52 * all of the templates above that en/decode into integers must be converted
53 * from ASN.1's signed integer type. This is done by marking either the
54 * source or destination (encoding or decoding, respectively) type as
55 * siUnsignedInteger.
57 extern void prepare_low_rsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
58 extern void prepare_low_pqg_params_for_asn1(PQGParams *params);
59 extern void prepare_low_dsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
60 extern void prepare_low_dsa_priv_key_export_for_asn1(NSSLOWKEYPrivateKey *key);
61 extern void prepare_low_dh_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
62 #ifdef NSS_ENABLE_ECC
63 extern void prepare_low_ec_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
64 extern void prepare_low_ecparams_for_asn1(ECParams *params);
65 #endif /* NSS_ENABLE_ECC */
68 ** Destroy a private key object.
69 ** "key" the object
70 ** "freeit" if PR_TRUE then free the object as well as its sub-objects
72 extern void nsslowkey_DestroyPrivateKey(NSSLOWKEYPrivateKey *key);
75 ** Destroy a public key object.
76 ** "key" the object
77 ** "freeit" if PR_TRUE then free the object as well as its sub-objects
79 extern void nsslowkey_DestroyPublicKey(NSSLOWKEYPublicKey *key);
82 ** Return the modulus length of "pubKey".
84 extern unsigned int nsslowkey_PublicModulusLen(NSSLOWKEYPublicKey *pubKey);
88 ** Return the modulus length of "privKey".
90 extern unsigned int nsslowkey_PrivateModulusLen(NSSLOWKEYPrivateKey *privKey);
94 ** Convert a low private key "privateKey" into a public low key
96 extern NSSLOWKEYPublicKey
97 *nsslowkey_ConvertToPublicKey(NSSLOWKEYPrivateKey *privateKey);
99 /* Make a copy of a low private key in it's own arena.
100 * a return of NULL indicates an error.
102 extern NSSLOWKEYPrivateKey *
103 nsslowkey_CopyPrivateKey(NSSLOWKEYPrivateKey *privKey);
106 SEC_END_PROTOS
108 #endif /* _LOWKEYI_H_ */