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