+
+ def _check_id_fingerprint_match(self, info, keyinfo):
+ for x in [2, 3]:
+ # skip blank id field
+ if not keyinfo[x]:
+ continue
+ for y in keyinfo[x]:
+ index = len(y.lstrip('0x'))
+ if y.lstrip('0x').lower() not in [x[-index:].lower() for x in keyinfo[5]]:
+ self.logger.error('ERROR in ldap info for: %s, %s'
+ %(info['uid'][0],info['cn'][0]))
+ self.logger.error(' ' + str(keyinfo))
+ self.logger.error(' GPGKey id %s not found in the '
+ % y.lstrip('0x') + 'listed fingerprint(s)')
+ return
+
+
+ def _check_fingerprint_integrity(self, info, keyinfo):
+ for x in keyinfo[5]:
+ # check fingerprint integrity
+ if len(x) != 40:
+ self.logger.error('ERROR in ldap info for: %s, %s'
+ %(info['uid'][0],info['cn'][0]))
+ self.logger.error(' GPGKey incorrect fingerprint ' +
+ 'length (%s) for fingerprint: %s' %(len(x), x))
+ continue
+ if not self.fingerprint_re.match(x):
+ self.logger.error('ERROR in ldap info for: %s, %s'
+ %(info['uid'][0],info['cn'][0]))
+ self.logger.error(' GPGKey: Non hexadecimal digits in ' +
+ 'fingerprint for fingerprint: ' + x)
+ return