From 3b49840c9c2db6fbca7e873cc90c7e91ea492eb6 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Wed, 24 Nov 2021 18:32:50 +0100 Subject: [PATCH] Reuse GNUObjectIdentifiers.Ed25519 --- .../src/main/java/org/pgpainless/key/info/KeyInfo.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/info/KeyInfo.java b/pgpainless-core/src/main/java/org/pgpainless/key/info/KeyInfo.java index e34de8c9..1cc4b6c8 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/info/KeyInfo.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/info/KeyInfo.java @@ -5,6 +5,7 @@ package org.pgpainless.key.info; import org.bouncycastle.asn1.ASN1ObjectIdentifier; +import org.bouncycastle.asn1.gnu.GNUObjectIdentifiers; import org.bouncycastle.bcpg.ECDHPublicBCPGKey; import org.bouncycastle.bcpg.ECDSAPublicBCPGKey; import org.bouncycastle.bcpg.ECPublicBCPGKey; @@ -89,7 +90,7 @@ public class KeyInfo { ASN1ObjectIdentifier identifier = key.getCurveOID(); // Workaround for ECUtil not recognizing ed25519 - if (identifier.getId().equals("1.3.6.1.4.1.11591.15.1")) { + if (identifier.equals(GNUObjectIdentifiers.Ed25519)) { return EdDSACurve._Ed25519.getName(); }