security/nss/lib/certdb/certdb.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/certdb/certdb.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,83 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef _CERTDB_H_
     1.9 +#define _CERTDB_H_
    1.10 +
    1.11 +
    1.12 +/* common flags for all types of certificates */
    1.13 +#define CERTDB_TERMINAL_RECORD	(1u<<0)
    1.14 +#define CERTDB_TRUSTED		(1u<<1)
    1.15 +#define CERTDB_SEND_WARN	(1u<<2)
    1.16 +#define CERTDB_VALID_CA		(1u<<3)
    1.17 +#define CERTDB_TRUSTED_CA	(1u<<4) /* trusted for issuing server certs */
    1.18 +#define CERTDB_NS_TRUSTED_CA	(1u<<5)
    1.19 +#define CERTDB_USER		(1u<<6)
    1.20 +#define CERTDB_TRUSTED_CLIENT_CA (1u<<7) /* trusted for issuing client certs */
    1.21 +#define CERTDB_INVISIBLE_CA	(1u<<8) /* don't show in UI */
    1.22 +#define CERTDB_GOVT_APPROVED_CA	(1u<<9) /* can do strong crypto in export ver */
    1.23 +
    1.24 +/* old usage, to keep old programs compiling */
    1.25 +/* On Windows, Mac, and Linux (and other gcc platforms), we can give compile
    1.26 + * time deprecation warnings when applications use the old CERTDB_VALID_PEER
    1.27 + * define */
    1.28 +#if __GNUC__ > 3
    1.29 +#if (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)
    1.30 +typedef unsigned int __CERTDB_VALID_PEER __attribute__((deprecated));
    1.31 +#else
    1.32 +typedef unsigned int __CERTDB_VALID_PEER __attribute__((deprecated
    1.33 +    ("CERTDB_VALID_PEER is now CERTDB_TERMINAL_RECORD")));
    1.34 +#endif
    1.35 +#define CERTDB_VALID_PEER  ((__CERTDB_VALID_PEER) CERTDB_TERMINAL_RECORD)
    1.36 +#else
    1.37 +#ifdef _WIN32
    1.38 +#pragma deprecated(CERTDB_VALID_PEER)
    1.39 +#endif
    1.40 +#define CERTDB_VALID_PEER  CERTDB_TERMINAL_RECORD 
    1.41 +#endif
    1.42 +
    1.43 +SEC_BEGIN_PROTOS
    1.44 +
    1.45 +CERTSignedCrl *
    1.46 +SEC_FindCrlByKey(CERTCertDBHandle *handle, SECItem *crlKey, int type);
    1.47 +
    1.48 +CERTSignedCrl *
    1.49 +SEC_FindCrlByName(CERTCertDBHandle *handle, SECItem *crlKey, int type);
    1.50 +
    1.51 +CERTSignedCrl *
    1.52 +SEC_FindCrlByDERCert(CERTCertDBHandle *handle, SECItem *derCrl, int type);
    1.53 +
    1.54 +PRBool
    1.55 +SEC_CertNicknameConflict(const char *nickname, const SECItem *derSubject,
    1.56 +			 CERTCertDBHandle *handle);
    1.57 +CERTSignedCrl *
    1.58 +SEC_NewCrl(CERTCertDBHandle *handle, char *url, SECItem *derCrl, int type);
    1.59 +
    1.60 +SECStatus
    1.61 +SEC_DeletePermCRL(CERTSignedCrl *crl);
    1.62 +
    1.63 +
    1.64 +SECStatus
    1.65 +SEC_LookupCrls(CERTCertDBHandle *handle, CERTCrlHeadNode **nodes, int type);
    1.66 +
    1.67 +SECStatus 
    1.68 +SEC_DestroyCrl(CERTSignedCrl *crl);
    1.69 +
    1.70 +CERTSignedCrl* SEC_DupCrl(CERTSignedCrl* acrl);
    1.71 +
    1.72 +SECStatus
    1.73 +CERT_AddTempCertToPerm(CERTCertificate *cert, char *nickname,
    1.74 +		       CERTCertTrust *trust);
    1.75 +
    1.76 +SECStatus SEC_DeletePermCertificate(CERTCertificate *cert);
    1.77 +
    1.78 +PRBool
    1.79 +SEC_CrlIsNewer(CERTCrl *inNew, CERTCrl *old);
    1.80 +
    1.81 +SECCertTimeValidity
    1.82 +SEC_CheckCrlTimes(CERTCrl *crl, PRTime t);
    1.83 +
    1.84 +SEC_END_PROTOS
    1.85 +
    1.86 +#endif /* _CERTDB_H_ */

mercurial