default.tpl 938 Bytes
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
{%- 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)}}
Markus Kötter's avatar
Markus Kötter committed
16
{%- if debug or not hashok %}
Markus Kötter's avatar
Markus Kötter committed
17
18
19
20
21
22
23
    alg:{{hash['micalg']}}
    digest:{{hash['digest']}}
{%- endif %}

signature {{isok(signatureok)}}

cert {{isok(certok)}}
Markus Kötter's avatar
Markus Kötter committed
24
{%- if debug or not certok %}
Markus Kötter's avatar
Markus Kötter committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    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()) }}
{% endfor %}

{%- endif %}

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