00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_NET_SSL_SSLSOCKET_H_
00019 #define _DECAF_NET_SSL_SSLSOCKET_H_
00020
00021 #include <decaf/util/Config.h>
00022
00023 #include <decaf/net/Socket.h>
00024 #include <decaf/net/ssl/SSLParameters.h>
00025
00026 namespace decaf {
00027 namespace net {
00028 namespace ssl {
00029
00034 class DECAF_API SSLSocket : public Socket {
00035 public:
00036
00037 SSLSocket();
00038
00054 SSLSocket(const InetAddress* address, int port);
00055
00074 SSLSocket(const InetAddress* address, int port, const InetAddress* localAddress, int localPort);
00075
00090 SSLSocket(const std::string& host, int port);
00091
00110 SSLSocket(const std::string& host, int port, const InetAddress* localAddress, int localPort);
00111
00112 virtual ~SSLSocket();
00113
00114 public:
00115
00122 virtual std::vector<std::string> getSupportedCipherSuites() const = 0;
00123
00130 virtual std::vector<std::string> getSupportedProtocols() const = 0;
00131
00138 virtual std::vector<std::string> getEnabledCipherSuites() const = 0;
00139
00150 virtual void setEnabledCipherSuites(const std::vector<std::string>& suites) = 0;
00151
00158 virtual std::vector<std::string> getEnabledProtocols() const = 0;
00159
00170 virtual void setEnabledProtocols(const std::vector<std::string>& protocols) = 0;
00171
00180 virtual SSLParameters getSSLParameters() const;
00181
00198 virtual void setSSLParameters(const SSLParameters& value);
00199
00210 virtual void startHandshake() = 0;
00211
00224 virtual void setUseClientMode(bool value) = 0;
00225
00232 virtual bool getUseClientMode() const = 0;
00233
00245 virtual void setNeedClientAuth(bool value) = 0;
00246
00254 virtual bool getNeedClientAuth() const = 0;
00255
00268 virtual void setWantClientAuth(bool value) = 0;
00269
00278 virtual bool getWantClientAuth() const = 0;
00279
00280 };
00281
00282 }}}
00283
00284 #endif