From 331972087a4697c36ae0ef7fd29de718599867d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Fri, 15 Nov 2024 11:36:03 +0100 Subject: [PATCH] Switch the test to use prime256v1 based key Most of the prime* curves are disabled on openSUSE/SLE based systems, which causes this test to fail. The prime256v1 curve is still enabled and hence the test succeeds using that --- openssl/src/pkey_ctx.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openssl/src/pkey_ctx.rs b/openssl/src/pkey_ctx.rs index add7830484..f30f06973a 100644 --- a/openssl/src/pkey_ctx.rs +++ b/openssl/src/pkey_ctx.rs @@ -1087,14 +1087,14 @@ mod test { #[cfg(ossl320)] fn ecdsa_deterministic_signature() { let private_key_pem = "-----BEGIN PRIVATE KEY----- -MDkCAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQEEHzAdAgEBBBhvqwNJNOTA/Jrmf1tWWanX0f79GH7g -n9Q= +MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCDJr6nYRbp1FmtcIVdnsdaTTlDD2zbo +mxJ7imIrEg9nIQ== -----END PRIVATE KEY-----"; let key1 = EcKey::private_key_from_pem(private_key_pem.as_bytes()).unwrap(); let key1 = PKey::from_ec_key(key1).unwrap(); let input = "sample"; - let expected_output = hex::decode("303502190098C6BD12B23EAF5E2A2045132086BE3EB8EBD62ABF6698FF021857A22B07DEA9530F8DE9471B1DC6624472E8E2844BC25B64").unwrap(); + let expected_output = hex::decode("3044022061340C88C3AAEBEB4F6D667F672CA9759A6CCAA9FA8811313039EE4A35471D3202206D7F147DAC089441BB2E2FE8F7A3FA264B9C475098FDCF6E00D7C996E1B8B7EB").unwrap(); let hashed_input = hash(MessageDigest::sha1(), input.as_bytes()).unwrap(); let mut ctx = PkeyCtx::new(&key1).unwrap();