However it seems the server will only accept RSA Private key file, and it seems to me like the output I get is a X509v3 file, any one know how to get this to an RSA Private key file? If you are using Dynamic DNS, your CN should have a wild-card, for example: *.api.com. To learn more, see our tips on writing great answers. openssl pkcs12 -export -out client.p12 -inkey client.key.pem -in client.cert.pem -chain -CAfile ca-chain.cert.pem The p12 imports fine into OSX keychain, but my server isn’t accepting the certificate. If it is going to a temporary location, change the -out