summaryrefslogtreecommitdiffstats
path: root/security/manager/ssl/nsSSLStatus.h
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /security/manager/ssl/nsSSLStatus.h
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'security/manager/ssl/nsSSLStatus.h')
-rw-r--r--security/manager/ssl/nsSSLStatus.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/security/manager/ssl/nsSSLStatus.h b/security/manager/ssl/nsSSLStatus.h
new file mode 100644
index 000000000..2a8343407
--- /dev/null
+++ b/security/manager/ssl/nsSSLStatus.h
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef _NSSSLSTATUS_H
+#define _NSSSLSTATUS_H
+
+#include "CertVerifier.h" // For CertificateTransparencyInfo
+#include "nsISSLStatus.h"
+#include "nsCOMPtr.h"
+#include "nsXPIDLString.h"
+#include "nsIX509Cert.h"
+#include "nsISerializable.h"
+#include "nsIClassInfo.h"
+
+class nsNSSCertificate;
+
+enum class EVStatus {
+ NotEV = 0,
+ EV = 1,
+};
+
+class nsSSLStatus final
+ : public nsISSLStatus
+ , public nsISerializable
+ , public nsIClassInfo
+{
+protected:
+ virtual ~nsSSLStatus();
+public:
+ NS_DECL_THREADSAFE_ISUPPORTS
+ NS_DECL_NSISSLSTATUS
+ NS_DECL_NSISERIALIZABLE
+ NS_DECL_NSICLASSINFO
+
+ nsSSLStatus();
+
+ void SetServerCert(nsNSSCertificate* aServerCert, EVStatus aEVStatus);
+
+ bool HasServerCert() {
+ return mServerCert != nullptr;
+ }
+
+ void SetCertificateTransparencyInfo(
+ const mozilla::psm::CertificateTransparencyInfo& info);
+
+ /* public for initilization in this file */
+ uint16_t mCipherSuite;
+ uint16_t mProtocolVersion;
+ uint16_t mCertificateTransparencyStatus;
+
+ bool mIsDomainMismatch;
+ bool mIsNotValidAtThisTime;
+ bool mIsUntrusted;
+ bool mIsEV;
+
+ bool mHasIsEVStatus;
+ bool mHaveCipherSuiteAndProtocol;
+
+ /* mHaveCertErrrorBits is relied on to determine whether or not a SPDY
+ connection is eligible for joining in nsNSSSocketInfo::JoinConnection() */
+ bool mHaveCertErrorBits;
+
+private:
+ nsCOMPtr<nsIX509Cert> mServerCert;
+};
+
+#define NS_SSLSTATUS_CID \
+{ 0xe2f14826, 0x9e70, 0x4647, \
+ { 0xb2, 0x3f, 0x10, 0x10, 0xf5, 0x12, 0x46, 0x28 } }
+
+#endif