Crypt::SSLeay Failing to Verify Server's Certificate

This section provides a tutorial example on how Crypt::SSLeay fails to verify HTTPS server's certificate using the HTTPS_CA_FILE environment variable, the CA certificate can not be found.

The test on https://login.yahoo.com finished nicely in the previous tutorial. It's time to play with another HTTPS server, www.google.com:

C:\herong>Crypt_SSLeay_HTTPS_GET_with_CA.pl 
   https://www.google.com/accounts/ServiceLogin 
   > test_paypal.txt

SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:SSLv3 read server hello A
SSL3 alert write:fatal:unknown CA
SSL_connect:error in SSLv3 read server certificate B
SSL_connect:error in SSLv3 read server certificate B
SSL_connect:before/connect initialization
SSL_connect:SSLv3 write client hello A
SSL_connect:SSLv3 read server hello A
SSL3 alert write:fatal:bad certificate
SSL_connect:error in SSLv3 read server certificate B
SSL_connect:before/connect initialization
SSL_connect:SSLv2 write client hello A
SSL_connect:failed in SSLv2 read server hello A
Failed to GET 'https://www.paypal.com': 500 SSL negotiation failed:  
   at C:\herong\Crypt_SSLeay_HTTPS_GET_with_CA.pl line 12.

Can you see what's wrong here? Here is my quess:

Last update: 2011.

Table of Contents

 About This Book

 Introduction of PKI (Public Key Infrastructure)

 Introduction of HTTPS (Hypertext Transfer Protocol Secure)

 Using HTTPS with IE (Internet Explorer) 10

 Using HTTPS with Chrome 40

 Using HTTPS with Firefox 35

Perl Scripts Communicating with HTTPS Servers

 Installing Crypt::SSLeay 0.57 on Windows

 Crypt::SSLeay Test Perl Script

 HTTPS Request and Response Example

 Asking Crypt::SSLeay to Verify Server's Certificate

Crypt::SSLeay Failing to Verify Server's Certificate

 Multiple CA Certificates in a Single File

 PHP Scripts Communicating with HTTPS Servers

 Java Programs Communicating with HTTPS Servers

 Certificate Stores and Certificate Console

 .NET Programs Communicating with HTTPS Servers

 CAcert.org - Root CA Offering Free Certificates

 PKI CA Administration - Issuing Certificates

 Digital Signature - Microsoft Word 2007

 Digital Signature - OpenOffice.org 3

 S/MIME and Email Security

 PKI (Public Key Infrastructure) Terminology

 Outdated Tutorials

 References

 PDF Printing Version