parent
60b5147766
commit
eeade0d645
@ -0,0 +1,36 @@
|
|||||||
|
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.12.0.crate) = 688e86f1d59ffbb199f6acd0d69682b8597d7698c93ac33598c317747a491fe4dc37e0ff9ca09c0c175a624491e80033072da6cf6563e7a266e8f5085ec02b57
|
SHA512 (sequoia-openpgp-1.13.0.crate) = 45ff000500e9919216a543981cc3b0eb6a2e354ff8bf76bf5829b0a98344766b88b7d25bc174649d85d92a14b6cbf12ce56f54f6fedd4ff9c79ba662a9e79ef1
|
||||||
|
Loading…
Reference in new issue