Here is the actual cause of the problem: To connect to this server, you need to use SSLv3 or TLS1 instead of TLS1.2. This is probably why this worked when you first used Net :: SSL; I believe that he is trying to use different ciphers in such a way that WWW: Mechanize does not.
Here is how I found it:
I tried to connect to several servers, and found that those that worked had an older version of SSL. Then I checked the difference between which ciphers are used in versions, and tried to connect to different ciphers.
When I connect to TLS1.2, I get:
$ openssl s_client -connect www.imstores.com:443 -tls1_2 CONNECTED(00000003) write:errno=54 --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 322 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE ---
But when I connect to SSLv3 or TLS1, I get:
$ openssl s_client -connect www.imstores.com:443 -tls1 CONNECTED(00000003) depth=0 /serialNumber=O3gPUAuGGROuHEhlyLaeJfj7SOn6tFTx/C=US/O=www.imstores.com/OU=GT29846307/OU=See www.geotrust.com/resources/cps (c)11/OU=Domain Control Validated - QuickSSL(R) Premium/CN=www.imstores.com verify error:num=20:unable to get local issuer certificate [...and so on, including server certificate...]
How to do WWW: Mechanizing the use of TLS1 or SSLv3 remains as an exercise for the student.
source share