Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8243424: Signature and SignatureSpi get parameter methods may return …
…null when unsupported

Reviewed-by: mullan
  • Loading branch information
Anthony Scarpino committed Jun 8, 2020
1 parent a043bd0 commit 785b9142821f39d58833be19fb2be689ea86d176
Showing with 18 additions and 14 deletions.
  1. +9 −7 src/java.base/share/classes/java/security/Signature.java
  2. +9 −7 src/java.base/share/classes/java/security/SignatureSpi.java
@@ -1012,13 +1012,15 @@ public final void setParameter(AlgorithmParameterSpec params)
/**
* Returns the parameters used with this signature object.
*
* <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.
* <p> If this signature has been initialized with parameters
* (by calling {@link #setParameter(AlgorithmParameterSpec)} or
* {@link #setParameter(String, Object)}) and the underlying signature
* implementation supports returning the parameters as
* {@code AlgorithmParameters}, this method returns the same parameters.
* If the parameters were not set, 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 {@code null}
*
@@ -387,13 +387,15 @@ protected void engineSetParameter(AlgorithmParameterSpec params)
* <p>This method is overridden by providers to return the parameters
* used with this signature engine.
*
* <p> If this signature engine has been previously initialized with
* parameters (by calling the {@code engineSetParameter} method), this
* method returns the same parameters. If this signature engine 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.
* <p> If this signature engine has been initialized with parameters
* (by calling {@link #engineSetParameter(AlgorithmParameterSpec)} or
* {@link #engineSetParameter(String, Object)}) and the underlying signature
* implementation supports returning the parameters as
* {@code AlgorithmParameters}, this method returns the same parameters.
* If the parameters were not set, 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 engine, or {@code null}
*

0 comments on commit 785b914

Please sign in to comment.