Application background:
PHANTOMJS a crawler, access to the HTTPS site, one-way authentication (authentication server identity only) can be, two-way authentication (both the server and the client need authentication) must upload the local certificate;
Start with a PEM certificate that contains the public key private key access, how can not, must be split into two, the public key and the private key apart, with--ssl-certificates-path=<val> no, pay attention to the path
Command line:
#用根证书已经签名过的客户端证书client. PFX, generating the public key
OpenSSL pkcs12-nokeys-clcerts-in client.pfx (*.p12 same)-out Client.cer (*.pem same)
#生成私钥, there is no nodes is very important, no need to upload password
OpenSSL pkcs12-in client.pfx-out client.key-nocerts-nodes
#无nodes多加:--ssl-client-key-passphrase= your password; nginx bidirectional authentication address: https://192.168.1.102
Physical path to the physical path of the Phantomjs--ssl-client-certificate-file=client.cer--ssl-client-key-file=client.key--ignore-ssl-errors =true--ssl-protocol=default--web-security=false loadspeed.js https://192.168.1.102
Output:
Return,: Page title is Welcome to nginx!: succeeded.
If 400 is returned, see if the certificate is generated correctly, public key private key, etc.
Build Nginx Two-way verification:
Http://www.360doc.com/content/14/0817/17/18924983_402625447.shtml
Study it, share it, and welcome you to correct yourself.
Reprint Please specify
PHANTOMJS bidirectional authentication, access to Nginx,https