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
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.
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 ***** */
41 static const char PKINSS3HACK_CVS_ID
[] = "@(#) $RCSfile: pki3hack.h,v $ $Revision: 1.19 $ $Date: 2005/01/20 02:25:49 $";
46 #endif /* NSSDEVT_H */
54 #endif /* NSSPKIT_H */
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();
77 STAN_InitTokenForSlotInfo(NSSTrustDomain
*td
, PK11SlotInfo
*slot
);
80 STAN_ResetTokenInterator(NSSTrustDomain
*td
);
83 STAN_LoadDefaultNSS3TrustDomain(void);
89 STAN_AddModuleToDefaultTrustDomain(SECMODModule
*module
);
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
);
110 STAN_ChangeCertTrust(CERTCertificate
*cc
, CERTCertTrust
*trust
);
113 nssPKIX509_GetIssuerAndSerialFromDER(NSSDER
*der
, NSSArena
*arena
,
114 NSSDER
*issuer
, NSSDER
*serial
);
117 STAN_GetCERTCertificateName(PLArenaPool
*arenaOpt
, NSSCertificate
*c
);
120 STAN_GetCERTCertificateNameForInstance(PLArenaPool
*arenaOpt
,
122 nssCryptokiInstance
*instance
);
125 NSS_EXTERN NSSCertificate
*
126 NSSCertificate_Create
131 /* This function is being put here because it is a hack for
132 * PK11_FindCertFromNickname.
134 NSS_EXTERN NSSCertificate
*
135 nssTrustDomain_FindBestCertificateByNicknameForToken
140 NSSTime
*timeOpt
, /* NULL for "now" */
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
154 NSSCertificate
*rvOpt
[],
155 PRUint32 maximumOpt
, /* 0 for no max */
159 /* CERT_TraversePermCertsForSubject */
161 nssTrustDomain_TraverseCertificatesBySubject
165 PRStatus (*callback
)(NSSCertificate
*c
, void *arg
),
169 /* CERT_TraversePermCertsForNickname */
171 nssTrustDomain_TraverseCertificatesByNickname
175 PRStatus (*callback
)(NSSCertificate
*c
, void *arg
),
179 /* SEC_TraversePermCerts */
181 nssTrustDomain_TraverseCertificates
184 PRStatus (*callback
)(NSSCertificate
*c
, void *arg
),
188 /* CERT_AddTempCertToPerm */
190 nssTrustDomain_AddTempCertToPerm
197 #endif /* PKINSS3HACK_H */