summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/backend.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/crypto/backend.rs')
-rw-r--r--openpgp/src/crypto/backend.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/openpgp/src/crypto/backend.rs b/openpgp/src/crypto/backend.rs
index 2aecfb69..03c142ea 100644
--- a/openpgp/src/crypto/backend.rs
+++ b/openpgp/src/crypto/backend.rs
@@ -1,6 +1,7 @@
//! Concrete implementation of the crypto primitives used by the rest of the
//! crypto API.
+pub(crate) mod interface;
pub(crate) mod sha1cd;
// Nettle is the default backend, but on Windows targets we instead
@@ -25,6 +26,12 @@ mod nettle;
feature = "crypto-botan2",
feature = "crypto-rust")))))]
pub use self::nettle::*;
+#[cfg(all(feature = "crypto-nettle",
+ not(all(feature = "__implicit-crypto-backend-for-tests",
+ any(feature = "crypto-openssl",
+ feature = "crypto-botan",
+ feature = "crypto-rust")))))]
+pub use self::nettle::Backend;
// Nettle is the default backend, but on Windows targets we instead
// enable CNG for running the tests in non-leaf crates that depend on
@@ -50,18 +57,31 @@ mod cng;
feature = "crypto-botan2",
feature = "crypto-rust")))))]
pub use self::cng::*;
+#[cfg(all(feature = "crypto-cng",
+ not(all(feature = "__implicit-crypto-backend-for-tests",
+ any(feature = "crypto-nettle",
+ feature = "crypto-openssl",
+ feature = "crypto-botan",
+ feature = "crypto-rust")))))]
+pub use self::cng::Backend;
#[cfg(feature = "crypto-rust")]
mod rust;
#[cfg(feature = "crypto-rust")]
pub use self::rust::*;
+#[cfg(feature = "crypto-rust")]
+pub use self::rust::Backend;
#[cfg(feature = "crypto-openssl")]
mod openssl;
#[cfg(feature = "crypto-openssl")]
pub use self::openssl::*;
+#[cfg(feature = "crypto-openssl")]
+pub use self::openssl::Backend;
#[cfg(any(feature = "crypto-botan", feature = "crypto-botan2"))]
mod botan;
#[cfg(any(feature = "crypto-botan", feature = "crypto-botan2"))]
pub use self::botan::*;
+#[cfg(feature = "crypto-botan")]
+pub use self::botan::Backend;