Skip to main content

Python wrapper module around the OpenSSL library

Project description

Stable Docs Build status Test coverage

High-level wrapper around a subset of the OpenSSL library. Includes

  • SSL.Connection objects, wrapping the methods of Python’s portable sockets
  • Callbacks written in Python
  • Extensive error-handling mechanism, mirroring OpenSSL’s error codes

… and much more.

You can find more information in the documentation. Development takes place on GitHub.


If you run into bugs, you can file them in our issue tracker.

We maintain a cryptography-dev mailing list for both user and development discussions.

You can also join #cryptography-dev on Freenode to ask questions or get involved.

Release Information

17.1.0 (2017-06-30)

Backward-incompatible changes:

  • Removed the deprecated OpenSSL.rand.egd() function. Applications should prefer os.urandom() for random number generation. #630
  • Removed the deprecated default digest argument to OpenSSL.crypto.CRL.export(). Callers must now always pass an explicit digest. #652
  • Fixed a bug with ASN1_TIME casting in X509.set_notBefore(), X509.set_notAfter(), Revoked.set_rev_date(), Revoked.set_nextUpdate(), and Revoked.set_lastUpdate(). You must now pass times in the form YYYYMMDDhhmmssZ. YYYYMMDDhhmmss+hhmm and YYYYMMDDhhmmss-hhmm will no longer work. #612


  • Deprecated the legacy “Type” aliases: ContextType, ConnectionType, PKeyType, X509NameType, X509ExtensionType, X509ReqType, X509Type, X509StoreType, CRLType, PKCS7Type, PKCS12Type, NetscapeSPKIType. The names without the “Type”-suffix should be used instead.


  • Added OpenSSL.crypto.X509.from_cryptography() and OpenSSL.crypto.X509.to_cryptography() for converting X.509 certificate to and from pyca/cryptography objects. #640
  • Added OpenSSL.crypto.X509Req.from_cryptography(), OpenSSL.crypto.X509Req.to_cryptography(), OpenSSL.crypto.CRL.from_cryptography(), and OpenSSL.crypto.CRL.to_cryptography() for converting X.509 CSRs and CRLs to and from pyca/cryptography objects. #645
  • Added OpenSSL.debug that allows to get an overview of used library versions (including linked OpenSSL) and other useful runtime information using python -m OpenSSL.debug. #620
  • Added a fallback path to Context.set_default_verify_paths() to accommodate the upcoming release of cryptography manylinux1 wheels. #633

Full changelog.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pyOpenSSL-17.1.0-py2.py3-none-any.whl (53.5 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Jun 30, 2017
pyOpenSSL-17.1.0.tar.gz (170.7 kB) Copy SHA256 hash SHA256 Source None Jun 30, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page