Skip to content

Add aes256-sha384 TLS cipher feature#135

Open
pawelchcki wants to merge 1 commit into
drogue-iot:mainfrom
pawelchcki:aes256-sha384-cipher
Open

Add aes256-sha384 TLS cipher feature#135
pawelchcki wants to merge 1 commit into
drogue-iot:mainfrom
pawelchcki:aes256-sha384-cipher

Conversation

@pawelchcki
Copy link
Copy Markdown

@pawelchcki pawelchcki commented Jun 1, 2026

Summary

  • add an aes256-sha384 feature for embedded-tls
  • keep TLS_AES_128_GCM_SHA256 as the default embedded-tls cipher suite
  • switch embedded-tls to TLS_AES_256_GCM_SHA384 when aes256-sha384 is enabled
  • pin embedded-tls to the oldest working revision with reqwless-compatible features, rustpki, and AES-256/SHA-384 support
  • pin esp-mbedtls before the package rename in Rename esp-mbedtls to mbedtls-rs esp-rs/mbedtls-rs#107

Notes

This keeps the client API unchanged. The cipher suite is selected at compile time through Cargo features, avoiding the runtime wrapper enum needed for configurable cipher selection.

dd97196dfd56c836b6267dc89f1fe618094f72a3 is the oldest practical embedded-tls pin I found. Earlier useful candidates either miss reqwless-facing optional features or fail to compile with der 0.8.0 without the later der/heapless fix.

Validation

  • cargo check
  • cargo check --no-default-features --features embedded-tls
  • cargo check --no-default-features --features embedded-tls,aes256-sha384
  • git diff --check
  • rustfmt --check src/client.rs

@pawelchcki pawelchcki force-pushed the aes256-sha384-cipher branch from 0fc8eaf to 53846bc Compare June 1, 2026 23:18
@pawelchcki pawelchcki changed the title Add aes256-sha384 TLS cipher feature Add configurable embedded-tls cipher suites Jun 1, 2026
@pawelchcki pawelchcki force-pushed the aes256-sha384-cipher branch 2 times, most recently from 6fe1500 to d89ba3f Compare June 1, 2026 23:32
@pawelchcki pawelchcki force-pushed the aes256-sha384-cipher branch from d89ba3f to 4da4c9f Compare June 1, 2026 23:36
@pawelchcki pawelchcki changed the title Add configurable embedded-tls cipher suites Add aes256-sha384 TLS cipher feature Jun 1, 2026
@pawelchcki pawelchcki marked this pull request as ready for review June 1, 2026 23:44
Copilot AI review requested due to automatic review settings June 1, 2026 23:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds an opt-in TLS 1.3 cipher suite selection for the embedded-tls backend, allowing connections to servers that require TLS_AES_256_GCM_SHA384.

Changes:

  • Introduces a DefaultCipher type alias toggled by a new aes256-sha384 Cargo feature.
  • Updates TLS provider/connection types to use DefaultCipher instead of hard-coding Aes128GcmSha256.
  • Documents the new feature and pins git dependencies to specific revisions.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/client.rs Makes the embedded-tls cipher suite configurable via a feature-gated DefaultCipher alias.
README.md Documents default cipher and how to enable the AES-256/SHA-384 option.
Cargo.toml Adds aes256-sha384 feature and pins embedded-tls / esp-mbedtls git deps to specific revs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines +116 to +117
`reqwless` uses `TLS_AES_128_GCM_SHA256` by default. To connect to servers that only accept
`TLS_AES_256_GCM_SHA384`, enable the `aes256-sha384` feature:
Comment thread Cargo.toml
Comment thread Cargo.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants