{# templates/_macros_ssl_tls.html #} {% macro ssl_tls_card(ssl_tls) %}

SSL/TLS Intelligence

{# -------- 1) Error branch -------- #} {% if ssl_tls is none or 'error' in ssl_tls %}
Error

SSL/TLS enrichment failed or is unavailable.

{% if ssl_tls and ssl_tls.error %}
{{ ssl_tls.error }}
{% endif %} {# -------- 2) Skipped branch -------- #} {% elif ssl_tls.skipped %}
Skipped
{% if ssl_tls.reason %}{{ ssl_tls.reason }}{% endif %}
{# -------- 3) Normal branch (render probe + crt.sh) -------- #} {% else %} {# ===================== LIVE PROBE ===================== #} {% set probe = ssl_tls.probe if ssl_tls else None %}

Live TLS Probe

{% if probe %} Host: {{ probe.hostname }}:{{ probe.port }} {% endif %}
{% if not probe %}

No probe data.

{% else %}
{% set versions = ['TLS1.0','TLS1.1','TLS1.2','TLS1.3'] %} {% for v in versions %} {% set r = probe.results_by_version.get(v) if probe.results_by_version else None %}
{{ v }}
{% if r and r.supported %}
Supported
{% if r.selected_cipher %} {{ r.selected_cipher }} {% else %} cipher: n/a {% endif %}
{% if r.handshake_seconds is not none %} {{ '%.0f' % (r.handshake_seconds*1000) }} ms {% else %} {% endif %}
{% else %}
Not Supported
{% if r and r.error %} ({{ r.error }}) {% else %} {% endif %}
{% endif %}
{% endfor %}
{% if probe.weak_protocols and probe.weak_protocols|length > 0 %} Weak Protocols {% for wp in probe.weak_protocols %} {{ wp }} {% endfor %} {% endif %} {% if probe.weak_ciphers and probe.weak_ciphers|length > 0 %} Weak Ciphers {% for wc in probe.weak_ciphers %} {{ wc }} {% endfor %} {% endif %}
{% if probe.errors and probe.errors|length > 0 %}
Probe Notes
    {% for e in probe.errors %}
  • {{ e }}
  • {% endfor %}
{% endif %} {% endif %}

{# ===================== CRT.SH ===================== #} {% set crtsh = ssl_tls.crtsh if ssl_tls else None %}

Certificate Transparency (crt.sh)

{% if crtsh %} Parsed: {{ crtsh.hostname or 'n/a' }} {% if crtsh.root_domain %} • Root: {{ crtsh.root_domain }} {% if crtsh.is_root_domain %}Root{% else %}Subdomain{% endif %} {% endif %} {% endif %}
{% if not crtsh %}

No CT data.

{% else %}

Host Certificates

{% set host_certs = crtsh.crtsh.host_certs if 'crtsh' in crtsh and crtsh.crtsh else None %} {% if host_certs and host_certs|length > 0 %}
    {% for c in host_certs[:10] %}
  • {{ c.get('issuer_name','issuer n/a') }} {{ c.get('name_value','(name n/a)') }} • not_before: {{ c.get('not_before','?') }}
  • {% endfor %}
{% if host_certs|length > 10 %}
(+ {{ host_certs|length - 10 }} more)
{% endif %} {% else %}

No active host certs found.

{% endif %}

Wildcard on Root

{% set wc = crtsh.crtsh.wildcard_root_certs if 'crtsh' in crtsh and crtsh.crtsh else None %} {% if wc and wc|length > 0 %}
    {% for c in wc[:10] %}
  • {{ c.get('issuer_name','issuer n/a') }} {{ c.get('name_value','(name n/a)') }} • not_before: {{ c.get('not_before','?') }}
  • {% endfor %}
{% if wc|length > 10 %}
(+ {{ wc|length - 10 }} more)
{% endif %} {% else %}

No wildcard/root certs found.

{% endif %}
{% endif %}
{# ===================== RAW JSON TOGGLE ===================== #}
{% endif %}

Back to top

{% endmacro %}