Skip to content

Commit 2c4c6c9

Browse files
author
John Jiang
committedNov 28, 2023
8320049: PKCS10 would not discard the cause when throw SignatureException on invalid key
Reviewed-by: mullan
1 parent f93b18f commit 2c4c6c9

File tree

1 file changed

+1
-2
lines changed
  • src/java.base/share/classes/sun/security/pkcs10

1 file changed

+1
-2
lines changed
 

‎src/java.base/share/classes/sun/security/pkcs10/PKCS10.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
* questions.
2424
*/
2525

26-
2726
package sun.security.pkcs10;
2827

2928
import java.io.PrintStream;
@@ -174,7 +173,7 @@ public PKCS10(byte[] data)
174173
throw new SignatureException("Invalid PKCS #10 signature");
175174
}
176175
} catch (InvalidKeyException e) {
177-
throw new SignatureException("Invalid key");
176+
throw new SignatureException("Invalid key", e);
178177
} catch (InvalidAlgorithmParameterException e) {
179178
throw new SignatureException("Invalid signature parameters", e);
180179
} catch (ProviderException e) {

0 commit comments

Comments
 (0)
Please sign in to comment.