Comment 18 for bug 780717

Revision history for this message
Myles Wakeham (myles-s) wrote :

There is a work around for this, but it isn't as simple as it should be. I can confirm that in 18.04.2 LTS that you can't import the p12 cert into it. However if you manually extract out the crt, key and ca from the p12 file, you can select them manually for an openvpn for each file, and that does work. I used the following commands to do it, and this was successful on 18.04.2

Private Key
openssl pkcs12 -in client.p12 -nocerts -nodes | sed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' > client.key

Public Certificate
openssl pkcs12 -in client.p12 -clcerts -nokeys | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > client.cer

CA Certificate
openssl pkcs12 -in client.p12 -cacerts -nokeys -chain | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > client-ca.cer

Just replace the "client" part of the lines above with your file. It is a pain that you have to do this, but it does work.