Skip to content

Commit 574990f

Browse files
rgithubliPaul Hohensee
authored andcommitted
8320049: PKCS10 would not discard the cause when throw SignatureException on invalid key
Backport-of: 2c4c6c9ba3f4682e3696ecdd9aea1905443785fa
1 parent ddda5e1 commit 574990f

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

Lines changed: 1 addition & 2 deletions
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;
@@ -173,7 +172,7 @@ public PKCS10(byte[] data)
173172
throw new SignatureException("Invalid PKCS #10 signature");
174173
}
175174
} catch (InvalidKeyException e) {
176-
throw new SignatureException("Invalid key");
175+
throw new SignatureException("Invalid key", e);
177176
} catch (InvalidAlgorithmParameterException e) {
178177
throw new SignatureException("Invalid signature parameters", e);
179178
} catch (ProviderException e) {

0 commit comments

Comments
 (0)