{% extends "core/base_package.html" %}{% load bootstrap3 i18n moneta %} {% block bootstrap3_title %}{% trans 'Package' %}{% endblock %} {% block repo_content %}
{% trans 'You can download this file and check if it is not corrupted: ' %}
{{ repo|curl }} -O {{ absolute_url }}{{ element|direct_link }}
{{ repo|curl }} -o {{ element.filename }}.sha256 {{ absolute_url }}{{ element|checksum:'sha256' }}
{% if is_os_x %}shasum -a 256 -c {{ element.filename }}.sha256
{% else %}sha256sum -c {{ element.filename }}{% endif %}
{% with author=element.author %}{% blocktrans %}This element has a GPG signature from {{ author }} that you can check: {% endblocktrans %}{% endwith %}
{{ repo|curl }} -o {{ element.filename }}.sig {{ absolute_url }}{{ signature|signature:element }}
gpg -verify {{ element.filename }}.sig
{% elif signature.method == signature.OPENSSL %}{% trans 'This element has a OpenSSL/x509 signature that you should check:' %}
{{ repo|curl }} -o {{ element.filename }}.ssl {{ absolute_url }}{{ signature|signature:element }}
openssl x509 -in {% trans 'certificate.pem' %} -pubkey -noout > {{ element.filename }}.pub
openssl dgst -sha256 -verify {{ element.filename }}.pub -signature {{ element.filename }}.ssl {{ element.filename }}
{% endif %}