Bug 460926 A11y hierachy is broken on Ubuntu 8.10 (GNOME 2.24), r=Evan.Yan sr=roc
[wine-gecko.git] / security / nss / lib / pki / pki3hack.h
blob3920f79c09386d12373f7c7ddaa13c20196e6573
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):
23 * Alternatively, the contents of this file may be used under the terms of
24 * either the GNU General Public License Version 2 or later (the "GPL"), or
25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 * in which case the provisions of the GPL or the LGPL are applicable instead
27 * of those above. If you wish to allow use of your version of this file only
28 * under the terms of either the GPL or the LGPL, and not to allow others to
29 * use your version of this file under the terms of the MPL, indicate your
30 * decision by deleting the provisions above and replace them with the notice
31 * and other provisions required by the GPL or the LGPL. If you do not delete
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.
35 * ***** END LICENSE BLOCK ***** */
37 #ifndef PKINSS3HACK_H
38 #define PKINSS3HACK_H
40 #ifdef DEBUG
41 static const char PKINSS3HACK_CVS_ID[] = "@(#) $RCSfile: pki3hack.h,v $ $Revision: 1.19 $ $Date: 2005/01/20 02:25:49 $";
42 #endif /* DEBUG */
44 #ifndef NSSDEVT_H
45 #include "nssdevt.h"
46 #endif /* NSSDEVT_H */
48 #ifndef DEVT_H
49 #include "devt.h"
50 #endif /* DEVT_H */
52 #ifndef NSSPKIT_H
53 #include "nsspkit.h"
54 #endif /* NSSPKIT_H */
56 #include "base.h"
58 #include "cert.h"
60 PR_BEGIN_EXTERN_C
62 #define NSSITEM_FROM_SECITEM(nssit, secit) \
63 (nssit)->data = (void *)(secit)->data; \
64 (nssit)->size = (PRUint32)(secit)->len;
66 #define SECITEM_FROM_NSSITEM(secit, nssit) \
67 (secit)->data = (unsigned char *)(nssit)->data; \
68 (secit)->len = (unsigned int)(nssit)->size;
70 NSS_EXTERN NSSTrustDomain *
71 STAN_GetDefaultTrustDomain();
73 NSS_EXTERN NSSCryptoContext *
74 STAN_GetDefaultCryptoContext();
76 NSS_EXTERN PRStatus
77 STAN_InitTokenForSlotInfo(NSSTrustDomain *td, PK11SlotInfo *slot);
79 NSS_EXTERN PRStatus
80 STAN_ResetTokenInterator(NSSTrustDomain *td);
82 NSS_EXTERN PRStatus
83 STAN_LoadDefaultNSS3TrustDomain(void);
85 NSS_EXTERN PRStatus
86 STAN_Shutdown();
88 NSS_EXTERN SECStatus
89 STAN_AddModuleToDefaultTrustDomain(SECMODModule *module);
91 NSS_EXTERN SECStatus
92 STAN_RemoveModuleFromDefaultTrustDomain(SECMODModule *module);
94 NSS_EXTERN CERTCertificate *
95 STAN_ForceCERTCertificateUpdate(NSSCertificate *c);
97 NSS_EXTERN CERTCertificate *
98 STAN_GetCERTCertificate(NSSCertificate *c);
100 NSS_EXTERN CERTCertificate *
101 STAN_GetCERTCertificateOrRelease(NSSCertificate *c);
103 NSS_EXTERN NSSCertificate *
104 STAN_GetNSSCertificate(CERTCertificate *c);
106 NSS_EXTERN CERTCertTrust *
107 nssTrust_GetCERTCertTrustForCert(NSSCertificate *c, CERTCertificate *cc);
109 NSS_EXTERN PRStatus
110 STAN_ChangeCertTrust(CERTCertificate *cc, CERTCertTrust *trust);
112 NSS_EXTERN PRStatus
113 nssPKIX509_GetIssuerAndSerialFromDER(NSSDER *der, NSSArena *arena,
114 NSSDER *issuer, NSSDER *serial);
116 NSS_EXTERN char *
117 STAN_GetCERTCertificateName(PLArenaPool *arenaOpt, NSSCertificate *c);
119 NSS_EXTERN char *
120 STAN_GetCERTCertificateNameForInstance(PLArenaPool *arenaOpt,
121 NSSCertificate *c,
122 nssCryptokiInstance *instance);
124 /* exposing this */
125 NSS_EXTERN NSSCertificate *
126 NSSCertificate_Create
128 NSSArena *arenaOpt
131 /* This function is being put here because it is a hack for
132 * PK11_FindCertFromNickname.
134 NSS_EXTERN NSSCertificate *
135 nssTrustDomain_FindBestCertificateByNicknameForToken
137 NSSTrustDomain *td,
138 NSSToken *token,
139 NSSUTF8 *name,
140 NSSTime *timeOpt, /* NULL for "now" */
141 NSSUsage *usage,
142 NSSPolicies *policiesOpt /* NULL for none */
145 /* This function is being put here because it is a hack for
146 * PK11_FindCertsFromNickname.
148 NSS_EXTERN NSSCertificate **
149 nssTrustDomain_FindCertificatesByNicknameForToken
151 NSSTrustDomain *td,
152 NSSToken *token,
153 NSSUTF8 *name,
154 NSSCertificate *rvOpt[],
155 PRUint32 maximumOpt, /* 0 for no max */
156 NSSArena *arenaOpt
159 /* CERT_TraversePermCertsForSubject */
160 NSS_EXTERN PRStatus
161 nssTrustDomain_TraverseCertificatesBySubject
163 NSSTrustDomain *td,
164 NSSDER *subject,
165 PRStatus (*callback)(NSSCertificate *c, void *arg),
166 void *arg
169 /* CERT_TraversePermCertsForNickname */
170 NSS_EXTERN PRStatus
171 nssTrustDomain_TraverseCertificatesByNickname
173 NSSTrustDomain *td,
174 NSSUTF8 *nickname,
175 PRStatus (*callback)(NSSCertificate *c, void *arg),
176 void *arg
179 /* SEC_TraversePermCerts */
180 NSS_EXTERN PRStatus
181 nssTrustDomain_TraverseCertificates
183 NSSTrustDomain *td,
184 PRStatus (*callback)(NSSCertificate *c, void *arg),
185 void *arg
188 /* CERT_AddTempCertToPerm */
189 NSS_EXTERN PRStatus
190 nssTrustDomain_AddTempCertToPerm
192 NSSCertificate *c
195 PR_END_EXTERN_C
197 #endif /* PKINSS3HACK_H */