I have a certificate provided by my company, one .pem file and one .key file as follows:
.pem file:
-----BEGIN CERTIFICATE-----
{THE CERTIFICATE KEY}
-----END CERTIFICATE-----
.key file
-----BEGIN PRIVATE KEY-----
{THE KEY}
-----END PRIVATE KEY-----
I need to obtain a .jks file because that's the only format accepted by Jenkins (I'm trying to enable HTTPS)
I tried to concatenate the two files and follow the steps described here and here, specifically:
mv cert_private_key.key cert_private_key.pem
cat cert_private_key.pem cert_public_key.pem | openssl pkcs12 -export -out cert.p12
as the next step would be to convert the .p12 file to .jks, but the console just hangs or I get an "unable to load private key" / "unable to load certificates"
Any help is much appreciated!