On 07.11.2016 10:38, Lothar Kimmeringer wrote:

> Hi,
> 
> Am 04.11.2016 um 22:20 schrieb Erik Wasser:
> 
>> Why is that? Why are 4096 bits RSA keys invalid? How can I fix this issue?
> 
> Maybe a limit of a JVM without Unlimited Strength Cryptography Extension
> being installed?

Thanks for the feedback.

I've download the file 'jce_policy-8.zip'
(http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html)
and extracted the files 'US_export_policy.jar' and 'local_policy.jar'
to the directory '/usr/java/jdk1.8.0_112/jre/lib/security' (overwriting
the old ones).

Nothing changed (and I've double checked if this is the right java
version I'm using).

If I switch to 'java-1.8.0-openjdk.x86_64' the error still remains so I
think it's not a (Oracle-)Java problem.

Here's the stack trace:

com.jcraft.jsch.JSchException: invalid privatekey: [B@282ba1e
        at com.jcraft.jsch.KeyPair.load(KeyPair.java:664)
        at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
        at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
        at com.jcraft.jsch.JSch.addIdentity(JSch.java:407)
        at com.jcraft.jsch.JSch.addIdentity(JSch.java:367)
        at UserAuthPubKey.main(UserAuthPubKey.java:29)

I've debugged a little bit further and replaced the lines

> -----BEGIN OPENSSH PRIVATE KEY-----
> ...
> -----BEGIN OPENSSH PRIVATE KEY-----

with

> -----BEGIN RSA PRIVATE KEY-----
> ...
> -----BEGIN RSA PRIVATE KEY-----

And the stack trace changed a little bit:

com.jcraft.jsch.JSchException: invalid privatekey: [B@f5f2bb7
        at com.jcraft.jsch.KeyPair.load(KeyPair.java:948)
        at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
        at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
        at com.jcraft.jsch.JSch.addIdentity(JSch.java:407)
        at com.jcraft.jsch.JSch.addIdentity(JSch.java:367)
        at UserAuthPubKey.main(UserAuthPubKey.java:29)

Any ideas?

-- 
So long... Erik


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to