relates to github handling of Oracle EdDSA keys.
@@ -357,9 +357,13 @@ PublicKey getPubKeyEd25519() throws IOException
{
PublicKey publicKey = getPublicKey();
if (!"Ed25519".equals(publicKey.getAlgorithm()))
+ {
+ // Oracle provider (Java 15+) returns the key as an EdDSA one
+ if (!("EdDSA".equals(publicKey.getAlgorithm()) && publicKey.toString().indexOf("Ed25519") >= 0))
{
throw new TlsFatalAlert(AlertDescription.certificate_unknown);
}
+ }
return publicKey;
}
@@ -367,9 +371,13 @@ PublicKey getPubKeyEd448() throws IOException
{
PublicKey publicKey = getPublicKey();
if (!"Ed448".equals(publicKey.getAlgorithm()))
+ {
+ // Oracle provider (Java 15+) returns the key as an EdDSA one
+ if (!("EdDSA".equals(publicKey.getAlgorithm()) && publicKey.toString().indexOf("Ed448") >= 0))
{
throw new TlsFatalAlert(AlertDescription.certificate_unknown);
}
+ }
return publicKey;
}
