From 8f920041cc5e7da1863218d1cf264c27c7f6a9c5 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 20 Mar 2023 20:38:57 -0400 Subject: [PATCH] Skip a test that hangs on OpenSSL 3.1.0 --- openssl/build.rs | 3 +++ openssl/src/error.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/openssl/build.rs b/openssl/build.rs index 5cddce90c2..5441606b28 100644 --- a/openssl/build.rs +++ b/openssl/build.rs @@ -50,6 +50,9 @@ fn main() { if version >= 0x3_00_00_00_0 { println!("cargo:rustc-cfg=ossl300"); } + if version >= 0x3_01_00_00_0 { + println!("cargo:rustc-cfg=ossl310"); + } } if let Ok(version) = env::var("DEP_OPENSSL_LIBRESSL_VERSION_NUMBER") { diff --git a/openssl/src/error.rs b/openssl/src/error.rs index 064d635234..e097ce6881 100644 --- a/openssl/src/error.rs +++ b/openssl/src/error.rs @@ -401,9 +401,12 @@ cfg_if! { #[cfg(test)] mod tests { + #[cfg(not(ossl310))] use crate::nid::Nid; #[test] + // Due to a bug in OpenSSL 3.1.0, this test can hang there. Skip for now. + #[cfg(not(ossl310))] fn test_error_library_code() { let stack = Nid::create("not-an-oid", "invalid", "invalid").unwrap_err(); let errors = stack.errors();