summaryrefslogtreecommitdiff
path: root/xed25519.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-09-10 08:35:55 -0400
committerJeffrey Walton <noloader@gmail.com>2021-09-10 08:35:55 -0400
commit6638f245e44d164b6ff29c433d29f4d26af1a274 (patch)
tree90c7b9ee8949e6b64868f38a7c3eafcbf3a70545 /xed25519.cpp
parent93c846a705b9c77d6edc96d8691fcebebec589cc (diff)
downloadcryptopp-git-6638f245e44d164b6ff29c433d29f4d26af1a274.tar.gz
Add Cryptlib OID for curve25519
Diffstat (limited to 'xed25519.cpp')
-rw-r--r--xed25519.cpp5
1 files changed, 4 insertions, 1 deletions
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();