How To Install python-backports-ssl_match_hostname.noarch on Amazon Linux 2
Introduction
In this tutorial we learn how to install python-backports-ssl_match_hostname.noarch on Amazon Linux 2.
What is python-backports-ssl_match_hostname.noarch
The Secure Sockets layer is only actually secure if you check the hostname in the certificate returned by the server to which you are connecting, and verify that it matches to hostname that you are trying to reach. But the matching logic, defined in RFC2818, can be a bit tricky to implement on your own. So the ssl package in the Standard Library of Python 3.2 now includes a match_hostname() function for performing this check instead of requiring every application to implement the check separately. This backport brings match_hostname() to users of earlier versions of Python. The actual code is only slightly modified from Python 3.5.
We can use yum to install python-backports-ssl_match_hostname.noarch on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install python-backports-ssl_match_hostname.noarch.
Install python-backports-ssl_match_hostname.noarch on Amazon Linux 2 Using yum
Update yum database with yum using the following command.
sudo yum makecache --refresh
After updating yum database, We can install python-backports-ssl_match_hostname.noarch using yum by running the following command:
sudo yum -y install python-backports-ssl_match_hostname.noarch
How To Uninstall python-backports-ssl_match_hostname.noarch on Amazon Linux 2
To uninstall only the python-backports-ssl_match_hostname.noarch package we can use the following command:
sudo yum remove python-backports-ssl_match_hostname.noarch
python-backports-ssl_match_hostname.noarch Package Contents on Amazon Linux 2
/usr/lib/python2.7/site-packages/backports
/usr/lib/python2.7/site-packages/backports.ssl_match_hostname-3.5.0.1-py2.7.egg-info
/usr/lib/python2.7/site-packages/backports/ssl_match_hostname
/usr/lib/python2.7/site-packages/backports/ssl_match_hostname/__init__.py
/usr/lib/python2.7/site-packages/backports/ssl_match_hostname/__init__.pyc
/usr/lib/python2.7/site-packages/backports/ssl_match_hostname/__init__.pyo
/usr/share/doc/python-backports-ssl_match_hostname-3.5.0.1
/usr/share/doc/python-backports-ssl_match_hostname-3.5.0.1/LICENSE.txt
/usr/share/doc/python-backports-ssl_match_hostname-3.5.0.1/README.txt
References
Summary
In this tutorial we learn how to install python-backports-ssl_match_hostname.noarch on Amazon Linux 2 using yum.