Skip to content

Add AWS-LC provider build and CI infrastructure - #3419

Open
geedo0 wants to merge 3 commits into
aws:mainfrom
geedo0:provider-init
Open

Add AWS-LC provider build and CI infrastructure#3419
geedo0 wants to merge 3 commits into
aws:mainfrom
geedo0:provider-init

Conversation

@geedo0

@geedo0 geedo0 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Description of changes:

AWS-LC does not currently build an OpenSSL 3 provider module. This change adds
an opt-in CMake target for the module, requiring an OpenSSL 3.5 or later install
for provider headers, and adds dedicated CI that builds against pinned OpenSSL
3.5.5.

The module exports OSSL_provider_init, but the function intentionally returns
failure. This establishes the build, dependency, artifact, and CI contract
before provider behavior is introduced.

Call-outs:

The provider is disabled by default and is not expected to load in this change.
CI checks only that the module builds with the shipping AWS-LC configuration,
has the platform-appropriate module name, and exports the required entry point.

The provider source compiles against OpenSSL's provider headers while the module
is built in and linked from the AWS-LC CMake project. Provider functionality and
tests are intentionally outside this PR's scope.

Testing:

tests/ci/run_aws_lc_provider_tests.sh builds pinned OpenSSL 3.5.5, configures
AWS-LC with BUILD_AWSLC_PROVIDER=ON, builds the provider target, checks the
module artifact, and verifies that OSSL_provider_init is exported.

The provider target was also built locally on macOS against OpenSSL 3.6.1, and
nm confirmed that OSSL_provider_init is the exported symbol. The Linux-only
CI runner was not executed locally.

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 github-actions Bot left a comment

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.

clang-tidy made some suggestions

Comment thread provider/frontend/provider.c
@github-actions

Copy link
Copy Markdown
Contributor

🔒 Security ReviewView Report

Please review before merging.

@codecov-commenter

codecov-commenter commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.20%. Comparing base (1ab8a2c) to head (00baa9d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3419   +/-   ##
=======================================
  Coverage   78.20%   78.20%           
=======================================
  Files         695      695           
  Lines      124271   124281   +10     
  Branches    17265    17268    +3     
=======================================
+ Hits        97186    97200   +14     
+ Misses      26161    26159    -2     
+ Partials      924      922    -2     

☔ 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 10, 2026 22:22
@geedo0
geedo0 requested a review from a team as a code owner August 10, 2026 22:22
Comment on lines 15 to +23
- uses: ZedThree/clang-tidy-review@v0.23.1
with:
apt_packages: libssl-dev
split_workflow: true
clang_tidy_version: 19
install_commands: /github/workspace/util/build_compilation_database.sh
install_commands: >-
/github/workspace/util/build_compilation_database.sh
-DBUILD_AWSLC_PROVIDER=ON
-DAWSLC_PROVIDER_OPENSSL_ROOT=/usr

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NP: This ensures that the clang-tidy run covers the "provider". What version of OpenSSL is in the libssl-dev package? Is this an OpenSSL version >= 3.5 that we intend to target?

Comment thread provider/CMakeLists.txt
message(FATAL_ERROR
"BUILD_AWSLC_PROVIDER requires AWSLC_PROVIDER_OPENSSL_ROOT, the install "
"prefix of an OpenSSL 3.5 or later build supplying the provider headers.")
endif()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NP: Why require 3.5 and not 3.0.x?

Comment thread provider/CMakeLists.txt
Comment on lines +54 to +62
if(APPLE)
# OpenSSL's module loader appends .dylib on macOS, while CMake normally gives
# a MODULE library the .so suffix.
set_target_properties(awslc_provider PROPERTIES SUFFIX ".dylib")
endif()

if(APPLE)
target_link_options(awslc_provider PRIVATE "-Wl,-undefined,dynamic_lookup")
endif()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NP: These if(APPLE) blocks could merge.

command -v nm > /dev/null 2>&1 || fail "nm is required for the export check"

exported="$(nm -g --defined-only "${MODULE}" 2>/dev/null || true)"
grep -q 'OSSL_provider_init' <<< "${exported}" \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NP: grep -qw would avoid substring matches on the nm output.

Comment thread provider/CMakeLists.txt
"${AWSLC_PROVIDER_OPENSSL_INCLUDE_DIR}")
set_target_properties(awslc_provider PROPERTIES
C_VISIBILITY_PRESET hidden
OUTPUT_NAME "awslc"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NP: Should we include a hyphen ("aws-lc") or underscore ("aws_lc")?

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.

3 participants