// ********************************************************************** // // Copyright (c) 2003-2016 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 ICE_SSL_TRANSCEIVER_I_H #define ICE_SSL_TRANSCEIVER_I_H #include #include #include #include #include #include #include #include #include #ifdef ICE_USE_OPENSSL typedef struct ssl_st SSL; typedef struct bio_st BIO; namespace IceSSL { class ConnectorI; class AcceptorI; class TransceiverI : public IceInternal::Transceiver { public: virtual IceInternal::NativeInfoPtr getNativeInfo(); virtual IceInternal::SocketOperation initialize(IceInternal::Buffer&, IceInternal::Buffer&); virtual IceInternal::SocketOperation closing(bool, const Ice::LocalException&); virtual void close(); virtual IceInternal::SocketOperation write(IceInternal::Buffer&); virtual IceInternal::SocketOperation read(IceInternal::Buffer&); virtual std::string protocol() const; virtual std::string toString() const; virtual std::string toDetailedString() const; virtual Ice::ConnectionInfoPtr getInfo() const; virtual void checkSendSize(const IceInternal::Buffer&); virtual void setBufferSize(int rcvSize, int sndSize); int verifyCallback(int , X509_STORE_CTX*); private: TransceiverI(const InstancePtr&, const IceInternal::TransceiverPtr&, const std::string&, bool); virtual ~TransceiverI(); friend class ConnectorI; friend class AcceptorI; const InstancePtr _instance; const OpenSSLEnginePtr _engine; const std::string _host; const std::string _adapterName; const bool _incoming; const IceInternal::TransceiverPtr _delegate; bool _connected; bool _verified; std::vector _nativeCerts; SSL* _ssl; }; typedef IceUtil::Handle TransceiverIPtr; } #endif #endif