| 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 _CERTDB_H_ | |
| 6 #define _CERTDB_H_ | |
| 7 | |
| 8 | |
| 9 /* common flags for all types of certificates */ | |
| 10 #define CERTDB_TERMINAL_RECORD (1<<0) | |
| 11 #define CERTDB_TRUSTED (1<<1) | |
| 12 #define CERTDB_SEND_WARN (1<<2) | |
| 13 #define CERTDB_VALID_CA (1<<3) | |
| 14 #define CERTDB_TRUSTED_CA (1<<4) /* trusted for issuing server certs */ | |
| 15 #define CERTDB_NS_TRUSTED_CA (1<<5) | |
| 16 #define CERTDB_USER (1<<6) | |
| 17 #define CERTDB_TRUSTED_CLIENT_CA (1<<7) /* trusted for issuing client certs */ | |
| 18 #define CERTDB_INVISIBLE_CA (1<<8) /* don't show in UI */ | |
| 19 #define CERTDB_GOVT_APPROVED_CA (1<<9) /* can do strong crypto in export ver */ | |
| 20 | |
| 21 /* old usage, to keep old programs compiling */ | |
| 22 /* On Windows, Mac, and Linux (and other gcc platforms), we can give compile | |
| 23 * time deprecation warnings when applications use the old CERTDB_VALID_PEER | |
| 24 * define */ | |
| 25 #if __GNUC__ > 3 | |
| 26 #if (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) | |
| 27 typedef unsigned int __CERTDB_VALID_PEER __attribute__((deprecated)); | |
| 28 #else | |
| 29 typedef unsigned int __CERTDB_VALID_PEER __attribute__((deprecated | |
| 30 ("CERTDB_VALID_PEER is now CERTDB_TERMINAL_RECORD"))); | |
| 31 #endif | |
| 32 #define CERTDB_VALID_PEER ((__CERTDB_VALID_PEER) CERTDB_TERMINAL_RECORD) | |
| 33 #else | |
| 34 #ifdef _WIN32 | |
| 35 #pragma deprecated(CERTDB_VALID_PEER) | |
| 36 #endif | |
| 37 #define CERTDB_VALID_PEER CERTDB_TERMINAL_RECORD | |
| 38 #endif | |
| 39 | |
| 40 SEC_BEGIN_PROTOS | |
| 41 | |
| 42 CERTSignedCrl * | |
| 43 SEC_FindCrlByKey(CERTCertDBHandle *handle, SECItem *crlKey, int type); | |
| 44 | |
| 45 CERTSignedCrl * | |
| 46 SEC_FindCrlByName(CERTCertDBHandle *handle, SECItem *crlKey, int type); | |
| 47 | |
| 48 CERTSignedCrl * | |
| 49 SEC_FindCrlByDERCert(CERTCertDBHandle *handle, SECItem *derCrl, int type); | |
| 50 | |
| 51 PRBool | |
| 52 SEC_CertNicknameConflict(const char *nickname, SECItem *derSubject, | |
| 53 CERTCertDBHandle *handle); | |
| 54 CERTSignedCrl * | |
| 55 SEC_NewCrl(CERTCertDBHandle *handle, char *url, SECItem *derCrl, int type); | |
| 56 | |
| 57 SECStatus | |
| 58 SEC_DeletePermCRL(CERTSignedCrl *crl); | |
| 59 | |
| 60 | |
| 61 SECStatus | |
| 62 SEC_LookupCrls(CERTCertDBHandle *handle, CERTCrlHeadNode **nodes, int type); | |
| 63 | |
| 64 SECStatus | |
| 65 SEC_DestroyCrl(CERTSignedCrl *crl); | |
| 66 | |
| 67 CERTSignedCrl* SEC_DupCrl(CERTSignedCrl* acrl); | |
| 68 | |
| 69 SECStatus | |
| 70 CERT_AddTempCertToPerm(CERTCertificate *cert, char *nickname, | |
| 71 CERTCertTrust *trust); | |
| 72 | |
| 73 SECStatus SEC_DeletePermCertificate(CERTCertificate *cert); | |
| 74 | |
| 75 PRBool | |
| 76 SEC_CrlIsNewer(CERTCrl *inNew, CERTCrl *old); | |
| 77 | |
| 78 SECCertTimeValidity | |
| 79 SEC_CheckCrlTimes(CERTCrl *crl, PRTime t); | |
| 80 | |
| 81 SEC_END_PROTOS | |
| 82 | |
| 83 #endif /* _CERTDB_H_ */ | |
| OLD | NEW |