X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Ftrust%2Fcredential.py;fp=sfa%2Ftrust%2Fcredential.py;h=1ceb97535e1107254b6814089446fcaeee18ee3f;hb=e0c63dcc251bdc18bf90b51e5219a0f8b4953022;hp=e4d5e999177cdbf318afbf367065e0bc3c6d6aa1;hpb=6d176c5d65b0efca03780170adab849152986b92;p=sfa.git diff --git a/sfa/trust/credential.py b/sfa/trust/credential.py index e4d5e999..1ceb9753 100644 --- a/sfa/trust/credential.py +++ b/sfa/trust/credential.py @@ -854,11 +854,16 @@ class Credential(object): # If caller explicitly passed in None that means skip cert chain validation. # - Strange and not typical if trusted_certs is not None: - # Verify the gids of this cred and of its parents + # Verify the caller and object gids of this cred and of its parents for cur_cred in self.get_credential_list(): - cur_cred.get_gid_object().verify_chain(trusted_cert_objects) - cur_cred.get_gid_caller().verify_chain(trusted_cert_objects) - + # check both the caller and the subject + for gid in cur_cred.get_gid_object(), cur_cred.get_gid_caller(): + logger.debug("Credential.verify: verifying chain {}" + .format(gid.pretty_cert())) + logger.debug("Credential.verify: against trusted {}" + .format(" ".join(trusted_certs))) + gid.verify_chain(trusted_cert_objects) + refs = [] refs.append("Sig_{}".format(self.get_refid()))