java.security.spec.InvalidKeySpecException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • EC keys seem to be unsupported
    via GitHub by adam-bishop
    ,
  • Loading Apple APNs auth key to Java PrivateKey
    via Stack Overflow by scetix
    ,
    • java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: Invalid RSA private key at sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:217)[?:1.8.0_91] at java.security.KeyFactory.generatePrivate(KeyFactory.java:372)[?:1.8.0_91] at org.graylog2.plugin.inputs.transports.util.KeyUtil.loadPrivateKey(KeyUtil.java:153)[graylog.jar:?] at org.graylog2.plugin.inputs.transports.util.KeyUtil.initKeyStore(KeyUtil.java:111)[graylog.jar:?] at org.graylog2.plugin.inputs.transports.AbstractTcpTransport$1.createSslEngine(AbstractTcpTransport.java:205)[graylog.jar:?] at org.graylog2.plugin.inputs.transports.AbstractTcpTransport$1.call(AbstractTcpTransport.java:186)[graylog.jar:?] at org.graylog2.plugin.inputs.transports.AbstractTcpTransport$1.call(AbstractTcpTransport.java:182)[graylog.jar:?] at org.graylog2.plugin.inputs.transports.NettyTransport$1.getPipeline(NettyTransport.java:110)[graylog.jar:?] at org.jboss.netty.channel.socket.nio.NioServerBoss.registerAcceptedChannel(NioServerBoss.java:134)[graylog.jar:?] at org.jboss.netty.channel.socket.nio.NioServerBoss.process(NioServerBoss.java:104)[graylog.jar:?] at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)[graylog.jar:?] at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)[graylog.jar:?] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)[graylog.jar:?] at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)[graylog.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0_91] at java.lang.Thread.run(Thread.java:745)[?:1.8.0_91] Caused by: java.security.InvalidKeyException: Invalid RSA private key at sun.security.rsa.RSAPrivateCrtKeyImpl.parseKeyBits(RSAPrivateCrtKeyImpl.java:206)[?:1.8.0_91] at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:342)[?:1.8.0_91] at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:356)[?:1.8.0_91] at sun.security.rsa.RSAPrivateCrtKeyImpl.<init>(RSAPrivateCrtKeyImpl.java:91)[?:1.8.0_91] at sun.security.rsa.RSAPrivateCrtKeyImpl.newKey(RSAPrivateCrtKeyImpl.java:75)[?:1.8.0_91] at sun.security.rsa.RSAKeyFactory.generatePrivate(RSAKeyFactory.java:316)[?:1.8.0_91] at sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:213)[?:1.8.0_91] ... 16 more Caused by: java.io.IOException: Version must be 0 at sun.security.rsa.RSAPrivateCrtKeyImpl.parseKeyBits(RSAPrivateCrtKeyImpl.java:192)[?:1.8.0_91] ... 22 more
    No Bugmate found.