1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef CTDiversityPolicy_h
8 #define CTDiversityPolicy_h
11 #include "CTVerifyResult.h"
14 #include "mozpkix/Result.h"
19 // Retuns the list of unique CT log operator IDs appearing in the provided
20 // list of verified SCTs.
21 void GetCTLogOperatorsFromVerifiedSCTList(const VerifiedSCTList
& list
,
22 CTLogOperatorList
& operators
);
24 // Helper class used by CTPolicyEnforcer to check the CT log operators
25 // diversity requirements of the CT Policy.
26 // See CTPolicyEnforcer.h for more details.
27 class CTDiversityPolicy
{
29 // Given a certificate chain and a set of CT log operators,
30 // returns the subset of log operators that are dependent on the CA
31 // issuing the certificate (as defined by the CT Policy).
33 // NOTE: TBD, PENDING FINALIZATION OF MOZILLA CT POLICY.
34 pkix::Result
GetDependentOperators(
35 const nsTArray
<nsTArray
<uint8_t>>& builtChain
,
36 const CTLogOperatorList
& operators
,
37 CTLogOperatorList
& dependentOperators
);
41 } // namespace mozilla
43 #endif // CTDiversityPolicy_h