From 6638f245e44d164b6ff29c433d29f4d26af1a274 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 10 Sep 2021 08:35:55 -0400 Subject: Add Cryptlib OID for curve25519 --- xed25519.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xed25519.cpp') diff --git a/xed25519.cpp b/xed25519.cpp index 5095b5d2..1c1132be 100644 --- a/xed25519.cpp +++ b/xed25519.cpp @@ -152,9 +152,12 @@ void x25519::BERDecodeAndCheckAlgorithmID(BufferedTransformation &bt) // if the OIDs do not match. OID oid(bt); + // 1.3.6.1.4.1.3029.1.5.1/curvey25519 from Cryptlib used by OpenPGP. + // https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-rfc4880bis if (!m_oid.Empty() && m_oid != oid) BERDecodeError(); // Only accept user specified OID - else if (oid == ASN1::curve25519() || oid == ASN1::X25519()) + else if (oid == ASN1::curve25519() || oid == ASN1::X25519() || + oid == OID(1)+3+6+1+4+1+3029+1+5) m_oid = oid; // Accept any of the x25519 OIDs else BERDecodeError(); -- cgit v1.2.1