debug.tpl 1.01 KB
Newer Older
Markus Kötter's avatar
Markus Kötter committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{%- macro dn(c) -%}
{%- for (a,b) in c.get_components() -%}
{{a.decode('utf-8')}}={{b.decode('utf-8')}}{%- if not loop.last -%}/{%- endif -%}
{%- endfor -%}
{%- endmacro -%}

{%- macro isok(v) -%}
{%- if v -%}
✔️ {# grüner haken '\u2714' #}
{%- else -%}
{# rotes kreuz '\u274c' #}
{%- endif -%}
{%- endmacro -%}

hash {{isok(hashok)}}
{%- if not hashok %}
    alg:{{hash['micalg']}}
    digest:{{hash['digest']}}
{%- endif %}

signature {{isok(signatureok)}}

cert {{isok(certok)}}
{%- if not certok or True %}
    Signaturgeber:
            S: {{ dn(cert.get_subject()) }}
            I: {{ dn(cert.get_issuer()) }}

    In der Signatur beinhaltete Zertifikate:
{%- for (c,ok) in certs %}
        {{{True:'verankert',False:'unvollständig'}[ok]}}
            S: {{ dn(c.get_subject()) }}
            I: {{ dn(c.get_issuer()) }}
              {{c.get_notBefore()}}-{{c.get_notAfter()}}
              {{c.get_signature_algorithm()}}
{% endfor %}

{%- endif %}

https://gitlab.uni-hannover.de/koetter/mailsignaturevalidator