まず、PKCS #12 形式のファイル(test.p12)から、秘密鍵(test.key)と証明書(test.crt)を取り出します。パスワードを聞かれるので、随時入力してください。
$ openssl.exe pkcs12 -in test.p12 -nocerts -nodes -out test.key
Enter Import Password:
MAC verified OK
$ openssl pkcs12 -in test.p12 -clcerts -nokeys -out test.crt
Enter Import Password:
MAC verified OK
カレントディレクトリに、秘密鍵と証明書が展開されます。
$ ls test.*
test.crt test.key test.p12
クライアント証明書が必要なサイト(例:ssl.example.com)に接続します。
$ openssl s_client -connect ssl.example.com:443 -cert test.crt -key test.key
CONNECTED(00000003)
...省略(秘密鍵と証明書の検証結果が表示されます)...
Verify return code: 19 (self signed certificate in certificate chain)
---
GET index.html HTTP/1.0
closed
$