Bug 1857386 [wpt PR 42383] - Update wpt metadata, a=testonly
[gecko.git] / security / certverifier / ExtendedValidation.h
blobc090f6d8e36aef5205c036306f1e44f20c97ae2e
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef ExtendedValidation_h
7 #define ExtendedValidation_h
9 #include "ScopedNSSTypes.h"
10 #include "certt.h"
12 namespace mozilla {
13 namespace pkix {
14 struct CertPolicyId;
15 } // namespace pkix
16 } // namespace mozilla
18 namespace mozilla {
19 namespace psm {
21 nsresult LoadExtendedValidationInfo();
23 /**
24 * Finds all policy OIDs in the given cert that are known to be EV policy OIDs.
26 * @param cert
27 * The bytes of the cert to find the EV policies of.
28 * @param policies
29 * The found policies.
31 void GetKnownEVPolicies(
32 const nsTArray<uint8_t>& cert,
33 /*out*/ nsTArray<mozilla::pkix::CertPolicyId>& policies);
35 // CertIsAuthoritativeForEVPolicy does NOT evaluate whether the cert is trusted
36 // or distrusted.
37 bool CertIsAuthoritativeForEVPolicy(const nsTArray<uint8_t>& cert,
38 const mozilla::pkix::CertPolicyId& policy);
40 } // namespace psm
41 } // namespace mozilla
43 #endif // ExtendedValidation_h