parent
3b71b74764
commit
44df934738
@ -1,36 +0,0 @@
|
|||||||
From aacdf9b232c383693fa0c6d9411d3ec168b9487a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Wiktor Kwapisiewicz <wiktor@metacode.biz>
|
|
||||||
Date: Thu, 19 Jan 2023 09:55:34 +0100
|
|
||||||
Subject: [PATCH] Fix EC curve detection.
|
|
||||||
|
|
||||||
- Some systems have smaller set of supported curves and even though the
|
|
||||||
curve identifiers are compiled in the usage of the curve fails.
|
|
||||||
|
|
||||||
- Try to construct an `EcGroup` using retrieved `Nid` as this is a cheap
|
|
||||||
check that will fail if the curve is truly unsupported.
|
|
||||||
|
|
||||||
- Fixes #976.
|
|
||||||
---
|
|
||||||
src/crypto/backend/openssl.rs | 6 +++++-
|
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/crypto/backend/openssl.rs b/src/crypto/backend/openssl.rs
|
|
||||||
index 4e610bfe8..aa5c9db7d 100644
|
|
||||||
--- a/src/crypto/backend/openssl.rs
|
|
||||||
+++ b/src/crypto/backend/openssl.rs
|
|
||||||
@@ -43,7 +43,11 @@ impl Curve {
|
|
||||||
} else {
|
|
||||||
// the rest of EC algorithms are supported via the same
|
|
||||||
// codepath
|
|
||||||
- openssl::nid::Nid::try_from(self).is_ok()
|
|
||||||
+ if let Ok(nid) = openssl::nid::Nid::try_from(self) {
|
|
||||||
+ openssl::ec::EcGroup::from_curve_name(nid).is_ok()
|
|
||||||
+ } else {
|
|
||||||
+ false
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -1 +1 @@
|
|||||||
SHA512 (sequoia-openpgp-1.14.0.crate) = aad9d82eb8e589c241eeb7155549294116f35d4790a15740273247a8f1366db4fbdf123dccdc2a4b6bb5b5658ad5925698b30538a8668330d9970b89701a7765
|
SHA512 (sequoia-openpgp-1.15.0.crate) = 01603db1706c266eb1a66132de17936be3ab38bbdff958edf8f97d7b8bbde9ac82b16f324ae442241380cf6f82d9369463591c16b34cfc7938395a55ccef865e
|
||||||
|
Loading…
Reference in new issue