Skip to content

feat(fips): WebSocket accept-key SHA-1 through system OpenSSL #6226

Backlog

Description

@akram

Part of the FIPS 140-3 umbrella (#6224).

Context

The WebSocket handshake requires the server to compute the accept-key: SHA-1 over the client-provided key concatenated with the RFC 6455 magic GUID. In the OpenShell stack this involves a chain of crates: axum's WebSocket extractors, the headers crate for header typing, and tungstenite for the protocol, all of which pull the RustCrypto sha1 crate today.

Problem

SHA-1 implemented outside a validated module is denied in a FIPS 140-3 build. The dependency appears at several levels of the chain, some of them unconditional, so the crate shows up in the production graph even though the operation itself is trivially available in the system OpenSSL module.

Proposed approach

The work splits by crate, because upstream situations differ:

  • tungstenite: no upstream change needed anymore. Tungstenite 0.30 already ships the needed sha1 handling, so the action is on the OpenShell side: bump tokio-tungstenite 0.29 to 0.30 and drop the overlay pin that was carrying a 0.29-based workaround.
  • headers: two upstream PRs are already open for the sha1 dependency bump (hyperium/headers#226, plain bump, stalled, and hyperium/headers#240, a range bump that respects the crate MSRV). Beyond the version bump, the additive step is an opt-in way to compute the accept-key hash through the system OpenSSL instead of the RustCrypto crate.
  • axum: the WebSocket extractors need the same additive option, so a consumer can enable an openssl feature and get the accept-key computed through the module (see akram/axum, branch feat/openssl-ws-accept for a proof of concept with ws-rust-crypto/openssl features).

In all cases the default behavior and the default dependency graph stay unchanged.

Current state

Fork branches with the needed changes exist as proof of feasibility (akram/headers, akram/tungstenite-rs, akram/axum); the tungstenite one is obsolete since upstream 0.30. The OpenShell-side tokio-tungstenite bump and the headers/axum upstream PRs remain to be done.

Activity

  1. added
    state:triage-needed
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions