From 48cd75fdbb35bc3ac75c32bf39bd2ff5c574ec12 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Mon, 22 May 2023 11:57:22 +0200 Subject: [PATCH] Add botan version 3 support. - `sequoia-openpgp` added support for Botan version 3, and made that the default for the `sequoia-openpgp/crypto-botan` feature. - Add the `crypto-botan2` feature to select the Botan version 2 interface, and make that the default. --- Cargo.toml | 3 ++- build.rs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f236678..2649689 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,8 +39,9 @@ crate-type = ["lib", "cdylib", "staticlib"] [features] default = [ - "crypto-botan", + "crypto-botan2", ] crypto-nettle = ["sequoia-openpgp/crypto-nettle"] crypto-botan = ["sequoia-openpgp/crypto-botan"] +crypto-botan2 = ["sequoia-openpgp/crypto-botan2"] crypto-cng = ["sequoia-openpgp/crypto-cng"] diff --git a/build.rs b/build.rs index 9c04e94..bd1fef9 100644 --- a/build.rs +++ b/build.rs @@ -40,8 +40,10 @@ fn main() -> Result<(), std::io::Error> { // directory. let content = String::from_utf8(content).unwrap() .replace("REQUIRES", - if cfg!(feature = "crypto-botan") { + if cfg!(feature = "crypto-botan2") { "botan-2" + } else if cfg!(feature = "crypto-botan3") { + "botan-3" } else if cfg!(feature = "crypto-nettle") { "nettle" } else if cfg!(feature = "crypto-cng") { -- GitLab