8318328: DHKEM should check XDH name in case-insensitive mode

Reviewed-by: ascarpino, hchao
This commit is contained in:
Weijun Wang 2023-10-17 19:36:17 +00:00
parent c566dfccf8
commit 5145e5a40a
3 changed files with 66 additions and 3 deletions

View file

@ -353,9 +353,9 @@ public class DHKEM implements KEMSpi {
}
} else if (k instanceof XECKey xkey
&& xkey.getParams() instanceof NamedParameterSpec ns) {
if (ns.getName().equals("X25519")) {
if (ns.getName().equalsIgnoreCase("X25519")) {
return Params.X25519;
} else if (ns.getName().equals("X448")) {
} else if (ns.getName().equalsIgnoreCase("X448")) {
return Params.X448;
}
}