1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-30 00:02:06 +01:00

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

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