Add PGP_SIGNER and display if it's set

This commit is contained in:
Son NK 2020-11-14 13:00:14 +01:00
parent a072d6c0cd
commit 2c46d1db8e
3 changed files with 9 additions and 1 deletions

View File

@ -349,3 +349,6 @@ PGP_SENDER_PRIVATE_KEY_PATH = os.environ.get("PGP_SENDER_PRIVATE_KEY_PATH")
if PGP_SENDER_PRIVATE_KEY_PATH:
with open(get_abs_path(PGP_SENDER_PRIVATE_KEY_PATH)) as f:
PGP_SENDER_PRIVATE_KEY = f.read()
# the signer address that signes outgoing encrypted emails
PGP_SIGNER = os.environ.get("PGP_SIGNER")

View File

@ -85,7 +85,10 @@
Pretty Good Privacy (PGP)
<div class="small-text mt-1">
By importing your PGP Public Key into SimpleLogin, all emails sent to {{ mailbox.email }} are
<b>encrypted</b> with your key.
<b>encrypted</b> with your key. <br>
{% if PGP_SIGNER %}
All forwarded emails will be signed with <b>{{ PGP_SIGNER }}</b>.
{% endif %}
</div>
</div>

View File

@ -52,6 +52,7 @@ from app.config import (
get_abs_path,
PADDLE_MONTHLY_PRODUCT_IDS,
PADDLE_YEARLY_PRODUCT_IDS,
PGP_SIGNER,
)
from app.dashboard.base import dashboard_bp
from app.developer.base import developer_bp
@ -475,6 +476,7 @@ def jinja2_filter(app):
LANDING_PAGE_URL=LANDING_PAGE_URL,
STATUS_PAGE_URL=STATUS_PAGE_URL,
SUPPORT_EMAIL=SUPPORT_EMAIL,
PGP_SIGNER=PGP_SIGNER,
)