2014-02-15 02:37:07 +04:00
|
|
|
/* -*- 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_psm_AppsTrustDomain_h
|
|
|
|
#define mozilla_psm_AppsTrustDomain_h
|
|
|
|
|
2014-03-21 01:29:21 +04:00
|
|
|
#include "pkix/pkixtypes.h"
|
2014-02-15 02:37:07 +04:00
|
|
|
#include "nsDebug.h"
|
|
|
|
#include "nsIX509CertDB.h"
|
|
|
|
|
|
|
|
namespace mozilla { namespace psm {
|
|
|
|
|
2014-03-21 01:29:21 +04:00
|
|
|
class AppTrustDomain MOZ_FINAL : public mozilla::pkix::TrustDomain
|
2014-02-15 02:37:07 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
AppTrustDomain(void* pinArg);
|
|
|
|
|
|
|
|
SECStatus SetTrustedRoot(AppTrustedRoot trustedRoot);
|
|
|
|
|
2014-03-21 01:29:21 +04:00
|
|
|
SECStatus GetCertTrust(mozilla::pkix::EndEntityOrCA endEntityOrCA,
|
2014-05-16 05:59:52 +04:00
|
|
|
const mozilla::pkix::CertPolicyId& policy,
|
2014-02-15 02:37:07 +04:00
|
|
|
const CERTCertificate* candidateCert,
|
2014-04-26 03:29:26 +04:00
|
|
|
/*out*/ mozilla::pkix::TrustLevel* trustLevel) MOZ_OVERRIDE;
|
2014-02-15 02:37:07 +04:00
|
|
|
SECStatus FindPotentialIssuers(const SECItem* encodedIssuerName,
|
|
|
|
PRTime time,
|
2014-03-21 01:29:21 +04:00
|
|
|
/*out*/ mozilla::pkix::ScopedCERTCertList& results)
|
2014-02-15 02:37:07 +04:00
|
|
|
MOZ_OVERRIDE;
|
|
|
|
SECStatus VerifySignedData(const CERTSignedData* signedData,
|
|
|
|
const CERTCertificate* cert) MOZ_OVERRIDE;
|
2014-03-21 01:29:21 +04:00
|
|
|
SECStatus CheckRevocation(mozilla::pkix::EndEntityOrCA endEntityOrCA,
|
2014-02-17 05:35:40 +04:00
|
|
|
const CERTCertificate* cert,
|
|
|
|
/*const*/ CERTCertificate* issuerCertToDup,
|
|
|
|
PRTime time,
|
|
|
|
/*optional*/ const SECItem* stapledOCSPresponse);
|
2014-02-06 02:49:10 +04:00
|
|
|
SECStatus IsChainValid(const CERTCertList* certChain) { return SECSuccess; }
|
|
|
|
|
2014-02-15 02:37:07 +04:00
|
|
|
private:
|
|
|
|
void* mPinArg; // non-owning!
|
2014-03-21 01:29:21 +04:00
|
|
|
mozilla::pkix::ScopedCERTCertificate mTrustedRoot;
|
2014-02-15 02:37:07 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} } // namespace mozilla::psm
|
|
|
|
|
|
|
|
#endif // mozilla_psm_AppsTrustDomain_h
|