mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8285404: RSA signature verification should reject non-DER OCTET STRING
Reviewed-by: valeriep
This commit is contained in:
parent
110edd9999
commit
14e7d91199
2 changed files with 7 additions and 0 deletions
|
@ -200,6 +200,9 @@ public class RSAUtil {
|
|||
if (algId.getEncodedParams() != null) {
|
||||
throw new IOException("Unexpected AlgorithmId parameters");
|
||||
}
|
||||
if (values[1].isConstructed()) {
|
||||
throw new IOException("Unexpected constructed digest value");
|
||||
}
|
||||
byte[] digest = values[1].getOctetString();
|
||||
return digest;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue