How to Solve NameError: name 'OpenSSL' is not defined

Solution: Import the 'OpenSSL' module

To Solve the error, add the following line to the top of your code.

import OpenSSL

 

For more information:
Python OpenSSL