Open In App

How to Install and use SSL Certificate In Python

Last Updated : 04 Dec, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

 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:

  • Domain Validated certificates 
  • Wildcard SSL certificates
  • Multi-Domain SSL certificates 
  • Organization Validated certificates 
  • Unified Communications Certificates
  • Extended Validation certificates 

Uses of SSL:

  • Authentication: An SSL certificate will verify that a user is connecting to the correct server.
  • Encryption: SSL will ensure that the connection between the user and the server must be encrypted.
  • HTTPS: It is a combination of the HTTP with the Secure Socket Layer (SSL)/Transport Layer Security (TLS) protocol. 
  • TLS: It is an authentication and security protocol widely implemented in browsers and Web servers.

Prerequisite:    

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

  • Windows
  • Mac
  • Linux

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.

Installation of Python certifi on Windows:

 

            

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

python -m pip install certifi
Installation of Python certifi on Windows

 

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 Windows

 

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
Installation of Python certifi  on Linux

 

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

 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads