commit:     2bdf8c0c827cf024c4e26f9167ed4a6573625601
Author:     Brian Dolbec dolsen <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 15 01:47:19 2018 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Aug 15 01:47:19 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=2bdf8c0c

gkeys checks.py: Remove missed DSA algorithm entries

Move bitlength calc within the primary if,

 gkeys/gkeys/checks.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gkeys/gkeys/checks.py b/gkeys/gkeys/checks.py
index 8119395..8da6414 100644
--- a/gkeys/gkeys/checks.py
+++ b/gkeys/gkeys/checks.py
@@ -64,7 +64,7 @@ TEST_SPEC = {
             'expire': 900,
             },
         },
-    'algorithms': ['DSA', 'RSA', '1', '2', '3', '17'],
+    'algorithms': ['RSA', '1', '2', '3'],
     'versions': ['4'],
     'qualified_id': '@gentoo.org',
 }
@@ -302,8 +302,8 @@ class KeyChecks(object):
 
 
     def _test_bits(self, data, stats):
-        bits = int(data.keylength)
         if data.pubkey_algo in TEST_SPEC['algorithms']:
+            bits = int(data.keylength)
             if bits >= TEST_SPEC['bits'][ALGORITHM_CODES[data.pubkey_algo]]:
                 stats[SPEC_INDEX['bits']] = True
             else:

Reply via email to