Skip to content

Document the AWS-LC provider - #3434

Open
geedo0 wants to merge 3 commits into
mainfrom
provider-readme
Open

Document the AWS-LC provider#3434
geedo0 wants to merge 3 commits into
mainfrom
provider-readme

Conversation

@geedo0

@geedo0 geedo0 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Description of changes:

This change documents how to build, test, install, activate, and verify the
AWS-LC provider. It includes configuration-file and programmatic activation
examples, explains the optional ?provider=awslc preference and default-provider
fallback, and describes the frontend/backend source layout.

It also adds ALGORITHM_SUPPORT.md, organized by OpenSSL operation class, with
SHA2-256 recorded as the provider's initial supported algorithm.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@github-actions

Copy link
Copy Markdown
Contributor

🔒 Security ReviewView Report

Please review before merging.

@codecov-commenter

codecov-commenter commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@484199b). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3434   +/-   ##
=======================================
  Coverage        ?   78.14%           
=======================================
  Files           ?      700           
  Lines           ?   125595           
  Branches        ?    17373           
=======================================
  Hits            ?    98143           
  Misses          ?    26582           
  Partials        ?      870           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@geedo0
geedo0 marked this pull request as ready for review August 20, 2026 16:31
@geedo0
geedo0 requested a review from a team as a code owner August 20, 2026 16:31
Comment thread provider/README.md Outdated
justsmth
justsmth previously approved these changes Aug 31, 2026
Comment thread provider/README.md
```bash
# Build OpenSSL from source. It supplies the provider headers AWS-LC's tree
# does not carry. The minimum required OpenSSL version is 3.5.
git clone https://github.com/openssl/openssl.git

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The CI pins openssl-3.5.5; I think the README should too. (An unpinned clone builds OpenSSL master -- "4.x-dev".)

Suggested change
git clone https://github.com/openssl/openssl.git
git clone --branch openssl-3.5.5 --depth 1 https://github.com/openssl/openssl.git

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I commented in the 3.5 minimum requirement and I consider it a safe assumption that master is always newer than that. Forcing in this 3.5.5 tag just adds in a staleness liability (in fact the latest 3.5.x is already 3.5.8) that we need to maintain.

Comment thread provider/README.md Outdated
Comment on lines +23 to +24
# Build AWS-LC and the provider. The provider uses shared libraries and the
# upstream OpenSSL build for header files and testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"uses shared libraries" reads as descriptive, but BUILD_SHARED_LIBS=ON is a requirement: with a static libcrypto.a, it gets linked into the module and every AWS-LC public symbol becomes an export of awslc.so -- see comment on #3433. Suggest stating it here as a requirement (unless the build properly supports BUILD_SHARED_LIBS=OFF).

Suggested change
# Build AWS-LC and the provider. The provider uses shared libraries and the
# upstream OpenSSL build for header files and testing.
# Build AWS-LC and the provider. BUILD_SHARED_LIBS=ON is required. The provider uses
# shared libraries and the upstream OpenSSL build for header files and testing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Support for BUILD_SHARED_LIBS=OFF would be incidental and not something we're explicitly guaranteeing would work. I'll make the doc change here, but I don't think we need to explicitly restrict the ability to build that configuration.

Comment thread provider/README.md
Comment on lines +31 to +34
# Build with symbol versioning via ENABLE_DIST_PKG in AWS-LC (Linux only)
cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON -DENABLE_DIST_PKG=ON \
-DBUILD_AWSLC_PROVIDER=ON -DAWSLC_PROVIDER_OPENSSL_ROOT="${OPENSSL_ROOT}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • This build gets a FATAL_ERROR on macOS and Windows.
  • Suggest framing it as a Linux alternative:
Suggested change
# Build with symbol versioning via ENABLE_DIST_PKG in AWS-LC (Linux only)
cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON -DENABLE_DIST_PKG=ON \
-DBUILD_AWSLC_PROVIDER=ON -DAWSLC_PROVIDER_OPENSSL_ROOT="${OPENSSL_ROOT}"
# On Linux, add ENABLE_DIST_PKG=ON to get the versioned soname CI ships with
# (see "Installing the module" below for why that matters). Not supported on
# macOS or Windows.
cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON -DENABLE_DIST_PKG=ON \
-DBUILD_AWSLC_PROVIDER=ON -DAWSLC_PROVIDER_OPENSSL_ROOT="${OPENSSL_ROOT}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The original comment already states "(Linux Only)". How is this change qualitatively different?

Comment thread provider/README.md Outdated
Comment thread provider/README.md Outdated
Comment on lines +63 to +70
OpenSSL loads a provider by bare name from its modules directory, appending the platform's
suffix. Copy the built module there:

```bash
# Where the OpenSSL you are configuring looks for modules.
MODULES_DIR="$(openssl version -m | sed 's/^MODULESDIR: //; s/"//g')"

cp build/provider/awslc.so "${MODULES_DIR}/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is the biggest gap. With BUILD_SHARED_LIBS=ON, awslc.so has an undefined dependency on AWS-LC's libcrypto.so. After cp into MODULESDIR, dlopen resolves that by soname, and without ENABLE_DIST_PKG the soname is plain libcrypto.so -- the same name as OpenSSL's, which is already loaded in the process. So the copy either fails to load (AWS-LC's libcrypto not on the loader path) or silently binds the backend to OpenSSL's libcrypto, which is exactly the misbinding verify_linkage.sh exists to catch.

The section should say that installing requires the ENABLE_DIST_PKG build (versioned soname) with AWS-LC's libcrypto installed on the loader path, or an INSTALL_RPATH on the module. As written, a reader following this verbatim gets a non-working or misbound setup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, we're definitely lacking clear guidance on how to fully build/deploy the AWS-LC part of this.

Comment thread provider/README.md Outdated
Comment thread provider/README.md Outdated
Comment thread provider/README.md Outdated
Comment thread provider/ALGORITHM_SUPPORT.md
justsmth
justsmth previously approved these changes Sep 4, 2026
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.

4 participants