00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_NET_SSL_SSLPARAMETERS_H_
00019 #define _DECAF_NET_SSL_SSLPARAMETERS_H_
00020
00021 #include <decaf/util/Config.h>
00022
00023 #include <string>
00024 #include <vector>
00025
00026 namespace decaf {
00027 namespace net {
00028 namespace ssl {
00029
00030 class DECAF_API SSLParameters {
00031 private:
00032
00033 std::vector<std::string> cipherSuites;
00034 std::vector<std::string> protocols;
00035 std::vector<std::string> serverNames;
00036 bool needClientAuth;
00037 bool wantClientAuth;
00038
00039 public:
00040
00045 SSLParameters();
00046
00054 SSLParameters(const std::vector<std::string>& cipherSuites);
00055
00065 SSLParameters(const std::vector<std::string>& cipherSuites, const std::vector<std::string>& protocols);
00066
00067 virtual ~SSLParameters();
00068
00072 std::vector<std::string> getCipherSuites() const {
00073 return this->cipherSuites;
00074 }
00075
00082 void setCipherSuites(const std::vector<std::string>& cipherSuites) {
00083 this->cipherSuites = cipherSuites;
00084 }
00085
00089 std::vector<std::string> getProtocols() const {
00090 return this->protocols;
00091 }
00092
00099 void setProtocols(const std::vector<std::string>& protocols) {
00100 this->protocols = protocols;
00101 }
00102
00106 bool getWantClientAuth() const {
00107 return this->wantClientAuth;
00108 }
00109
00116 void setWantClientAuth(bool wantClientAuth) {
00117 this->wantClientAuth = wantClientAuth;
00118 this->needClientAuth = false;
00119 }
00120
00124 bool getNeedClientAuth() const {
00125 return this->needClientAuth;
00126 }
00127
00135 void setNeedClientAuth(bool needClientAuth) {
00136 this->needClientAuth = needClientAuth;
00137 this->wantClientAuth = false;
00138 }
00139
00148 void setServerNames(const std::vector<std::string>& serverNames) {
00149 this->serverNames = serverNames;
00150 }
00151
00159 std::vector<std::string> getServerNames() const {
00160 return this->serverNames;
00161 }
00162
00163 };
00164
00165 }}}
00166
00167 #endif