summaryrefslogtreecommitdiffstats
path: root/security/manager/ssl/CommonSocketControl.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/manager/ssl/CommonSocketControl.h')
-rw-r--r--security/manager/ssl/CommonSocketControl.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/security/manager/ssl/CommonSocketControl.h b/security/manager/ssl/CommonSocketControl.h
new file mode 100644
index 0000000000..4afd79d2d0
--- /dev/null
+++ b/security/manager/ssl/CommonSocketControl.h
@@ -0,0 +1,35 @@
+/* -*- 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 CommonSocketControl_h
+#define CommonSocketControl_h
+
+#include "nsISSLSocketControl.h"
+#include "TransportSecurityInfo.h"
+
+class CommonSocketControl : public mozilla::psm::TransportSecurityInfo,
+ public nsISSLSocketControl {
+ public:
+ NS_DECL_ISUPPORTS_INHERITED
+ NS_DECL_NSISSLSOCKETCONTROL
+
+ explicit CommonSocketControl(uint32_t providerFlags);
+
+ uint32_t GetProviderFlags() const { return mProviderFlags; }
+ void SetSSLVersionUsed(int16_t version) { mSSLVersionUsed = version; }
+ void RebuildCertificateInfoFromSSLTokenCache();
+
+ protected:
+ ~CommonSocketControl() = default;
+ bool mHandshakeCompleted;
+ bool mJoined;
+ bool mSentClientCert;
+ bool mFailedVerification;
+ uint16_t mSSLVersionUsed;
+ uint32_t mProviderFlags;
+};
+
+#endif // CommonSocketControl_h