Problem Statement: After adding certificate to the required directory and entering detail in our application.properties file, Application failed to start due to the errors specified in the attached log file.(SSL)log.txt (5.1 KB)
My domain is: demo.azure.com
I ran this command: certbot certonly --standalone
It produced this output: Requesting certificate for demo.azure.com
My web server is (include version): Not Applicable
The operating system my web server runs on is (include version): Windows server 2016
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don't know):no
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.19.0
[...]
Caused by: java.io.IOException: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)
at sun.security.pkcs12.PKCS12KeyStore.parseAlgParameters(PKCS12KeyStore.java:792)
at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:1998)
at java.security.KeyStore.load(KeyStore.java:1445)
at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:178)
at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:204)
at org.apache.tomcat.util.net.jsse.JSSEUtil.getKeyManagers(JSSEUtil.java:203)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:112)
... 20 common frames omitted
[...]
I would guess that the keystore (supplied by you? How have you confgured this?) is broken.
Hi Nummer378, Thanks for the Interest. For your Information I have generated the certificate for the certbot using command certbot certonly --standalone and after we have converted the certificate from PEM to PKCS12 format.
After that we have copied the certificate to main/src/resources/certificate.p12 and then entered the required configuration to our application.properties file with the following commands.
When you created your p12 file (same as PFX) how exactly are you doing it? Java may need the Triple DES algorithm rather than AES but it will depend what version of java you are using.
As @webprofusion mentioned, there may be different ways to do this step.
And you may have omitted a required password (who knows? - we sure don't).
Have you ever had these exact set of steps work before?
If so, then what has changed since then?
If not, then where did you get the instructions? (and did you follow them all as directed?)
Hi @rg305, demo.azure.com url is just for this post only and we are sure that we have included the password at the time of certificate generation.
These exact set of steps we haven't implemented before, so for now we looked on web for the configuration of ssl certificate with the spring boot application.
followed the exact steps as they are given on above website.
You should use "redacted.domain" or "fake.domain_name" or something that actually makes that obvious. demo.azure.com is from a real domain (that belongs to Microsoft).