Changeset 1021


Ignore:
Timestamp:
25/05/06 17:32:11 (13 years ago)
Author:
pjkersha
Message:

Tests/SecurityClientTest?.py: added testAAgetTrustedHostInfoWithNoRoleSet to test with no role input

dist/NDG-Security-0.66.tar.gz: updated distro for testing

NDG/AttAuthorityIO.py: Extra fail safes in TrustedHostInfoResp? - check 'trustedHosts' key is present before referencings
it.

NDG/attAuthority_services_server.py: fix for where no role is set - input to AttAuthority?.getTrustHostInfo as None.

Location:
TI12-security/trunk/python
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/NDG/AttAuthorityIO.py

    r1018 r1021  
    352352         
    353353        rootElem = super(self.__class__, self).parseXML(rtnRootElem=True) 
     354         
     355        if 'trustedHosts' not in self: 
     356            # Some error occured on the server such that trustedHosts wasn't  
     357            # set 
     358            return 
     359         
    354360        self['trustedHosts'] = {} 
    355361         
  • TI12-security/trunk/python/NDG/attAuthority_services_server.py

    r930 r1021  
    6565                                     encrPriKeyFilePath=self.__srv['keyFile'], 
    6666                                     encrPriKeyPwd=self.__srv['keyPwd']) 
    67                     
    68             trustedHosts = self.__srv.getTrustedHostInfo(role=reqKeys['role']) 
     67            if 'role' in reqKeys: 
     68                role = reqKeys['role'] 
     69            else: 
     70                role = None 
     71                      
     72            trustedHosts = self.__srv.getTrustedHostInfo(role=role) 
    6973            trustedHostInfoResp = TrustedHostInfoResp(\ 
    7074                                                   trustedHosts=trustedHosts)                                          
  • TI12-security/trunk/python/Tests/SecurityClientTest.py

    r1018 r1021  
    192192            
    193193 
     194    def testAAgetTrustedHostInfoWithNoRoleSet(self): 
     195        """Call Attribute Authority GetTrustedHostInfo""" 
     196         
     197        import pdb 
     198        pdb.set_trace() 
     199        try: 
     200            trustedHosts = self.aaClnt.getTrustedHostInfo( 
     201                                       clntPriKeyPwd=self.__clntPriKeyPwd) 
     202            print trustedHosts 
     203             
     204        except Exception, e: 
     205            self.fail(str(e)) 
     206            
     207 
    194208    def testAAReqAuthorisation(self): 
    195209        """Call Attribute Authority authorisation request""" 
Note: See TracChangeset for help on using the changeset viewer.