Honor OPENSSL_NO_OCB if OpenSSL was built this way#1952
Merged
alex merged 1 commit intorust-openssl:masterfrom Jun 4, 2023
Merged
Honor OPENSSL_NO_OCB if OpenSSL was built this way#1952alex merged 1 commit intorust-openssl:masterfrom
alex merged 1 commit intorust-openssl:masterfrom
Conversation
Setting ossl110 in the BoringSSL build (see rust-openssl#1944) causes rust-openssl to expect OCB support. However, OpenSSL already has a feature guard for OCB, which BoringSSL sets. rust-openssl just isn't honoring it. This fixes building against an OpenSSL built with ./config no-ocb
alex
approved these changes
Jun 4, 2023
Closed
1 task
syam-adam
pushed a commit
to syam-adam/sq-dsm
that referenced
this pull request
Sep 10, 2025
- If OpenSSL is built with the `OPENSSL_NO_OCB` directive it will
not have OCB.
- Stop advertising OCB as supported in that case.
- Use GCM as the default algorithm if OCB is not available.
- Tested by appending `println!("cargo:rustc-cfg=osslconf=\"{}\"",
"OPENSSL_NO_OCB");` to build.rs.
- See rust-openssl/rust-openssl#1952
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting ossl110 in the BoringSSL build (see #1944) causes rust-openssl to expect OCB support. However, OpenSSL already has a feature guard for OCB, which BoringSSL sets. rust-openssl just isn't honoring it.
This fixes building against an OpenSSL built with ./config no-ocb