tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ExtendedValidation.h (1232B)


      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/. */
      5 
      6 #ifndef ExtendedValidation_h
      7 #define ExtendedValidation_h
      8 
      9 #include "ScopedNSSTypes.h"
     10 #include "certt.h"
     11 
     12 namespace mozilla {
     13 namespace pkix {
     14 struct CertPolicyId;
     15 }  // namespace pkix
     16 }  // namespace mozilla
     17 
     18 namespace mozilla {
     19 namespace psm {
     20 
     21 nsresult LoadExtendedValidationInfo();
     22 
     23 /**
     24 * Finds all policy OIDs in the given cert that are known to be EV policy OIDs.
     25 *
     26 * @param cert
     27 *        The bytes of the cert to find the EV policies of.
     28 * @param policies
     29 *        The found policies.
     30 */
     31 void GetKnownEVPolicies(
     32    const nsTArray<uint8_t>& cert,
     33    /*out*/ nsTArray<mozilla::pkix::CertPolicyId>& policies);
     34 
     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);
     39 
     40 }  // namespace psm
     41 }  // namespace mozilla
     42 
     43 #endif  // ExtendedValidation_h