Registry / http-networking / sslyze

sslyze

JSON →
library6.3.1pypypi✓ verified 83d ago

Fast and powerful SSL/TLS scanning library and CLI tool. Current version 6.3.1, requires Python >=3.10. Release cadence is about 3-6 months per minor version.

pip install sslyze
INSTALL
IMPORT
SIG · SSLYZE
S
sslyze
http-networkingpythonv6.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

ServerNetworkLocation
from sslyze import ServerNetworkLocation
Scanner
from sslyze import Scanner
ServerScanRequest
from sslyze import ServerScanRequest
ScanCommand
from sslyze.plugins.scan_commands import ScanCommand
from sslyze import ScanCommand
In sslyze < 6.0? Actually in current version ScanCommand is exported from sslyze.plugins.scan_commands. But docs show direct import from sslyze. VERIFY.

Basic asynchronous scan of a TLS server using the Python API.

import asyncio from sslyze import ServerNetworkLocation, Scanner, ServerScanRequest from sslyze.plugins.scan_commands import ScanCommand async def scan(): server_location = ServerNetworkLocation(hostname="www.google.com", port=443) scanner = Scanner() scan_request = ServerScanRequest( server_location=server_location, scan_commands={ ScanCommand.TLS_1_2_CIPHER_SUITES, ScanCommand.CERTIFICATE_INFO, }, ) result = await scanner.scan_async(scan_request) print(result) asyncio.run(scan())
sslyze --version
Debug
Known issues
breakingFrom v6.0.0, Python 3.9 support dropped. Requires >=3.10.
fix
Upgrade Python to 3.10 or newer.
affects: >=6.0.0
breakingFrom v6.0.0, the Python API changed to fully async. Synchronous scanner and synchronous methods removed.
fix
Use asyncio and await scanner.scan_async() instead of synchronous scan().
affects: >=6.0.0
breakingFrom v6.0.0, the JSON output for certificate info changed: leaf_certificate_subject_matches_hostname removed.
fix
Use certificate validation API instead.
affects: >=6.0.0
deprecatedExpect-CT header check removed in v5.1.0 due to deprecation of Expect-CT.
fix
Remove --http_headers --expect_ct from CLI.
affects: >=5.1.0
gotchaOn some Linux distributions (Red Hat, CentOS) sslyze may crash due to OpenSSL compatibility. Fixed in 5.2.0.
fix
Upgrade to 5.2.0 or later.
affects: <5.2.0
gotchaIf using custom TLS profiles via --custom_tls_config, ensure the config is correctly formatted. Incorrect format may silently fall back to default.
fix
Check README for example config format.
affects: >=6.2.0
Errors
Common errors & fixes
AttributeError: module 'sslyze' has no attribute 'ScanCommand'
ScanCommand is not directly in the sslyze module; it's in sslyze.plugins.scan_commands.
fix
Use: from sslyze.plugins.scan_commands import ScanCommand
TypeError: scan() takes 1 positional argument but 2 were given
Older synchronous API used scanner.scan(server_info). In v6+, use async API: await scanner.scan_async(scan_request).
fix
Use async/await and ServerScanRequest object.
ImportError: cannot import name 'ServerNetworkLocation' from 'sslyze'
Old sslyze (<6) had different import paths. In v6+, import from sslyze directly.
fix
Upgrade sslyze to >=6, then use: from sslyze import ServerNetworkLocation
RuntimeError: asyncio.run() cannot be called from a running event loop
Calling asyncio.run() inside a Jupyter notebook or another async context.
fix
Use await or run in a new event loop with nest_asyncio.
pydantic.error_wrappers.ValidationError: (...) for ScanCommand
Passing invalid enum values or mixing strings/enums.
fix
Use ScanCommand enum members (e.g., ScanCommand.CERTIFICATE_INFO) not strings.
Upgrade
Version history
6.3.1latest on PyPI · released Mar 29, 2026
Audit
Dependencies
cryptographyrequiredCore dependency for TLS operations, bound to >=43,<47 in 6.3.1
nasslrequiredUnderlying TLS library used by sslyze for low-level TLS handshakes
pydanticrequiredUsed for data validation and settings (starting from 5.2.0+)
Agent activity
27 hits · last 30 days
node
24
OpenAI (training)
1
Resources