8320049: PKCS10 would not discard the cause when throw SignatureException on invalid key

Reviewed-by: mullan
This commit is contained in:
John Jiang 2023-11-28 23:52:22 +00:00
parent f93b18f39c
commit 2c4c6c9ba3

View file

@ -23,7 +23,6 @@
* questions.
*/
package sun.security.pkcs10;
import java.io.PrintStream;
@ -174,7 +173,7 @@ public class PKCS10 {
throw new SignatureException("Invalid PKCS #10 signature");
}
} catch (InvalidKeyException e) {
throw new SignatureException("Invalid key");
throw new SignatureException("Invalid key", e);
} catch (InvalidAlgorithmParameterException e) {
throw new SignatureException("Invalid signature parameters", e);
} catch (ProviderException e) {