| 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 PKITM_H | 5 #ifndef PKITM_H |
| 6 #define PKITM_H | 6 #define PKITM_H |
| 7 | 7 |
| 8 #ifdef DEBUG | 8 #ifdef DEBUG |
| 9 static const char PKITM_CVS_ID[] = "@(#) $RCSfile: pkitm.h,v $ $Revision: 1.17 $
$Date: 2012/07/27 21:41:52 $"; | 9 static const char PKITM_CVS_ID[] = "@(#) $RCSfile: pkitm.h,v $ $Revision: 1.17 $
$Date: 2012/07/27 21:41:52 $"; |
| 10 #endif /* DEBUG */ | 10 #endif /* DEBUG */ |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 /* is this cert a valid CA cert? */ | 51 /* is this cert a valid CA cert? */ |
| 52 PRBool (*isValidIssuer)(nssDecodedCert *dc); | 52 PRBool (*isValidIssuer)(nssDecodedCert *dc); |
| 53 /* returns the cert usage */ | 53 /* returns the cert usage */ |
| 54 NSSUsage * (*getUsage)(nssDecodedCert *dc); | 54 NSSUsage * (*getUsage)(nssDecodedCert *dc); |
| 55 /* is time within the validity period of the cert? */ | 55 /* is time within the validity period of the cert? */ |
| 56 PRBool (*isValidAtTime)(nssDecodedCert *dc, NSSTime *time); | 56 PRBool (*isValidAtTime)(nssDecodedCert *dc, NSSTime *time); |
| 57 /* is the validity period of this cert newer than cmpdc? */ | 57 /* is the validity period of this cert newer than cmpdc? */ |
| 58 PRBool (*isNewerThan)(nssDecodedCert *dc, nssDecodedCert *cmpdc); | 58 PRBool (*isNewerThan)(nssDecodedCert *dc, nssDecodedCert *cmpdc); |
| 59 /* does the usage for this cert match the requested usage? */ | 59 /* does the usage for this cert match the requested usage? */ |
| 60 PRBool (*matchUsage)(nssDecodedCert *dc, const NSSUsage *usage); | 60 PRBool (*matchUsage)(nssDecodedCert *dc, const NSSUsage *usage); |
| 61 /* is this cert trusted for the requested usage? */ |
| 62 PRBool (*isTrustedForUsage)(nssDecodedCert *dc, |
| 63 const NSSUsage *usage); |
| 61 /* extract the email address */ | 64 /* extract the email address */ |
| 62 NSSASCII7 *(*getEmailAddress)(nssDecodedCert *dc); | 65 NSSASCII7 *(*getEmailAddress)(nssDecodedCert *dc); |
| 63 /* extract the DER-encoded serial number */ | 66 /* extract the DER-encoded serial number */ |
| 64 PRStatus (*getDERSerialNumber)(nssDecodedCert *dc, | 67 PRStatus (*getDERSerialNumber)(nssDecodedCert *dc, |
| 65 NSSDER *derSerial, NSSArena *arena); | 68 NSSDER *derSerial, NSSArena *arena); |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 struct NSSUsageStr { | 71 struct NSSUsageStr { |
| 69 PRBool anyUsage; | 72 PRBool anyUsage; |
| 70 SECCertUsage nss3usage; | 73 SECCertUsage nss3usage; |
| 71 PRBool nss3lookingForCA; | 74 PRBool nss3lookingForCA; |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 typedef struct nssPKIObjectCollectionStr nssPKIObjectCollection; | 77 typedef struct nssPKIObjectCollectionStr nssPKIObjectCollection; |
| 75 | 78 |
| 76 typedef struct | 79 typedef struct |
| 77 { | 80 { |
| 78 union { | 81 union { |
| 79 PRStatus (* cert)(NSSCertificate *c, void *arg); | 82 PRStatus (* cert)(NSSCertificate *c, void *arg); |
| 80 PRStatus (* crl)(NSSCRL *crl, void *arg); | 83 PRStatus (* crl)(NSSCRL *crl, void *arg); |
| 81 PRStatus (* pvkey)(NSSPrivateKey *vk, void *arg); | 84 PRStatus (* pvkey)(NSSPrivateKey *vk, void *arg); |
| 82 PRStatus (* pbkey)(NSSPublicKey *bk, void *arg); | 85 PRStatus (* pbkey)(NSSPublicKey *bk, void *arg); |
| 83 } func; | 86 } func; |
| 84 void *arg; | 87 void *arg; |
| 85 } nssPKIObjectCallback; | 88 } nssPKIObjectCallback; |
| 86 | 89 |
| 87 PR_END_EXTERN_C | 90 PR_END_EXTERN_C |
| 88 | 91 |
| 89 #endif /* PKITM_H */ | 92 #endif /* PKITM_H */ |
| OLD | NEW |