Verified Commit 4ece770e authored by Pierre-Elliott Bécue's avatar Pierre-Elliott Bécue 🚼
Browse files

Fix documentation and checks for the key requirement for DM applicants

Closes: #892578
parent 1853a777
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -468,6 +468,17 @@ class Requirement(models.Model): ...@@ -468,6 +468,17 @@ class Requirement(models.Model):
else: else:
uids = [] uids = []
has_good_uid = False has_good_uid = False
# The requirement in terms of web of trust to consider the keycheck
# as ok depends on whether the applicant is applying for DM or for
# DD.
#
# Note that this is not really elegant to have such constants hard
# coded in the code, it should probably go in backend/const.py
sigs_ok_req = 2
if self.process.applying_for in [const.STATUS_DM, const.STATUS_DM_GA]:
sigs_ok_req = 1
for ku in keycheck.uids: for ku in keycheck.uids:
uids.append({ uids.append({
"name": ku.uid.name.replace("@", ", "), "name": ku.uid.name.replace("@", ", "),
...@@ -476,7 +487,7 @@ class Requirement(models.Model): ...@@ -476,7 +487,7 @@ class Requirement(models.Model):
"sigs_no_key": len(ku.sigs_no_key), "sigs_no_key": len(ku.sigs_no_key),
"sigs_bad": len(ku.sigs_bad) "sigs_bad": len(ku.sigs_bad)
}) })
if not ku.errors and len(ku.sigs_ok) >= 2: if not ku.errors and len(ku.sigs_ok) >= sigs_ok_req:
has_good_uid = True has_good_uid = True
if not has_good_uid: if not has_good_uid:
......
...@@ -370,11 +370,12 @@ Policies (DMUP) when you use Debian resources?{% endblocktrans %} ...@@ -370,11 +370,12 @@ Policies (DMUP) when you use Debian resources?{% endblocktrans %}
<p>{% blocktrans %}Most Debian work is not anonymous, and requires the <p>{% blocktrans %}Most Debian work is not anonymous, and requires the
use of an <a href="http://www.dewinter.com/gnupg_howto/">OpenPGP</a> key. We use of an <a href="http://www.dewinter.com/gnupg_howto/">OpenPGP</a> key. We
require the key to be signed by two or more Debian Developers to make require the key to be signed by two (one for people applying to become Debian
reasonably sure that you are who you claim to be. This is called Maintainer) or more Debian Developers to make reasonably sure that you are who
<a href="http://www.w4kwh.org/privacy/keysign.html">"web of trust"</a>. you claim to be. This is called <a
If you are curious, you can check the status of your key in the global web href="http://www.w4kwh.org/privacy/keysign.html">"web of trust"</a>. If
of trust <a href="http://pgp.cs.uu.nl/">here</a>.{% endblocktrans %}</p> you are curious, you can check the status of your key in the global web of
trust <a href="http://pgp.cs.uu.nl/">here</a>.{% endblocktrans %}</p>
<p>{% blocktrans with form_fpr_label=form.person.fpr.label %}We also have some <p>{% blocktrans with form_fpr_label=form.person.fpr.label %}We also have some
requirements on the key itself: it needs to be version 4 or later, it must not requirements on the key itself: it needs to be version 4 or later, it must not
use DSA and it should be at least 4096 bits long (2048 bits are acceptable only use DSA and it should be at least 4096 bits long (2048 bits are acceptable only
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment