File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,12 @@ namespace Aws
120
120
*/
121
121
void SetVerifyPeer (bool verifyPeer) noexcept ;
122
122
123
+ /* *
124
+ * Sets the minimum TLS version allowed.
125
+ * @param minimumTlsVersion: The minimum TLS version.
126
+ */
127
+ void SetMinimumTlsVersion (aws_tls_versions minimumTlsVersion);
128
+
123
129
/* *
124
130
* Overrides the default system trust store.
125
131
* @param caPath: Path to directory containing trusted certificates, which will overrides the
Original file line number Diff line number Diff line change @@ -214,6 +214,8 @@ namespace Aws
214
214
*/
215
215
MqttClientConnectionConfigBuilder &WithTcpKeepAliveMaxProbes (uint16_t maxProbes) noexcept ;
216
216
217
+ MqttClientConnectionConfigBuilder &WithMinimumTlsVersion (aws_tls_versions minimumTlsVersion) noexcept ;
218
+
217
219
/* *
218
220
* Builds a client configuration object from the set options.
219
221
*/
Original file line number Diff line number Diff line change @@ -128,6 +128,12 @@ namespace Aws
128
128
aws_tls_ctx_options_set_verify_peer (&m_options, verify_peer);
129
129
}
130
130
131
+ void TlsContextOptions::SetMinimumTlsVersion (aws_tls_versions minimumTlsVersion)
132
+ {
133
+ AWS_ASSERT (m_isInit);
134
+ aws_tls_ctx_options_set_minimum_tls_version (&m_options, minimumTlsVersion);
135
+ }
136
+
131
137
bool TlsContextOptions::OverrideDefaultTrustStore (const char *caPath, const char *caFile) noexcept
132
138
{
133
139
AWS_ASSERT (m_isInit);
Original file line number Diff line number Diff line change @@ -250,6 +250,12 @@ namespace Aws
250
250
return *this ;
251
251
}
252
252
253
+ MqttClientConnectionConfigBuilder &MqttClientConnectionConfigBuilder::WithMinimumTlsVersion (aws_tls_versions minimumTlsVersion) noexcept
254
+ {
255
+ m_contextOptions.SetMinimumTlsVersion (minimumTlsVersion);
256
+ return *this ;
257
+ }
258
+
253
259
MqttClientConnectionConfig MqttClientConnectionConfigBuilder::Build () noexcept
254
260
{
255
261
if (!m_isGood)
You can’t perform that action at this time.
0 commit comments