You can see how we build and test against aws-lc in our CI:
https://github.com/pyca/cryptography/blob/c3aac1fad241e334e26c36c899a5779a866679af/.github/workflows/ci.yml#L46
https://github.com/pyca/cryptography/blob/c3aac1fad241e334e26c36c899a5779a866679af/.github/workflows/ci.yml#L109-L122
https://github.com/pyca/cryptography/blob/c3aac1fad241e334e26c36c899a5779a866679af/.github/bin/build_openssl.sh#L64-L74

While this is complex, it mostly boils down to compiling aws-lc and then
specifying its location via `OPENSSL_DIR` and possibly also adding the
`RUST_FLAGS` depending on your environment.

We'd be happy to take a PR that documents how to do this more clearly, but
for now our CI is the only documentation available.

-Paul

On Wed, May 21, 2025 at 1:19 PM Husnain Taseer via Cryptography-dev <
cryptography-dev@python.org> wrote:

> Hi,
>
> We are excited that cryptography version 45.x has introduced support to
> build it with aws-lc, however there are no instructions provided and it's a
> bit hard for someone with little to no rust knowledge.
>
> I have been trying to build the Python cryptography 45.0.2 with aws-lc, I
> have replaced all the openssl and openssl-sys dependencies with aws-ls-rs
> and aws-lc-sys in the main Cargo.toml files and also in the sub modules
> within `src/rust/cryptography-*`. After updating the dependencies, the
> build is still failing because there are Openssl import statements within
> in the submodules like for example this one  -
> https://github.com/pyca/cryptography/blob/45.0.x/src/rust/cryptography-crypto/src/pbkdf1.rs#L8
>
> Do we really need to update the dependencies in the submodules
> (src/rust/cryptography-*)? What is the correct way of building it with a
> different crypto provider (aws-lc)?
>
> Could someone please provide us the instructions or point us to the
> documentation to build it with aws-lc as a crypto provider?
> _______________________________________________
> Cryptography-dev mailing list -- cryptography-dev@python.org
> To unsubscribe send an email to cryptography-dev-le...@python.org
> https://mail.python.org/mailman3//lists/cryptography-dev.python.org
> Member address: paul.l.keh...@gmail.com
>
_______________________________________________
Cryptography-dev mailing list -- cryptography-dev@python.org
To unsubscribe send an email to cryptography-dev-le...@python.org
https://mail.python.org/mailman3//lists/cryptography-dev.python.org
Member address: arch...@mail-archive.com

Reply via email to