def __init__(self, peer_cert = None, config = None ):
self.peer_cert = peer_cert
self.hierarchy = Hierarchy()
- self.trusted_cert_list = TrustedRootList().get_list()
if not config:
- self.config = Config()
-
+ self.config = Config()
+ self.trusted_cert_list = TrustedRootList(self.config.get_trustedroots_dir()).get_list()
+
def check(self, cred, operation):
"""
@param auth_name human readable name of authority
"""
+ # get auth info will throw an exception if the authority doesnt exist
self.get_auth_info(name)
@param name human readable name of object
"""
auth_name = self.get_authority(name)
- if not auth_name or name == self.config.SFA_INTERFACE_HRN:
- # the root authority belongs to the registry by default?
- # TODO: is this true?
+ if not auth_name:
+ auth_name = name
+ if name == self.config.SFA_INTERFACE_HRN:
return
self.verify_auth_belongs_to_me(auth_name)