/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Policy options for matching id-Netscape-stepUp with id-kp-serverAuth (for CA // certificates only): // * Always match: the step-up OID is considered equivalent to serverAuth // * Match before 23 August 2016: the OID is considered equivalent if the // certificate's notBefore is before 23 August 2016 // * Match before 23 August 2015: similarly, but for 23 August 2015 // * Never match: the OID is never considered equivalent to serverAuth enumclass NetscapeStepUpPolicy : uint32_t {
AlwaysMatch = 0,
MatchBefore23August2016 = 1,
MatchBefore23August2015 = 2,
NeverMatch = 3,
};
// Helper struct to associate the DER bytes of a potential issuer certificate // with its source (i.e. where it came from). struct IssuerCandidateWithSource {
mozilla::pkix::Input mDER; // non-owning
IssuerSource mIssuerSource;
};
/** * Loads root certificates from a module. * * @param dir * The path to the directory containing the NSS builtin roots module. * Usually the same as the path to the other NSS shared libraries. * If empty, the (library) path will be searched. * @return true if the roots were successfully loaded, false otherwise.
*/ bool LoadLoadableRoots(const nsCString& dir);
/** * Loads the OS client certs module. * * @return true if the module was successfully loaded, false otherwise.
*/ bool LoadOSClientCertsModule();
/** * Loads the IPC client certs module. * * @param dir * The path to the directory containing the module. This should be the * same as where all of the other gecko libraries live. * @return true if the module was successfully loaded, false otherwise.
*/ bool LoadIPCClientCertsModule(const nsCString& dir);
/** * Unloads the loadable roots module and os client certs module, if loaded.
*/ void UnloadUserModules();
/** * Build nsTArray<uint8_t>s out of the issuer, serial, subject and public key * data from the supplied certificate for use in revocation checks. * * @param certDER * The Input that references the encoded bytes of the certificate. * @param endEntityOrCA * Whether the certificate is an end-entity or CA. * @param out encIssuer * The array to populate with issuer data. * @param out encSerial * The array to populate with serial number data. * @param out encSubject * The array to populate with subject data. * @param out encPubKey * The array to populate with public key data. * @return * Result::Success, unless there's a problem decoding the certificate.
*/
pkix::Result BuildRevocationCheckArrays(pkix::Input certDER,
pkix::EndEntityOrCA endEntityOrCA, /*out*/ nsTArray<uint8_t>& issuerBytes, /*out*/ nsTArray<uint8_t>& serialBytes, /*out*/ nsTArray<uint8_t>& subjectBytes, /*out*/ nsTArray<uint8_t>& pubKeyBytes);
class NSSCertDBTrustDomain : public mozilla::pkix::TrustDomain { public: typedef mozilla::pkix::Result Result;
// SCT lists (see Certificate Transparency) extracted during // certificate verification. Note that the returned Inputs are invalidated // the next time a chain is built and by ResetAccumulatedState method // (and when the TrustDomain object is destroyed).
Result CheckRevocationByCRLite(const mozilla::pkix::CertID& certID, const mozilla::pkix::Input& sctExtension, /*out*/ bool& crliteCoversCertificate);
Result CheckRevocationByOCSP( const mozilla::pkix::CertID& certID, mozilla::pkix::Time time,
mozilla::pkix::Duration validityDuration, const nsCString& aiaLocation, constbool crliteCoversCertificate, const Result crliteResult, /*optional*/ const mozilla::pkix::Input* stapledOCSPResponse, /*out*/ bool& softFailure);
Result SynchronousCheckRevocationWithServer( const mozilla::pkix::CertID& certID, const nsCString& aiaLocation,
mozilla::pkix::Time time, uint16_t maxOCSPLifetimeInDays, const Result cachedResponseResult, const Result stapledOCSPResponseResult, constbool crliteFilterCoversCertificate, const Result crliteResult, /*out*/ bool& softFailure);
Result HandleOCSPFailure(const Result cachedResponseResult, const Result stapledOCSPResponseResult, const Result error, /*out*/ bool& softFailure);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.