Skip to content

Honor OPENSSL_NO_OCB if OpenSSL was built this way#1952

Merged
alex merged 1 commit intorust-openssl:masterfrom
davidben:no-ocb
Jun 4, 2023
Merged

Honor OPENSSL_NO_OCB if OpenSSL was built this way#1952
alex merged 1 commit intorust-openssl:masterfrom
davidben:no-ocb

Conversation

@davidben
Copy link
Copy Markdown
Contributor

@davidben davidben commented Jun 4, 2023

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

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 alex merged commit e641bd2 into rust-openssl:master Jun 4, 2023
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
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.

2 participants