1 // 2 // Copyright (c) ZeroC, Inc. All rights reserved. 3 // 4 5 #ifndef ICESSL_SECURE_TRANSPORT_ENGINE_H 6 #define ICESSL_SECURE_TRANSPORT_ENGINE_H 7 8 #ifdef __APPLE__ 9 10 #include <IceSSL/SSLEngine.h> 11 #include <Ice/UniqueRef.h> 12 13 #include <Security/Security.h> 14 #include <Security/SecureTransport.h> 15 16 namespace IceSSL 17 { 18 19 namespace SecureTransport 20 { 21 22 class SSLEngine : public IceSSL::SSLEngine 23 { 24 public: 25 26 SSLEngine(const Ice::CommunicatorPtr&); 27 28 virtual void initialize(); 29 virtual void destroy(); 30 virtual IceInternal::TransceiverPtr 31 createTransceiver(const InstancePtr&, const IceInternal::TransceiverPtr&, const std::string&, bool); 32 33 SSLContextRef newContext(bool); 34 CFArrayRef getCertificateAuthorities() const; 35 std::string getCipherName(SSLCipherSuite) const; 36 37 private: 38 39 void parseCiphers(const std::string&); 40 41 IceInternal::UniqueRef<CFArrayRef> _certificateAuthorities; 42 IceInternal::UniqueRef<CFArrayRef> _chain; 43 44 SSLProtocol _protocolVersionMax; 45 SSLProtocol _protocolVersionMin; 46 47 #if TARGET_OS_IPHONE==0 48 std::vector<char> _dhParams; 49 #endif 50 std::vector<SSLCipherSuite> _ciphers; 51 }; 52 53 } // SecureTransport namespace end 54 55 } // IceSSL namespace end 56 57 #endif 58 59 #endif 60