tor-browser

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

RootCertificateTelemetryUtils.h (1224B)


      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 #ifndef RootCertificateTelemetryUtils_h
      8 #define RootCertificateTelemetryUtils_h
      9 
     10 #include "mozilla/Span.h"
     11 
     12 namespace mozilla {
     13 namespace psm {
     14 
     15 // Note: New CAs will show up as UNKNOWN_ROOT until
     16 // RootHashes.inc is updated to include them. 0 is reserved by
     17 // genRootCAHashes.js for the unknowns.
     18 #define ROOT_CERTIFICATE_UNKNOWN 0
     19 // 1 indicates the CA is not a built-in and comes from the softoken (cert9.db)
     20 #define ROOT_CERTIFICATE_SOFTOKEN 1
     21 // 2 indicates the CA is not a bilt-in and comes from an external PKCS#11 token
     22 #define ROOT_CERTIFICATE_EXTERNAL_TOKEN 2
     23 // 3 indicates the CA is not a built-in and comes from the OS via the
     24 // "Enterprise Roots" feature
     25 #define ROOT_CERTIFICATE_ENTERPRISE_ROOT 3
     26 #define ROOT_CERTIFICATE_HASH_FAILURE -1
     27 
     28 int32_t RootCABinNumber(Span<const uint8_t> cert);
     29 
     30 }  // namespace psm
     31 }  // namespace mozilla
     32 
     33 #endif  // RootCertificateTelemetryUtils_h