{% extends "django_webid/provider/base.html" %}

{% load i18n %}
{% load uni_form_tags %}


{% block head_title %}{% blocktrans %}WebID Cert Details{% endblocktrans %}{% endblock %}

{% block extra_head %}
{% endblock %}

{% block body %}

{% if messages %}
    <ul id="messages">
        {% for message in messages %}
        <li id="message_{{ forloop.counter }}">{{message}}</li>
        {% endfor %}
    </ul>
{% endif %}

<div class="middle_panel">

    <h1>{% trans "WebID Certificate Details" %}</h1>
    {% if not object.pubkey.is_active %}
    <h2 class="error">The Public Key contained on this Certificate has been revoked. You cannot use it for login anywhere.</h2>
    {% endif %}
    {% if object.comment %}
    <p><b>comment</b>: {{ object.comment }}</p>
    {% endif %}
    {% if object.user_agent_string %}
    <p><b>installed on browser</b>: {{ object.user_agent_string }}</p>
    {% endif %}

    <p><b>sha1 fingerprint</b>: {{ object.fingerprint_sha1 }}</p>
    <p><b>sha256 fingerprint</b>: {{ object.fingerprint_sha256 }}</p>
    <p><b>md5 fingerprint</b>: {{object.fingerprint_md5 }}
    <p><b>Valid From</b>: {{object.valid_from}}</p>
    <p><b>Valid Until</b>: {{object.expires}}</p>

    <h2>Public Key on this Certificate</h2>
    <p><b>Bits</b>: {{object.pubkey.bits}}</p>
    <p><b>Modulus</b>: {{object.pubkey.mod}}</p>
    <p><b>Exponent</b>: {{object.pubkey.exp}}</p>

    {% if object.pubkey.is_active %}
    <div class="cert_revoke_link">
	    <a class="danger" href="{% url webidprovider-cert-revoke cert_id=object.id %}">Revoke this cert</a>
    </div>
    {% endif %}
</div>

{% endblock %}

{% block extra_body %}
{% endblock %}

