mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8216039: TLS with BC and RSASSA-PSS breaks ECDHServerKeyExchange
Add internal Signature init methods to select provider based on both key and parameter Reviewed-by: xuelei
This commit is contained in:
parent
eebe346715
commit
3b6b6b3cb3
15 changed files with 723 additions and 177 deletions
|
@ -167,12 +167,8 @@ public class PKCS10 {
|
|||
try {
|
||||
sigAlg = id.getName();
|
||||
sig = Signature.getInstance(sigAlg);
|
||||
|
||||
sig.initVerify(subjectPublicKeyInfo);
|
||||
|
||||
// set parameters after Signature.initSign/initVerify call,
|
||||
// so the deferred provider selections occur when key is set
|
||||
SignatureUtil.specialSetParameter(sig, id.getParameters());
|
||||
SignatureUtil.initVerifyWithParam(sig, subjectPublicKeyInfo,
|
||||
SignatureUtil.getParamSpec(sigAlg, id.getParameters()));
|
||||
|
||||
sig.update(data);
|
||||
if (!sig.verify(sigData)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue