LCOV - code coverage report
Current view: top level - security/manager/ssl - nsSSLStatus.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 2 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
       2             :  *
       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 _NSSSLSTATUS_H
       8             : #define _NSSSLSTATUS_H
       9             : 
      10             : #include "CertVerifier.h" // For CertificateTransparencyInfo
      11             : #include "nsISSLStatus.h"
      12             : #include "nsCOMPtr.h"
      13             : #include "nsXPIDLString.h"
      14             : #include "nsIX509Cert.h"
      15             : #include "nsISerializable.h"
      16             : #include "nsIClassInfo.h"
      17             : 
      18             : class nsNSSCertificate;
      19             : 
      20             : enum class EVStatus {
      21             :   NotEV = 0,
      22             :   EV = 1,
      23             : };
      24             : 
      25             : class nsSSLStatus final
      26             :   : public nsISSLStatus
      27             :   , public nsISerializable
      28             :   , public nsIClassInfo
      29             : {
      30             : protected:
      31             :   virtual ~nsSSLStatus();
      32             : public:
      33             :   NS_DECL_THREADSAFE_ISUPPORTS
      34             :   NS_DECL_NSISSLSTATUS
      35             :   NS_DECL_NSISERIALIZABLE
      36             :   NS_DECL_NSICLASSINFO
      37             : 
      38             :   nsSSLStatus();
      39             : 
      40             :   void SetServerCert(nsNSSCertificate* aServerCert, EVStatus aEVStatus);
      41             : 
      42           0 :   bool HasServerCert() {
      43           0 :     return mServerCert != nullptr;
      44             :   }
      45             : 
      46             :   void SetCertificateTransparencyInfo(
      47             :     const mozilla::psm::CertificateTransparencyInfo& info);
      48             : 
      49             :   /* public for initilization in this file */
      50             :   uint16_t mCipherSuite;
      51             :   uint16_t mProtocolVersion;
      52             :   uint16_t mCertificateTransparencyStatus;
      53             : 
      54             :   bool mIsDomainMismatch;
      55             :   bool mIsNotValidAtThisTime;
      56             :   bool mIsUntrusted;
      57             :   bool mIsEV;
      58             : 
      59             :   bool mHasIsEVStatus;
      60             :   bool mHaveCipherSuiteAndProtocol;
      61             : 
      62             :   /* mHaveCertErrrorBits is relied on to determine whether or not a SPDY
      63             :      connection is eligible for joining in nsNSSSocketInfo::JoinConnection() */
      64             :   bool mHaveCertErrorBits;
      65             : 
      66             : private:
      67             :   nsCOMPtr<nsIX509Cert> mServerCert;
      68             : };
      69             : 
      70             : #define NS_SSLSTATUS_CID \
      71             : { 0xe2f14826, 0x9e70, 0x4647, \
      72             :   { 0xb2, 0x3f, 0x10, 0x10, 0xf5, 0x12, 0x46, 0x28 } }
      73             : 
      74             : #endif

Generated by: LCOV version 1.13