activemq-cpp-3.8.2
SSLParameters.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _DECAF_NET_SSL_SSLPARAMETERS_H_
19 #define _DECAF_NET_SSL_SSLPARAMETERS_H_
20 
21 #include <decaf/util/Config.h>
22 
23 #include <string>
24 #include <vector>
25 
26 namespace decaf {
27 namespace net {
28 namespace ssl {
29 
31  private:
32 
33  std::vector<std::string> cipherSuites;
34  std::vector<std::string> protocols;
35  std::vector<std::string> serverNames;
36  bool needClientAuth;
37  bool wantClientAuth;
38 
39  public:
40 
45  SSLParameters();
46 
54  SSLParameters(const std::vector<std::string>& cipherSuites);
55 
65  SSLParameters(const std::vector<std::string>& cipherSuites, const std::vector<std::string>& protocols);
66 
67  virtual ~SSLParameters();
68 
72  std::vector<std::string> getCipherSuites() const {
73  return this->cipherSuites;
74  }
75 
82  void setCipherSuites(const std::vector<std::string>& cipherSuites) {
83  this->cipherSuites = cipherSuites;
84  }
85 
89  std::vector<std::string> getProtocols() const {
90  return this->protocols;
91  }
92 
99  void setProtocols(const std::vector<std::string>& protocols) {
100  this->protocols = protocols;
101  }
102 
106  bool getWantClientAuth() const {
107  return this->wantClientAuth;
108  }
109 
116  void setWantClientAuth(bool wantClientAuth) {
117  this->wantClientAuth = wantClientAuth;
118  this->needClientAuth = false;
119  }
120 
124  bool getNeedClientAuth() const {
125  return this->needClientAuth;
126  }
127 
135  void setNeedClientAuth(bool needClientAuth) {
136  this->needClientAuth = needClientAuth;
137  this->wantClientAuth = false;
138  }
139 
148  void setServerNames(const std::vector<std::string>& serverNames) {
149  this->serverNames = serverNames;
150  }
151 
159  std::vector<std::string> getServerNames() const {
160  return this->serverNames;
161  }
162 
163  };
164 
165 }}}
166 
167 #endif /* _DECAF_NET_SSL_SSLPARAMETERS_H_ */
std::vector< std::string > getServerNames() const
Gets the currently set list of server names used.
Definition: SSLParameters.h:159
std::vector< std::string > getCipherSuites() const
Definition: SSLParameters.h:72
void setServerNames(const std::vector< std::string > &serverNames)
Sets the Server Names that this client wants to encode for use during the SSL Handshaking phase...
Definition: SSLParameters.h:148
void setWantClientAuth(bool wantClientAuth)
Sets whether client authentication should be requested.
Definition: SSLParameters.h:116
void setProtocols(const std::vector< std::string > &protocols)
Sets the vector of protocols.
Definition: SSLParameters.h:99
std::vector< std::string > getProtocols() const
Definition: SSLParameters.h:89
void setNeedClientAuth(bool needClientAuth)
Sets whether client authentication should be required.
Definition: SSLParameters.h:135
Definition: SSLParameters.h:30
#define DECAF_API
Definition: Config.h:29
bool getNeedClientAuth() const
Definition: SSLParameters.h:124
void setCipherSuites(const std::vector< std::string > &cipherSuites)
Sets the vector of ciphersuites.
Definition: SSLParameters.h:82
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25
bool getWantClientAuth() const
Definition: SSLParameters.h:106