Private Key is too small sized

I'm renewing the certificate for my domain , every thing is fine but the private key with pem is only 241 bytes ,

the issue that I'm using this private key for ORDS installation and every time I getting the exception :slight_smile: 2023-12-18T10:17:40.434Z SEVERE The provided key is not RSA or PKCS8 encoded
oracle.dbtools.standalone.StandaloneException: The provided key is not RSA or PKCS8 encoded
at oracle.dbtools.standalone.PEMCertificate$Builder.privateKey(PEMCertificate.java:482)
at oracle.dbtools.standalone.PEMCertificate.read(PEMCertificate.java:276)
at oracle.dbtools.standalone.StandaloneConfiguration.certificate(StandaloneConfiguration.java:370)
at oracle.dbtools.standalone.StandaloneConfiguration.start(StandaloneConfiguration.java:210)
at oracle.dbtools.standalone.Serve.start(Serve.java:148)
at oracle.dbtools.standalone.Serve.serve(Serve.java:125)
at oracle.dbtools.cmdline.CommandLineInterface$Instance$ExecutableCommand.execute(CommandLineInterface.java:1008)
at oracle.dbtools.standalone.Serve.execute(Serve.java:66)
at oracle.dbtools.cmdline.CommandLine$Dispatcher.execute(CommandLine.java:622)
at oracle.dbtools.cmdline.CommandLine.dispatch(CommandLine.java:141)
at oracle.dbtools.cmdline.CommandLineInterface$Instance$ExecutableCommand.execute(CommandLineInterface.java:1008)
at oracle.dbtools.cmdline.CommandLineInterface$Instance.execute(CommandLineInterface.java:922)
at oracle.dbtools.cmdline.CommandLine.execute(CommandLine.java:100)
at oracle.dbtools.cmdline.CommandLine.execute(CommandLine.java:113)
at oracle.dbtools.cmdline.CommandLine.main(CommandLine.java:248)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at oracle.dbtools.launcher.executable.jar.ExecutableJarEntrypoint.invoke(ExecutableJarEntrypoint.java:54)
at oracle.dbtools.launcher.executable.jar.ExecutableJarEntrypoint.main(ExecutableJarEntrypoint.java:64)
Caused by: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DER input, Integer tag error
at java.base/sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:251)
at java.base/java.security.KeyFactory.generatePrivate(KeyFactory.java:390)
at oracle.dbtools.standalone.PEMCertificate$Builder.privateKey(PEMCertificate.java:480)
... 20 more
Caused by: java.security.InvalidKeyException: IOException : DER input, Integer tag error
at java.base/sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:350)
at java.base/sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:355)
at java.base/sun.security.rsa.RSAPrivateCrtKeyImpl.(RSAPrivateCrtKeyImpl.java:130)
at java.base/sun.security.rsa.RSAPrivateCrtKeyImpl.newKey(RSAPrivateCrtKeyImpl.java:80)
at java.base/sun.security.rsa.RSAKeyFactory.generatePrivate(RSAKeyFactory.java:356)
at java.base/sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:247)
... 22 more

I did some searches on Oracle ORDS topics and they are telling "Private key is corrupted"

any clue?

Thanks in advance

1 Like

certbot by default get ecdsa key : give key-type rsa option

4 Likes

can you post the full command , not familiar with that please

what acme client you uses?

3 Likes

acme-v02.api.letsencrypt.org

certbot version: 2.8.0

certbot renew --key-type rsa --force-renewal

just once and it'd change to rsa:

3 Likes

Thanks @orangepizza ,

I'd give a try tomorrow as I got Error creating new order :: too many certificates ,

Anyway thanks so much for the prompt response

That error might take more than one day to clear.

4 Likes

Hello @maziz8900, welcome to the Let's Encrypt community. :slightly_smiling_face:

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

Thank you for assisting us in helping YOU!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.