Summary of versions of the Python standard library that are now server validated on https

The old Python standard library did not validate server certificates with https. Therefore, if you want to use https properly, it has always been recommended to use requests, which you want to use rather than the standard library. [^ 1]

For a few years now, the importance of https has been screaming, and it's a shame that the standard library doesn't validate by default, so starting with Python 3.5, it's validated using the system's default CA certificate. .. (PEP 476)

This new feature is so important to security that it was backported to versions prior to 3.5. Specifically, 2.7.9 and 3.4.3.

If you're using a later version of Python, you should be validating your server's certificate even if you're using the standard library urllib. If you want to prioritize reducing dependencies over the benefits provided by urllib3 / requests such as connection pools, make sure your Python version is later.

[^ 1]: requests bundles and distributes cacerts.pem created from Mozilla's CA List. (See also: certifi) If the CA List is updated due to the addition of a CA or something that some CA has done, bundle the requests. Make sure that it is reflected in what you have and update it.

Recommended Posts

Summary of versions of the Python standard library that are now server validated on https
Enum types that enter the standard library from Python 3.4 are still useful
(Python3) No. oO (Are you using the standard library?): 5 shaders
Verification of the theory that "Python and Swift are quite similar"
Python standard module that can be used on the command line
Summary of basic drawing method of the de facto standard Plotly Express of Python drawing library in the Reiwa era
Get the width of the div on the server side with Selenium + PhantomJS + Python
A summary of Python e-books that are useful for free-to-read data analysis
A note about the functions of the Linux standard library that handles time
[Python] I tried to analyze the characteristics of thumbnails that are easy to play on YouTube by deep learning
[Python] Summary of functions that return the index that takes the closest value in the array
Get the size of the image file on the web (Python3, no additional library required)
Bugs that static files are not displayed on the App Engine development server
Summary of the differences between PHP and Python
The contents of the Python tutorial (Chapter 2) are itemized.
The contents of the Python tutorial (Chapter 8) are itemized.
The contents of the Python tutorial (Chapter 1) are itemized.
The contents of the Python tutorial (Chapter 10) are itemized.
The contents of the Python tutorial (Chapter 6) are itemized.
At the time of python update on ubuntu
The contents of the Python tutorial (Chapter 3) are itemized.
About the matter that the contents of Python print are not visible in docker logs
[Python3] Take a screenshot of a web page on the server and crop it further
A note on the library implementation that explores hyperparameters using Bayesian optimization in Python
[Introduction to Python] Basic usage of the library scipy that you absolutely must know
Python --Explanation and usage summary of the top 24 packages
Install the 3rd party python library on Cinema 4D
I checked out the versions of Blender and Python
Summary of the basic flow of machine learning with Python
[Python] Summary of how to specify the color of the figure
Stray build of Python 3 on Sakura's rental server (Note)
[Introduction to Python] Basic usage of the library matplotlib
Install django on python + anaconda and start the server
The attitude that programmers should have (The Zen of Python)
[Python] A program that compares the positions of kangaroos.
A library that monitors the life and death of other machines by pinging from Python
Summary of points to keep in mind when writing a program that runs on Python 2.5
Design that may reduce if statement and coupling on the server side of social games
A Python script that allows you to check the status of the server from your browser