Skip to content

OpenSSL

Allex edited this page Jan 13, 2025 · 2 revisions

Client Certificate

get client cert and key

curl --cert host.pem --key host.key -v <host>

Then create pkcs12.p12:

cat cert.pem key.pem > pkcs12.pem
openssl pkcs12 -in pkcs12.pem -export -out pkcs12.p12
curl --cert-type P12 --cert pkcs12.p12:<password> <host>'

Firefox

Settings > Privacy & Security > View Certificates > Your Certificates > Import

After importing you'll get a popup to select the certificate when visiting the host.

Android

Security > Encryption & credentials > Install certificate

Import client cert on old android

Older android devices can't import modern .p12 certs, use the -legacy export instead.

If you have a .p12 file, convert it:

openssl pkcs12 -nodes -in pkcs12.p12 -out /tmp/bag.pem
openssl pkcs12 -export -legacy -in /tmp/bag.pem -out legacy.p12

Clone this wiki locally