mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8206171: Signature#getParameters for RSASSA-PSS throws ProviderException when not initialized
Changed SunRsaSign and SunMSCAPI provider to return null and updated javadoc Reviewed-by: weijun, mullan
This commit is contained in:
parent
7723d3a1e9
commit
df08003471
4 changed files with 40 additions and 41 deletions
|
@ -605,16 +605,15 @@ public class RSAPSSSignature extends SignatureSpi {
|
|||
|
||||
@Override
|
||||
protected AlgorithmParameters engineGetParameters() {
|
||||
if (this.sigParams == null) {
|
||||
throw new ProviderException("Missing required PSS parameters");
|
||||
}
|
||||
try {
|
||||
AlgorithmParameters ap =
|
||||
AlgorithmParameters.getInstance("RSASSA-PSS");
|
||||
ap.init(this.sigParams);
|
||||
return ap;
|
||||
} catch (GeneralSecurityException gse) {
|
||||
throw new ProviderException(gse.getMessage());
|
||||
AlgorithmParameters ap = null;
|
||||
if (this.sigParams != null) {
|
||||
try {
|
||||
ap = AlgorithmParameters.getInstance("RSASSA-PSS");
|
||||
ap.init(this.sigParams);
|
||||
} catch (GeneralSecurityException gse) {
|
||||
throw new ProviderException(gse.getMessage());
|
||||
}
|
||||
}
|
||||
return ap;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue