Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ env:
RUN: ${{ github.run_id }}-${{ github.run_number }}
CRT_CI_ROLE: ${{ secrets.CRT_CI_ROLE_ARN }}
AWS_DEFAULT_REGION: us-east-1
WINDOWS_CI_DIR: "C:/a/work"

permissions:
id-token: write # This is required for requesting the JWT
Expand Down Expand Up @@ -234,8 +233,6 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
md ${{ env.WINDOWS_CI_DIR }}
cd ${{ env.WINDOWS_CI_DIR }}
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }}

Expand All @@ -251,8 +248,6 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
md ${{ env.WINDOWS_CI_DIR }}
cd ${{ env.WINDOWS_CI_DIR }}
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --compiler msvc-17 --target windows-${{ matrix.arch }}

Expand All @@ -265,8 +260,6 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
md ${{ env.WINDOWS_CI_DIR }}
cd ${{ env.WINDOWS_CI_DIR }}
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON

Expand All @@ -285,8 +278,6 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
md ${{ env.WINDOWS_CI_DIR }}
cd ${{ env.WINDOWS_CI_DIR }}
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON

Expand All @@ -299,8 +290,6 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
md ${{ env.WINDOWS_CI_DIR }}
cd ${{ env.WINDOWS_CI_DIR }}
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DUSE_CPU_EXTENSIONS=OFF

Expand Down
11 changes: 11 additions & 0 deletions include/aws/iot/Mqtt5Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,17 @@ namespace Aws
*/
Mqtt5ClientBuilder &WithCertificateAuthority(const Crt::ByteCursor &cert) noexcept;

/**
* Sets the tls cipher preference for the tls context options.
*
* @param cipherPref the tls cipher preference to use for the tls context options.
* Warning: aws_tls_cipher_pref::AWS_IO_TLS_CIPHER_PREF_TLSV1_2_2025_07 is only supported on Linux platforms
* using the s2n library.
*
* @return this builder object
*/
Mqtt5ClientBuilder &WithTlsCipherPreference(aws_tls_cipher_pref cipherPref) noexcept;

/**
* Overrides the socket properties of the underlying MQTT connections made by the client. Leave undefined
* to use defaults (no TCP keep alive, 10 second socket timeout).
Expand Down
11 changes: 11 additions & 0 deletions include/aws/iot/MqttClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,17 @@ namespace Aws
*/
MqttClientConnectionConfigBuilder &WithMinimumTlsVersion(aws_tls_versions minimumTlsVersion) noexcept;

/**
* Sets the tls cipher preference for the tls context options.
*
* @param cipherPref the tls cipher preference to use for the tls context options.
* Warning: aws_tls_cipher_pref::AWS_IO_TLS_CIPHER_PREF_TLSV1_2_2025_07 is only supported on Linux platforms
* using the s2n library.
*
* @return this builder object
*/
MqttClientConnectionConfigBuilder &WithTlsCipherPreference(aws_tls_cipher_pref cipherPref) noexcept;

/**
* Sets http proxy options.
*
Expand Down
9 changes: 9 additions & 0 deletions source/iot/Mqtt5Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,15 @@ namespace Aws
return *this;
}

Mqtt5ClientBuilder &Mqtt5ClientBuilder::WithTlsCipherPreference(aws_tls_cipher_pref cipherPref) noexcept
{
if (m_tlsConnectionOptions)
{
m_tlsConnectionOptions->SetTlsCipherPreference(cipherPref);
}
return *this;
}

Mqtt5ClientBuilder &Mqtt5ClientBuilder::WithSocketOptions(Crt::Io::SocketOptions socketOptions) noexcept
{
m_options->WithSocketOptions(std::move(socketOptions));
Expand Down
15 changes: 14 additions & 1 deletion source/iot/MqttClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,20 @@ namespace Aws
MqttClientConnectionConfigBuilder &MqttClientConnectionConfigBuilder::WithMinimumTlsVersion(
aws_tls_versions minimumTlsVersion) noexcept
{
m_contextOptions.SetMinimumTlsVersion(minimumTlsVersion);
if (m_contextOptions)
{
m_contextOptions.SetMinimumTlsVersion(minimumTlsVersion);
}
return *this;
}

MqttClientConnectionConfigBuilder &MqttClientConnectionConfigBuilder::WithTlsCipherPreference(
aws_tls_cipher_pref cipherPref) noexcept
{
if (m_contextOptions)
{
m_contextOptions.SetTlsCipherPreference(cipherPref);
}
return *this;
}

Expand Down