8242556: Cannot load RSASSA-PSS public key with non-null params from byte array

Update AlgorithmId to use alg name before oid str when parsing DER bytes

Reviewed-by: mullan
This commit is contained in:
Valerie Peng 2020-04-14 22:12:13 +00:00
parent 4694da31f8
commit 4c7d85b636
3 changed files with 35 additions and 24 deletions

View file

@ -124,9 +124,9 @@ public class AlgorithmId implements Serializable, DerEncoder {
}
protected void decodeParams() throws IOException {
String algidString = algid.toString();
String algidName = getName();
try {
algParams = AlgorithmParameters.getInstance(algidString);
algParams = AlgorithmParameters.getInstance(algidName);
} catch (NoSuchAlgorithmException e) {
/*
* This algorithm parameter type is not supported, so we cannot