Open In App

How to Install and use SSL Certificate In Python

 A secure Socket Layer (SSL) Certificate is a Digital certificate that can be used for the authentication of a website and it helps to establish an encrypted connection between the user and server. SSL is a  secure layer that creates an encrypted link between a web server and a web browser. SSL keeps internet connections secure. When an SSL  certificate is installed on the website it becomes HTTP to HTTPS, which is more secure. SSL is also called TLS.

Types of SSL certificates:



There are different types of SSL certificates with different validation levels. The six main types are:

Uses of SSL:



Prerequisite:    

Preinstalled Python environment can be downloaded from python.org. To install python on  Windows/Mac/Linux refer to:

Installation of Python certifi on Windows:

Step 1: Press the Start button and then Type CMD to Select Command Prompt from the list. When we open the command prompt then a screen like this will appear on the computer.

 

            

Step 2: Type the given below command on the command prompt and then press enter button.

python -m pip install certifi

 

In case the previous command will not work then type the given below command and then press enter button.

pip install certifi

 

Installation of Python certifi  on Linux:

Step 1:  Open your terminal.

Step 2: Type the given below command on the terminal and then press enter button.

python -m pip install certifi

Step 3:  In case if the previous command will not work then type the given below command and then press enter button.

pip install certifi

or

python -m pip install certifi

 

Python certifi.where()

The certifi.where() is a function that helps us find the information of the installed certificate authority (CA) in Python.

import certifi

print(certifi.where())

Output

 

Article Tags :