mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-23 03:17:58 +01:00
Document workaround for BCs ECUtil.getCurveName() returning null for ed25519 keys
See https://github.com/bcgit/bc-java/issues/1087
This commit is contained in:
parent
01839728f0
commit
bbc42fd8e4
1 changed files with 8 additions and 1 deletions
|
@ -89,12 +89,19 @@ public class KeyInfo {
|
|||
public static String getCurveName(ECPublicBCPGKey key) {
|
||||
ASN1ObjectIdentifier identifier = key.getCurveOID();
|
||||
|
||||
String curveName = ECUtil.getCurveName(identifier);
|
||||
if (curveName != null) {
|
||||
return curveName;
|
||||
}
|
||||
|
||||
// Workaround for ECUtil not recognizing ed25519
|
||||
// see https://github.com/bcgit/bc-java/issues/1087
|
||||
// TODO: Remove once BC 1.71 gets released and contains a fix
|
||||
if (identifier.equals(GNUObjectIdentifiers.Ed25519)) {
|
||||
return EdDSACurve._Ed25519.getName();
|
||||
}
|
||||
|
||||
return ECUtil.getCurveName(identifier);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue