Generate P12 from a chain certificate

Hello community, I try to generate a p12 file to enable https on my REST api, but when I try to reach this API from roti.upatwork.be, I have : Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID
Does anyone know how to help me ?

Thanks in advance

My domain is: upatwork.be

I ran this command:
openssl pkcs12 -export -in Lets_Encrypt_roti.upatwork.be.pem -name roti -out roti.p12

It produced this output: Ask for a password

My web server is (include version): Spring boot java application that embed a Tomcat

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

My hosting provider, if applicable, is: Plesk

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

the pem file contain :
-----BEGIN CERTIFICATE REQUEST-----

-----END CERTIFICATE REQUEST-----

-----BEGIN PRIVATE KEY-----

-----END PRIVATE KEY-----

-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----

Hi @GillesBodart

a p12 - file doesn't contain the certificate request, only the certificate. So remove this part.

Hi @JuergenAuer
Thanks for your answer but indeed it’s not fixing my issue

OPTIONS https://upatwork.be:8014/upatwork/v1/meeting/3 net::ERR_CERT_COMMON_NAME_INVALID

This is a completely different question. https://upatwork.be:8014/ has a certificate with the one domain name

DNS-Name: roti.upatwork.be

so it's the wrong domain name. Create a certificate with

roti.upatwork.be
upatwork.be

as domain names and use that.

1 Like

@JuergenAuer

Thanks for this precision, indeed we’ll change the REST call to call the roti.upatwork.be subdomain instead of the upatwork.be it’ll fix our problem !!

Many thanks for your time

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