| OLD | NEW |
| (Empty) |
| 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 | |
| 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| 4 | |
| 5 #ifndef PKINSS3HACK_H | |
| 6 #define PKINSS3HACK_H | |
| 7 | |
| 8 #ifdef DEBUG | |
| 9 static const char PKINSS3HACK_CVS_ID[] = "@(#) $RCSfile: pki3hack.h,v $ $Revisio
n: 1.21 $ $Date: 2012/04/25 14:50:07 $"; | |
| 10 #endif /* DEBUG */ | |
| 11 | |
| 12 #ifndef NSSDEVT_H | |
| 13 #include "nssdevt.h" | |
| 14 #endif /* NSSDEVT_H */ | |
| 15 | |
| 16 #ifndef DEVT_H | |
| 17 #include "devt.h" | |
| 18 #endif /* DEVT_H */ | |
| 19 | |
| 20 #ifndef NSSPKIT_H | |
| 21 #include "nsspkit.h" | |
| 22 #endif /* NSSPKIT_H */ | |
| 23 | |
| 24 #include "base.h" | |
| 25 | |
| 26 #include "cert.h" | |
| 27 | |
| 28 PR_BEGIN_EXTERN_C | |
| 29 | |
| 30 #define NSSITEM_FROM_SECITEM(nssit, secit) \ | |
| 31 (nssit)->data = (void *)(secit)->data; \ | |
| 32 (nssit)->size = (PRUint32)(secit)->len; | |
| 33 | |
| 34 #define SECITEM_FROM_NSSITEM(secit, nssit) \ | |
| 35 (secit)->data = (unsigned char *)(nssit)->data; \ | |
| 36 (secit)->len = (unsigned int)(nssit)->size; | |
| 37 | |
| 38 NSS_EXTERN NSSTrustDomain * | |
| 39 STAN_GetDefaultTrustDomain(); | |
| 40 | |
| 41 NSS_EXTERN NSSCryptoContext * | |
| 42 STAN_GetDefaultCryptoContext(); | |
| 43 | |
| 44 NSS_EXTERN PRStatus | |
| 45 STAN_InitTokenForSlotInfo(NSSTrustDomain *td, PK11SlotInfo *slot); | |
| 46 | |
| 47 NSS_EXTERN PRStatus | |
| 48 STAN_ResetTokenInterator(NSSTrustDomain *td); | |
| 49 | |
| 50 NSS_EXTERN PRStatus | |
| 51 STAN_LoadDefaultNSS3TrustDomain(void); | |
| 52 | |
| 53 NSS_EXTERN PRStatus | |
| 54 STAN_Shutdown(); | |
| 55 | |
| 56 NSS_EXTERN SECStatus | |
| 57 STAN_AddModuleToDefaultTrustDomain(SECMODModule *module); | |
| 58 | |
| 59 NSS_EXTERN SECStatus | |
| 60 STAN_RemoveModuleFromDefaultTrustDomain(SECMODModule *module); | |
| 61 | |
| 62 NSS_EXTERN CERTCertificate * | |
| 63 STAN_ForceCERTCertificateUpdate(NSSCertificate *c); | |
| 64 | |
| 65 NSS_EXTERN CERTCertificate * | |
| 66 STAN_GetCERTCertificate(NSSCertificate *c); | |
| 67 | |
| 68 NSS_EXTERN CERTCertificate * | |
| 69 STAN_GetCERTCertificateOrRelease(NSSCertificate *c); | |
| 70 | |
| 71 NSS_EXTERN NSSCertificate * | |
| 72 STAN_GetNSSCertificate(CERTCertificate *c); | |
| 73 | |
| 74 NSS_EXTERN CERTCertTrust * | |
| 75 nssTrust_GetCERTCertTrustForCert(NSSCertificate *c, CERTCertificate *cc); | |
| 76 | |
| 77 NSS_EXTERN PRStatus | |
| 78 STAN_DeleteCertTrustMatchingSlot(NSSCertificate *c); | |
| 79 | |
| 80 NSS_EXTERN PRStatus | |
| 81 STAN_ChangeCertTrust(CERTCertificate *cc, CERTCertTrust *trust); | |
| 82 | |
| 83 NSS_EXTERN PRStatus | |
| 84 nssPKIX509_GetIssuerAndSerialFromDER(NSSDER *der, NSSArena *arena, | |
| 85 NSSDER *issuer, NSSDER *serial); | |
| 86 | |
| 87 NSS_EXTERN char * | |
| 88 STAN_GetCERTCertificateName(PLArenaPool *arenaOpt, NSSCertificate *c); | |
| 89 | |
| 90 NSS_EXTERN char * | |
| 91 STAN_GetCERTCertificateNameForInstance(PLArenaPool *arenaOpt, | |
| 92 NSSCertificate *c, | |
| 93 nssCryptokiInstance *instance); | |
| 94 | |
| 95 /* exposing this */ | |
| 96 NSS_EXTERN NSSCertificate * | |
| 97 NSSCertificate_Create | |
| 98 ( | |
| 99 NSSArena *arenaOpt | |
| 100 ); | |
| 101 | |
| 102 /* This function is being put here because it is a hack for | |
| 103 * PK11_FindCertFromNickname. | |
| 104 */ | |
| 105 NSS_EXTERN NSSCertificate * | |
| 106 nssTrustDomain_FindBestCertificateByNicknameForToken | |
| 107 ( | |
| 108 NSSTrustDomain *td, | |
| 109 NSSToken *token, | |
| 110 NSSUTF8 *name, | |
| 111 NSSTime *timeOpt, /* NULL for "now" */ | |
| 112 NSSUsage *usage, | |
| 113 NSSPolicies *policiesOpt /* NULL for none */ | |
| 114 ); | |
| 115 | |
| 116 /* This function is being put here because it is a hack for | |
| 117 * PK11_FindCertsFromNickname. | |
| 118 */ | |
| 119 NSS_EXTERN NSSCertificate ** | |
| 120 nssTrustDomain_FindCertificatesByNicknameForToken | |
| 121 ( | |
| 122 NSSTrustDomain *td, | |
| 123 NSSToken *token, | |
| 124 NSSUTF8 *name, | |
| 125 NSSCertificate *rvOpt[], | |
| 126 PRUint32 maximumOpt, /* 0 for no max */ | |
| 127 NSSArena *arenaOpt | |
| 128 ); | |
| 129 | |
| 130 /* CERT_TraversePermCertsForSubject */ | |
| 131 NSS_EXTERN PRStatus | |
| 132 nssTrustDomain_TraverseCertificatesBySubject | |
| 133 ( | |
| 134 NSSTrustDomain *td, | |
| 135 NSSDER *subject, | |
| 136 PRStatus (*callback)(NSSCertificate *c, void *arg), | |
| 137 void *arg | |
| 138 ); | |
| 139 | |
| 140 /* CERT_TraversePermCertsForNickname */ | |
| 141 NSS_EXTERN PRStatus | |
| 142 nssTrustDomain_TraverseCertificatesByNickname | |
| 143 ( | |
| 144 NSSTrustDomain *td, | |
| 145 NSSUTF8 *nickname, | |
| 146 PRStatus (*callback)(NSSCertificate *c, void *arg), | |
| 147 void *arg | |
| 148 ); | |
| 149 | |
| 150 /* SEC_TraversePermCerts */ | |
| 151 NSS_EXTERN PRStatus | |
| 152 nssTrustDomain_TraverseCertificates | |
| 153 ( | |
| 154 NSSTrustDomain *td, | |
| 155 PRStatus (*callback)(NSSCertificate *c, void *arg), | |
| 156 void *arg | |
| 157 ); | |
| 158 | |
| 159 /* CERT_AddTempCertToPerm */ | |
| 160 NSS_EXTERN PRStatus | |
| 161 nssTrustDomain_AddTempCertToPerm | |
| 162 ( | |
| 163 NSSCertificate *c | |
| 164 ); | |
| 165 | |
| 166 PR_END_EXTERN_C | |
| 167 | |
| 168 #endif /* PKINSS3HACK_H */ | |
| OLD | NEW |