0

I want to use phantomjs and nodejs to login in a site using an PFX certificate, is it possible?

  • The problem is that the server ask the certificate.pfx before the site loads.

I was able to do it using these commands:

--ssl-client-certificate-file= path to pem file

--ssl-client-key-passphrase= pem file password

--cookies-file= file to store cookies (./cookies.js)

--proxy-type=https (or http)

--ssl-certificates-path= folder to store the site's certificates (./cert)

I wasn't able to use the .pfx file so I generated an .pem file using openssl, more here.

And remember to get the site's certificates and put it in the ssl-certificates-path folder

Community
  • 1
  • 1
Fernando Gomes
  • 353
  • 2
  • 7

1 Answers1

1

Please try supplying --ssl-client-certificate-file option on command line, look http://phantomjs.org/api/command-line.html for more related options.

vissi
  • 2,325
  • 1
  • 19
  • 26
  • 2
    http://stackoverflow.com/questions/21001374/what-is-the-correct-way-to-feed-an-ssl-certificate-into-phantomjs should be related – vissi Jan 10 '17 at 20:57