HTTPS Request and Response Example

This section describes an example of HTTPS request and response captured by a Perl script using the Crypt::SSLeay module.

After running Crypt_SSLeay_HTTPS_GET.pl against https://login.yahoo.com, I opened the output file, test_yahoo.txt, to review request and response messages:

Request:
GET https://login.yahoo.com
User-Agent: libwww-perl/5.836

Response:
HTTP/1.1 200 OK
Cache-Control: private
Connection: close
Pragma: no-cache
Content-Type: text/html
Expires: 0
Client-Peer: 69.147.112.160:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com
   /CN=DigiCert High Assurance CA-3
Client-SSL-Cert-Subject: /C=US/ST=CA/L=Sunnyvale/O=Yahoo! Inc.
   /CN=login.yahoo.com
Client-SSL-Cipher: AES256-SHA
Client-SSL-Warning: Peer certificate not verified
Client-Transfer-Encoding: chunked
Link: <https://s.yimg.com/lq/i/reg/css/yregbase_sec_ui_1_9.css>; ...
P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP ...
Title: Sign in to Yahoo!
X-Frame-Options: DENY

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sign in to Yahoo!</title>
...

The request message is very simple.

But the response message contains some interesting information:

The next question is how to ask Crypt::SSLeay to validate the server's certificate.

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