Registry / auth-security / nassl
library5.4.0pypypiunverified

Experimental OpenSSL wrapper for Python 3.10+ and SSLyze, providing low-level access to SSL/TLS internals including X.509 certificate extraction, OCSP stapling, and custom handshake logic. Current version 5.4.0, released approximately quarterly.

pip install nassl
INSTALL
IMPORT
SIG · NASSL
N
nassl
auth-securitypythonv5.4.0
Install
1.9s avg
Import
—
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v5.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 24.1MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 25MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SslClient
✓ from nassl import SslClient
✗ from nassl import SslClient

Basic TLS handshake with Google and print Common Name.

from nassl import SslClient client = SslClient('www.google.com', 443) client.do_handshake() print('Server cert CN:', client.get_certificate_info().subject.get('CN')) client.close()
Debug
Known issues
breakingnassl v5 dropped support for Python <3.10. Upgrade your Python environment.
fix
Use Python 3.10+ or stay on nassl v4 if you must use older Python.
affects: >=5.0.0
gotchaSslClient.do_handshake() raises a custom 'Connection error' on failure, not a built-in exception. Catch nassl._nassl.OpenSSL_Error.
fix
from nassl._nassl import OpenSSL_Error
try: ...
except OpenSSL_Error: ...
affects: all
deprecatedOld API 'start_ssl_client' and 'get_certificate_chain' are deprecated and will be removed in v6. Use SslClient and SslClient.get_certificate_info().
fix
Replace start_ssl_client with SslClient(); use get_certificate_info().
affects: >=4.0.0
gotchaCalling do_handshake() on an already-closed client raises RuntimeError. Always check if client.is_connected before reusing.
fix
if not client.is_closed(): client.do_handshake()
affects: all
Upgrade
Version history
5.4.0latest on PyPI · released Dec 29, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
36
OpenAI (training)
1
Resources
nassl — pip install nassl · libregistry