Every type of TLS check that SSLyze can run against a server (supported cipher suites, session renegotiation, etc.) is
represented by a
ScanCommand, which, when run against a server, will return a specific result.
This page lists all the
ScanCommand and their corresponding results available in the current release of SSLyze.
For an example on how to run a scan via the Python API, see Running a Scan in Python.
The following scan commands are available in the current version of SSLyze:
- class sslyze.ScanCommand(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
- CERTIFICATE_INFO = 'certificate_info'¶
- SESSION_RESUMPTION = 'session_resumption'¶
- SSL_2_0_CIPHER_SUITES = 'ssl_2_0_cipher_suites'¶
- SSL_3_0_CIPHER_SUITES = 'ssl_3_0_cipher_suites'¶
- TLS_1_0_CIPHER_SUITES = 'tls_1_0_cipher_suites'¶
- TLS_1_1_CIPHER_SUITES = 'tls_1_1_cipher_suites'¶
- TLS_1_2_CIPHER_SUITES = 'tls_1_2_cipher_suites'¶
- TLS_1_3_CIPHER_SUITES = 'tls_1_3_cipher_suites'¶
- TLS_COMPRESSION = 'tls_compression'¶
- TLS_1_3_EARLY_DATA = 'tls_1_3_early_data'¶
- OPENSSL_CCS_INJECTION = 'openssl_ccs_injection'¶
- TLS_FALLBACK_SCSV = 'tls_fallback_scsv'¶
- HEARTBLEED = 'heartbleed'¶
- ROBOT = 'robot'¶
- SESSION_RENEGOTIATION = 'session_renegotiation'¶
- HTTP_HEADERS = 'http_headers'¶
- ELLIPTIC_CURVES = 'elliptic_curves'¶
The next sections describe the result class that corresponds to each scan command.
ScanCommand.CERTIFICATE_INFO: Retrieve and analyze a server’s certificate(s) to verify its validity.
- class sslyze.CertificateInfoExtraArgument(custom_ca_file)¶
Additional configuration for running the certificate_info scan command.
The path to a custom trust store file to use for certificate validation. The file should contain PEM-formatted root certificates.
- class sslyze.CertificateInfoScanResult(hostname_used_for_server_name_indication, certificate_deployments)¶
The result of retrieving and analyzing a server’s certificates to verify their validity.
The hostname sent by SSLyze as the Server Name Indication extension.
A list of leaf certificates detected by SSLyze and the corresponding analysis. Most servers only deploy one leaf certificate, but some websites (such as Facebook) return different leaf certificates depending on the client, as a way to maximize compatibility with older clients/devices.
- class sslyze.CertificateDeploymentAnalysisResult(received_certificate_chain, leaf_certificate_subject_matches_hostname, leaf_certificate_has_must_staple_extension, leaf_certificate_is_ev, leaf_certificate_signed_certificate_timestamps_count, received_chain_contains_anchor_certificate, received_chain_has_valid_order, path_validation_results, verified_chain_has_sha1_signature, verified_chain_has_legacy_symantec_anchor, ocsp_response, ocsp_response_is_trusted)¶
The result of analyzing a server’s certificate to verify its validity.
Any certificate available within the fields that follow is parsed as a
Certificateobject using the cryptography module; documentation is available at https://cryptography.io/en/latest/x509/reference.html?highlight=Certificate#cryptography.x509.Certificate
The certificate chain sent by the server; index 0 is the leaf certificate.
The verified certificate chain returned by OpenSSL for one of the trust stores packaged within SSLyze. Will be
Noneif the validation failed with all of the available trust stores (Apple, Mozilla, etc.). This is essentially a shortcut to
The result of validating the server’s certificate chain using each trust store that is packaged with SSLyze (Mozilla, Apple, etc.). If for a given trust store, the validation was successful, the verified certificate chain built by OpenSSL can be retrieved from the
Trueif the leaf certificate’s Common Name or Subject Alternative Names match the server’s hostname.
Trueif the leaf certificate is Extended Validation, according to Mozilla.
Trueif the OCSP must-staple extension is present in the leaf certificate.
The number of Signed Certificate Timestamps (SCTs) for Certificate Transparency embedded in the leaf certificate.
Noneif the version of OpenSSL installed on the system is too old to be able to parse the SCT extension.
Trueif the certificate chain returned by the server was sent in the right order. None` if any of the certificates in the chain could not be parsed.
Trueif the server included the anchor/root certificate in the chain it sends back to clients.
Noneif the verified chain could not be built.
Trueif any of the leaf or intermediate certificates are signed using the SHA-1 algorithm.
Noneif the verified chain could not be built.
Trueif the certificate chain contains a distrusted Symantec anchor (https://blog.qualys.com/ssllabs/2017/09/26/google-and-mozilla-deprecating-existing-symantec-certificates).
Noneif the verified chain could not be built.
The OCSP response returned by the server.
Noneif no response was sent by the server or if the scan was run through an HTTP proxy (the proxy will not forward the server’s OCSP response). If present, the OCSP response is an
OCSPResponseobject parsed using the cryptography module; documentation is available at https://cryptography.io/en/latest/x509/ocsp.html?highlight=OCSPResponse#cryptography.x509.ocsp.OCSPResponse
Trueif the OCSP response is trusted using the Mozilla trust store.
Noneif no OCSP response was sent by the server.
- class sslyze.PathValidationResult(trust_store, verified_certificate_chain, openssl_error_string)¶
The result of trying to validate a server’s certificate chain using a specific trust store.
The trust store used for validation.
The verified certificate chain returned by OpenSSL. Index 0 is the leaf certificate and the last element is the anchor/CA certificate from the trust store. Will be None if the validation failed or the verified chain could not be built. Each certificate is parsed using the cryptography module; documentation is available at https://cryptography.io/en/latest/x509/reference/#x-509-certificate-object.
The result string returned by OpenSSL’s validation function; None if validation was successful.
Whether the certificate chain is trusted when using supplied the trust_stores.
- class sslyze.TrustStore(path, name, version, ev_oids=None)¶
A set of root certificates to be used for certificate validation.
The path on the local system to the PEM-formatted file containing the root certificates.
The human-readable name of the trust store (such as “Mozilla”).
The human-readable version or date of the trust store (such as “09/2016”).
Is the supplied server certificate EV?
- Return type:
ScanCommand.SSL_2_0_CIPHER_SUITES: Test a server for SSL 2.0 support. ScanCommand.SSL_3_0_CIPHER_SUITES: Test a server for SSL 3.0 support. ScanCommand.TLS_1_0_CIPHER_SUITES: Test a server for TLS 1.0 support. ScanCommand.TLS_1_1_CIPHER_SUITES: Test a server for TLS 1.1 support. ScanCommand.TLS_1_2_CIPHER_SUITES: Test a server for TLS 1.2 support. ScanCommand.TLS_1_3_CIPHER_SUITES: Test a server for TLS 1.3 support.
- class sslyze.CipherSuitesScanResult(tls_version_used, accepted_cipher_suites, rejected_cipher_suites)¶
The result of testing a server for cipher suites with a specific version of SSL/TLS.
The SSL/TLS version used to connect to the server.
The list of cipher suites supported supported by both SSLyze and the server.
The list of cipher suites supported by SSLyze that were rejected by the server.
- class sslyze.CipherSuiteRejectedByServer(cipher_suite, error_message)¶
- class sslyze.CipherSuiteAcceptedByServer(cipher_suite, ephemeral_key)¶
- ephemeral_key: The ephemeral key negotiated with the server when using (EC) DH cipher suites. None if the cipher
suite does not use ephemeral keys or if the ephemeral key could not be retrieved.
- class sslyze.EphemeralKeyInfo(type, size, public_bytes)¶
Common fields shared by all kinds of TLS key exchanges.
- class sslyze.CipherSuite(name, is_anonymous, key_size, openssl_name)¶
ScanCommand.ELLIPTIC_CURVES: Test a server for supported elliptic curves.
- class sslyze.SupportedEllipticCurvesScanResult(supports_ecdh_key_exchange, supported_curves, rejected_curves)¶
The result of testing a server for supported elliptic curves.
True if the server supports at least one cipher suite with an ECDH key exchange.
A list of EllipticCurve that were accepted by the server or None if the server does not support ECDH cipher suites.
A list of EllipticCurve that were rejected by the server or None if the server does not support ECDH cipher suites.
ScanCommand.ROBOT: Test a server for the ROBOT vulnerability.
- class sslyze.RobotScanResult(robot_result)¶
The result of testing a server for the ROBOT vulnerability.
An Enum providing the result of the ROBOT scan.
- class sslyze.RobotScanResultEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
The result of attempting exploit the ROBOT issue on the server.
The server is vulnerable but the attack would take too long.
The server is vulnerable and real attacks are feasible.
The server supports RSA cipher suites but does not act as an oracle.
The server does not supports RSA cipher suites.
Could not determine whether the server is vulnerable or not.
- VULNERABLE_WEAK_ORACLE = 'VULNERABLE_WEAK_ORACLE'¶
- VULNERABLE_STRONG_ORACLE = 'VULNERABLE_STRONG_ORACLE'¶
- NOT_VULNERABLE_NO_ORACLE = 'NOT_VULNERABLE_NO_ORACLE'¶
- NOT_VULNERABLE_RSA_NOT_SUPPORTED = 'NOT_VULNERABLE_RSA_NOT_SUPPORTED'¶
- UNKNOWN_INCONSISTENT_RESULTS = 'UNKNOWN_INCONSISTENT_RESULTS'¶
ScanCommand.SESSION_RESUMPTION: Test a server for TLS 1.2 session resumption support using session IDs and TLS tickets.
- class sslyze.TlsResumptionSupportEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
The result of attempting to resume TLS sessions with the server.
All the session resumption attempts were successful.
Only some of the session resumption attempts were successful.
None of the session resumption attempts were successful.
The server only supports TLS 1.3, which does not support Session ID nor TLS Tickets resumption.
- class sslyze.SessionResumptionSupportExtraArgument(number_of_resumptions_to_attempt)¶
Additional configuration for running the SESSION_RESUMPTION scan command.
The number of session resumptions (both with Session IDs and TLS Tickets) that SSLyze should attempt. The default value is 5, but a higher value such as 100 can be used to get a more accurate measure of how often session resumption succeeds or fails with the server.
- class sslyze.SessionResumptionSupportScanResult(session_id_resumption_result, session_id_attempted_resumptions_count, session_id_successful_resumptions_count, tls_ticket_resumption_result, tls_ticket_attempted_resumptions_count, tls_ticket_successful_resumptions_count)¶
The result of testing a server for TLS 1.2 session resumption support, using Session IDs and TLS tickets.
The overall result of session ID resumption testing.
The total number of session ID resumptions that were attempted.
The number of session ID resumptions that were successful.
The overall result of TLS ticket resumption testing.
The total number of TLS ticket resumptions that were attempted.
The number of TLS ticket resumptions that were successful.
ScanCommand.TLS_COMPRESSION: Test a server for TLS compression support, which can be leveraged to perform a CRIME attack.
ScanCommand.TLS_1_3_EARLY_DATA: Test the server(s) for TLS 1.3 early data support.
ScanCommand.TLS_FALLBACK_SCSV: Test a server for the TLS_FALLBACK_SCSV mechanism to prevent downgrade attacks.
ScanCommand.HEARTBLEED: Test a server for the OpenSSL Heartbleed vulnerability.
ScanCommand.HTTP_HEADERS: Test a server for the presence of security-related HTTP headers.
- class sslyze.HttpHeadersScanResult(http_request_sent, http_error_trace, http_path_redirected_to, strict_transport_security_header, expect_ct_header=None)¶
The result of testing a server for the presence of security-related HTTP headers.
Each HTTP header described below will be
Noneif the server did not return a valid HTTP response, or if the server returned an HTTP response without the HTTP header.
The initial HTTP request sent to the server by SSLyze.
An error the server returned after receiving the initial HTTP request. If this field is set, all the subsequent fields will be
Noneas SSLyze did not receive a valid HTTP response from the server.
The path SSLyze was eventually redirected to after sending the initial HTTP request.
The Strict-Transport-Security header returned by the server.
DEPRECATED - will always be
None. This is because the Expect-CT header has officially been deprecated.
- class sslyze.StrictTransportSecurityHeader(max_age, preload, include_subdomains)¶
A Strict-Transport-Security header parsed from a server’s HTTP response.
Trueif the preload directive is set.
Trueif the includesubdomains directive is set.
The content of the max-age field.
- class sslyze.ExpectCtHeader(max_age, report_uri, enforce)¶
An Expect-CT header parsed from a server’s HTTP response.
The content of the max-age field.
The content of report-uri field.
True if enforce directive is set.
ScanCommand.OPENSSL_CCS_INJECTION: Test a server for the OpenSSL CCS Injection vulnerability (CVE-2014-0224).
- class sslyze.OpenSslCcsInjectionScanResult(is_vulnerable_to_ccs_injection)¶
The result of testing a server for the OpenSSL CCS Injection vulnerability (CVE-2014-0224).
True if the server is vulnerable to the OpenSSL CCS Injection vulnerability.
ScanCommand.SESSION_RENEGOTIATION: Test a server for for insecure TLS renegotiation and client-initiated renegotiation.
- class sslyze.SessionRenegotiationScanResult(supports_secure_renegotiation, is_vulnerable_to_client_renegotiation_dos)¶
The result of testing a server for insecure TLS renegotiation and client-initiated renegotiation.
True if the server honors client-initiated renegotiation attempts.
True if the server supports secure renegotiation.