Reuse GNUObjectIdentifiers.Ed25519

This commit is contained in:
Paul Schaub 2021-11-24 18:32:50 +01:00
parent c4c6777174
commit 3b49840c9c
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 2 additions and 1 deletions

View File

@ -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();
}