Add gpgkey, gpgfingerprint check when building the seed info
authorBrian Dolbec <dolsen@gentoo.org>
Fri, 28 Jun 2013 19:40:48 +0000 (12:40 -0700)
committerBrian Dolbec <dolsen@gentoo.org>
Sat, 6 Jul 2013 18:47:45 +0000 (11:47 -0700)
gkeyldap/cli.py

index 32f1f8722a49b53b14f15ae1ceb25d16026d1ec5..171767bcf97f6bacfd630ab33763270ba31c4a89 100644 (file)
@@ -303,5 +303,15 @@ class Main(object):
             logger.error("A valid keyid or longkeyid was not found for")
             logger.error("developer: %s, %s : gpgkey = %s"
                 %(info['uid'][0], info['cn'][0], gpgkey))
+        else:
+            for x in [2, 3]:
+                if not keyinfo[x]:
+                    continue
+                for y in keyinfo[x]:
+                    index = len(y.lstrip('0x'))
+                    if y.lstrip('0x') not in [x[-index:] for x in keyinfo[5]]:
+                        logger.error('GPGKey and/or fingerprint error in' +
+                            ' ladap info for: ' + info['uid'][0])
+                        logger.error(str(keyinfo))
         return keyinfo