Python Scripts Communicating with HTTPS Servers

This chapter provides tutorial notes and example codes on writing Python scripts communicating with HTTPS servers. Topics include using built-in http.client and ssl modules; modifying SSL parameters; retrieving server certificate and validation chain; installing and using the pyOpenSSL package.

Python http.client for HTTPS Connection

Modifying SSL Parameters in Python

Retrieving SSLSocket Information in Python

Dumping Server Certificate in Python

Using pyOpenSSL for HTTPS Connection

Takeaways:

Table of Contents

 About This Book

 Introduction of PKI (Public Key Infrastructure)

 Introduction of HTTPS (Hypertext Transfer Protocol Secure)

 Using HTTPS with Google Chrome

 Using HTTPS with Mozilla Firefox

 Using HTTPS with Microsoft Edge

 Using HTTPS with Apple Safari

 Using HTTPS with IE (Internet Explorer)

 Android and Server Certificate

 iPhone and Server Certificate

 Windows Certificate Stores and Console

 RDP (Remote Desktop Protocol) and Server Certificate

 macOS Certificate Stores and Keychain Access

 Linux Certificate Stores and Tools

 Perl Scripts Communicating with HTTPS Servers

 PHP Scripts Communicating with HTTPS Servers

Python Scripts Communicating with HTTPS Servers

 Java Programs Communicating with HTTPS Servers

 .NET Programs Communicating with HTTPS Servers

 CAcert.org - Root CA Offering Free Certificates

 PKI CA Administration - Issuing Certificates

 Comodo Free Personal Certificate

 Digital Signature - Microsoft Word

 Digital Signature - OpenOffice.org 3

 S/MIME and Email Security

 PKI (Public Key Infrastructure) Terminology

 Archived Tutorials

 References

 Full Version in PDF/EPUB