{"id":21605,"library":"nassl","title":"nassl","description":"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.","status":"active","version":"5.4.0","language":"python","source_language":"en","source_url":"https://github.com/nabla-c0d3/nassl","tags":["ssl","tls","openssl","security","certificate","wrapper"],"install":[{"cmd":"pip install nassl","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from nassl import SslClient","symbol":"SslClient","correct":"from nassl import SslClient"}],"quickstart":{"code":"from nassl import SslClient\n\nclient = SslClient('www.google.com', 443)\nclient.do_handshake()\nprint('Server cert CN:', client.get_certificate_info().subject.get('CN'))\nclient.close()","lang":"python","description":"Basic TLS handshake with Google and print Common Name."},"warnings":[{"fix":"Use Python 3.10+ or stay on nassl v4 if you must use older Python.","message":"nassl v5 dropped support for Python <3.10. Upgrade your Python environment.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"from nassl._nassl import OpenSSL_Error\ntry: ...\nexcept OpenSSL_Error: ...","message":"SslClient.do_handshake() raises a custom 'Connection error' on failure, not a built-in exception. Catch nassl._nassl.OpenSSL_Error.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace start_ssl_client with SslClient(); use get_certificate_info().","message":"Old API 'start_ssl_client' and 'get_certificate_chain' are deprecated and will be removed in v6. Use SslClient and SslClient.get_certificate_info().","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"if not client.is_closed(): client.do_handshake()","message":"Calling do_handshake() on an already-closed client raises RuntimeError. Always check if client.is_connected before reusing.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'3.10':7 '5.4.0':30 'access':14 'approxim':32 'certif':20,38 'current':28 'custom':25 'experiment':2 'extract':21 'handshak':26 'includ':18 'intern':17 'level':13 'logic':27 'low':12 'low-level':11 'nassl':1 'ocsp':22 'openssl':3,36 'provid':10 'python':6 'quarter':33 'releas':31 'secur':37 'ssl':34 'ssl/tls':16 'sslyze':9 'stapl':23 'tls':35 'version':29 'wrapper':4,39 'x.509':19","created_at":"2026-04-27T17:00:47.265716+00:00","updated_at":"2026-04-27T17:00:47.265716+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'SslClient' from 'nassl' (/tmp/tmp0r2k9hzu/venv/lib/python3.12/site-packages/nassl/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"5.4.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/nabla-c0d3/nassl","docs":null,"changelog":null,"pypi":"https://pypi.org/project/nassl/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["auth-security","http-networking","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}