aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ecc_key
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2017-09-13 17:09:00 +0200
committerRenĂ© Korthaus <[email protected]>2017-09-13 17:09:00 +0200
commit8da78e708e35810ea35ad9f3bfcf3ff4e1f40063 (patch)
tree8af726c7a78fb1b0df3e5c3e205f9daaa91e5019 /src/lib/pubkey/ecc_key
parent5651315cd6fc35f9380f99a9f571d9c0b044a4ee (diff)
Remove inner/outer OID check in EC_PrivateKey ctor
RFC 5915 mandates that the OID of an ECDSA ECPrivateKey shall be id-ecPublicKey with the named curve as the parameters. ECPrivateKey may contain the named curve OID, too, which is compared to id-ecPublicKey. Such keys could not be loaded. We remove this check and add a test vector from strongswan.
Diffstat (limited to 'src/lib/pubkey/ecc_key')
-rw-r--r--src/lib/pubkey/ecc_key/ecc_key.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/lib/pubkey/ecc_key/ecc_key.cpp b/src/lib/pubkey/ecc_key/ecc_key.cpp
index ad62f6ae3..7274a3cd9 100644
--- a/src/lib/pubkey/ecc_key/ecc_key.cpp
+++ b/src/lib/pubkey/ecc_key/ecc_key.cpp
@@ -177,9 +177,6 @@ EC_PrivateKey::EC_PrivateKey(const AlgorithmIdentifier& alg_id,
.decode_optional_string(public_key_bits, BIT_STRING, 1, PRIVATE)
.end_cons();
- if(!key_parameters.empty() && key_parameters != alg_id.oid)
- throw Decoding_Error("EC_PrivateKey - inner and outer OIDs did not match");
-
if(public_key_bits.empty())
{
m_public_key = domain().get_base_point() *