summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/SecureTransportEngine.h
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-03-16 16:11:24 +0100
committerJose <jose@zeroc.com>2017-03-16 16:11:24 +0100
commitc6f4057a8975e2312d82f22af59f2069d2b5e8ab (patch)
tree1312f2c5798821dd8b4c583f30983542d9528790 /cpp/src/IceSSL/SecureTransportEngine.h
parentRemoved C# Ice.BatchRequestInterceptor (ICE-7662) (diff)
downloadice-c6f4057a8975e2312d82f22af59f2069d2b5e8ab.tar.bz2
ice-c6f4057a8975e2312d82f22af59f2069d2b5e8ab.tar.xz
ice-c6f4057a8975e2312d82f22af59f2069d2b5e8ab.zip
Fixed (ICE-7621) - Refactor IceSSL API to support multiple implementations
Diffstat (limited to 'cpp/src/IceSSL/SecureTransportEngine.h')
-rw-r--r--cpp/src/IceSSL/SecureTransportEngine.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/cpp/src/IceSSL/SecureTransportEngine.h b/cpp/src/IceSSL/SecureTransportEngine.h
new file mode 100644
index 00000000000..21960de78dc
--- /dev/null
+++ b/cpp/src/IceSSL/SecureTransportEngine.h
@@ -0,0 +1,60 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef ICESSL_SECURE_TRANSPORT_ENGINE_H
+#define ICESSL_SECURE_TRANSPORT_ENGINE_H
+
+#include <IceSSL/SSLEngine.h>
+#include <Ice/UniqueRef.h>
+
+#include <Security/Security.h>
+#include <Security/SecureTransport.h>
+
+namespace IceSSL
+{
+
+namespace SecureTransport
+{
+
+class SSLEngine : public IceSSL::SSLEngine
+{
+public:
+
+ SSLEngine(const Ice::CommunicatorPtr&);
+
+ virtual void initialize();
+ virtual void destroy();
+ virtual IceInternal::TransceiverPtr
+ createTransceiver(const InstancePtr&, const IceInternal::TransceiverPtr&, const std::string&, bool);
+
+ SSLContextRef newContext(bool);
+ CFArrayRef getCertificateAuthorities() const;
+ std::string getCipherName(SSLCipherSuite) const;
+
+private:
+
+ void parseCiphers(const std::string&);
+
+ IceInternal::UniqueRef<CFArrayRef> _certificateAuthorities;
+ IceInternal::UniqueRef<CFArrayRef> _chain;
+
+ SSLProtocol _protocolVersionMax;
+ SSLProtocol _protocolVersionMin;
+
+#if TARGET_OS_IPHONE==0
+ std::vector<char> _dhParams;
+#endif
+ std::vector<SSLCipherSuite> _ciphers;
+};
+
+} // SecureTransport namespace end
+
+} // IceSSL namespace end
+
+#endif