/src/mozilla-central/security/certverifier/CTDiversityPolicy.cpp
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #include "CTDiversityPolicy.h" |
8 | | |
9 | | namespace mozilla { namespace ct { |
10 | | |
11 | | typedef mozilla::pkix::Result Result; |
12 | | |
13 | | Result |
14 | | GetCTLogOperatorsFromVerifiedSCTList(const VerifiedSCTList& list, |
15 | | CTLogOperatorList& operators) |
16 | 0 | { |
17 | 0 | operators.clear(); |
18 | 0 | for (const VerifiedSCT& verifiedSct : list) { |
19 | 0 | CTLogOperatorId sctLogOperatorId = verifiedSct.logOperatorId; |
20 | 0 | bool alreadyAdded = false; |
21 | 0 | for (CTLogOperatorId id : operators) { |
22 | 0 | if (id == sctLogOperatorId) { |
23 | 0 | alreadyAdded = true; |
24 | 0 | break; |
25 | 0 | } |
26 | 0 | } |
27 | 0 | if (!alreadyAdded) { |
28 | 0 | if (!operators.append(sctLogOperatorId)) { |
29 | 0 | return Result::FATAL_ERROR_NO_MEMORY; |
30 | 0 | } |
31 | 0 | } |
32 | 0 | } |
33 | 0 | return Success; |
34 | 0 | } |
35 | | |
36 | | Result |
37 | | CTDiversityPolicy::GetDependentOperators(const UniqueCERTCertList& builtChain, |
38 | | const CTLogOperatorList& operators, |
39 | | CTLogOperatorList& dependentOperators) |
40 | 0 | { |
41 | 0 | return Success; |
42 | 0 | } |
43 | | |
44 | | } } // namespace mozilla::ct |