Skip to content

Commit

Permalink
8320049: PKCS10 would not discard the cause when throw SignatureExcep…
Browse files Browse the repository at this point in the history
…tion on invalid key

Reviewed-by: mullan
  • Loading branch information
John Jiang committed Nov 28, 2023
1 parent f93b18f commit 2c4c6c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/java.base/share/classes/sun/security/pkcs10/PKCS10.java
Expand Up @@ -23,7 +23,6 @@
* questions.
*/


package sun.security.pkcs10;

import java.io.PrintStream;
Expand Down Expand Up @@ -174,7 +173,7 @@ public PKCS10(byte[] data)
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) {
Expand Down

1 comment on commit 2c4c6c9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.