mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8268488: More valuable DerValues
Reviewed-by: weijun, ahgross, rhalade
This commit is contained in:
parent
29f61b3b0a
commit
f18deeb69e
4 changed files with 32 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -102,8 +102,13 @@ public final class PSSParameters extends AlgorithmParametersSpi {
|
|||
if (!val.getOID().equals(AlgorithmId.MGF1_oid)) {
|
||||
throw new IOException("Only MGF1 mgf is supported");
|
||||
}
|
||||
|
||||
byte[] encodedParams = val.getEncodedParams();
|
||||
if (encodedParams == null) {
|
||||
throw new IOException("Missing MGF1 parameters");
|
||||
}
|
||||
AlgorithmId params = AlgorithmId.parse(
|
||||
new DerValue(val.getEncodedParams()));
|
||||
new DerValue(encodedParams));
|
||||
String mgfDigestName = params.getName();
|
||||
switch (mgfDigestName) {
|
||||
case "SHA-1":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue