diff options
| author | Valerie Peng <valeriep@openjdk.org> | 2018-07-23 23:18:19 +0000 |
|---|---|---|
| committer | Valerie Peng <valeriep@openjdk.org> | 2018-07-23 23:18:19 +0000 |
| commit | df0800347177fd3da0eec79cca891a89854aab3a (patch) | |
| tree | f6f07a72015858055704cf8ebc775f52b78e4ccc /src/java.base/share/classes/java/security/Signature.java | |
| parent | 7723d3a1e95072ca4e449f005b9f86e0cb432372 (diff) | |
| download | openjdk-df0800347177fd3da0eec79cca891a89854aab3a.tar.gz openjdk-df0800347177fd3da0eec79cca891a89854aab3a.zip | |
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
Diffstat (limited to 'src/java.base/share/classes/java/security/Signature.java')
| -rw-r--r-- | src/java.base/share/classes/java/security/Signature.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/java.base/share/classes/java/security/Signature.java b/src/java.base/share/classes/java/security/Signature.java index cd68d59a027..141237ad94b 100644 --- a/src/java.base/share/classes/java/security/Signature.java +++ b/src/java.base/share/classes/java/security/Signature.java @@ -700,7 +700,7 @@ public abstract class Signature extends SignatureSpi { * encoded or of the wrong type, if this signature algorithm is unable to * process the input data provided, etc. * @exception IllegalArgumentException if the {@code signature} - * byte array is null, or the {@code offset} or {@code length} + * byte array is {@code null}, or the {@code offset} or {@code length} * is less than 0, or the sum of the {@code offset} and * {@code length} is greater than the length of the * {@code signature} byte array. @@ -897,14 +897,15 @@ public abstract class Signature extends SignatureSpi { /** * Returns the parameters used with this signature object. * - * <p>The returned parameters may be the same that were used to initialize - * this signature, or may contain a combination of default and randomly - * generated parameter values used by the underlying signature - * implementation if this signature requires algorithm parameters but - * was not initialized with any. + * <p> If this signature has been previously initialized with parameters + * (by calling the {@code setParameter} method), this method returns + * the same parameters. If this signature has not been initialized with + * parameters, this method may return a combination of default and + * randomly generated parameter values if the underlying + * signature implementation supports it and can successfully generate + * them. Otherwise, {@code null} is returned. * - * @return the parameters used with this signature, or null if this - * signature does not use any parameters. + * @return the parameters used with this signature, or {@code null} * * @see #setParameter(AlgorithmParameterSpec) * @since 1.4 @@ -925,7 +926,7 @@ public abstract class Signature extends SignatureSpi { * * @param param the string name of the parameter. * - * @return the object that represents the parameter value, or null if + * @return the object that represents the parameter value, or {@code null} if * there is none. * * @exception InvalidParameterException if {@code param} is an invalid |
