You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2025/01/27 13:23:00 UTC
[jira] [Comment Edited] (PDFBOX-5940) InvalidKeyException: Supplied key (sun.security.ec.ECPrivateKeyImpl) is not a RSAPrivateKey
[ https://issues.apache.org/jira/browse/PDFBOX-5940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17921376#comment-17921376 ]
Tilman Hausherr edited comment on PDFBOX-5940 at 1/27/25 1:22 PM:
------------------------------------------------------------------
[~mkl] Thanks, how would be know the correct algorithm - from {{privateKey.getAlgorithm()}} ?
Update: I just tried that one and it didn't work, because that one returns "RSA" only.
was (Author: tilman):
[~mkl] Thanks, how would be know the correct algorithm - from {{privateKey.getAlgorithm()}} ?
> InvalidKeyException: Supplied key (sun.security.ec.ECPrivateKeyImpl) is not a RSAPrivateKey
> -------------------------------------------------------------------------------------------
>
> Key: PDFBOX-5940
> URL: https://issues.apache.org/jira/browse/PDFBOX-5940
> Project: PDFBox
> Issue Type: Bug
> Components: Crypto, Signing
> Affects Versions: 2.0.33, 3.0.4 PDFBox, 4.0.0
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Trivial
> Fix For: 2.0.34, 3.0.5 PDFBox, 4.0.0
>
>
> InvalidKeyException: Supplied key (sun.security.ec.ECPrivateKeyImpl) is not a RSAPrivateKey instance
> at org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi.engineInitSign(Unknown Source)
> at java.base/java.security.Signature$Delegate.tryOperation(Signature.java:1321)
> at java.base/java.security.Signature$Delegate.chooseProvider(Signature.java:1275)
> at java.base/java.security.Signature$Delegate.engineInitSign(Signature.java:1359)
> at java.base/java.security.Signature.initSign(Signature.java:635)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org