Ignore:
Timestamp:
15/03/07 18:25:46 (13 years ago)
Author:
pjkersha
Message:

ndg.security.server/setup.py: added share/ files

ndg.security.test/setup.py: added test xml and config files

ndg.security.test/ndg/security/test/AttAuthority/AttAuthorityClientTest.py: added option to input private key
password from the command line.

ndg.security.test/ndg/security/test/AttAuthority/attAuthorityClientTest.cfg: alter uri for tests.

Location:
TI12-security/trunk/python/ndg.security.test/ndg/security/test/AttAuthority
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/AttAuthority/AttAuthorityClientTest.py

    r2270 r2287  
    2323 
    2424class AttAuthorityClientTestCase(unittest.TestCase): 
     25    userPriKeyPwd = None 
    2526     
    2627    def setUp(self): 
     
    3435 
    3536        tracefile = sys.stderr 
     37 
     38        if self.userPriKeyPwd is None: 
     39            try: 
     40                if self.cfg['setUp'].get('userprikeypwd') is None: 
     41                    self.userPriKeyPwd = getpass.getpass(\ 
     42                            prompt="\nsetUp - client private key password: ") 
     43                else: 
     44                    self.userPriKeyPwd=self.cfg['setUp'].get('clntprikeypwd') 
     45            except KeyboardInterrupt: 
     46                sys.exit(0) 
    3647 
    3748        # Instantiate WS proxy 
     
    3950               signingCertFilePath=self.cfg['setUp']['usercertfilepath'], 
    4051               signingPriKeyFilePath=self.cfg['setUp']['userprikeyfilepath'], 
     52               signingPriKeyPwd=self.userPriKeyPwd, 
    4153               tracefile=sys.stderr) 
    4254             
     
    150162            raise "Error reading attribute certificate file \"%s\": %s" %\ 
    151163                                    (ioErr.filename, ioErr.strerror) 
    152          
     164 
     165        try: 
     166            if self.cfg['test7GetMappedAttCert'].get('userprikeypwd') is None: 
     167                userPriKeyPwd = getpass.getpass(\ 
     168                            prompt="\nsetUp - client private key password: ") 
     169            else: 
     170                userPriKeyPwd = self.cfg['setUp'].get('userprikeypwd') 
     171        except KeyboardInterrupt: 
     172            sys.exit(0) 
     173        
    153174        # Make client to site B Attribute Authority     
    154175        clnt = AttAuthorityClient( 
     
    156177signingCertFilePath=self.cfg['test7GetMappedAttCert']['usercertfilepath'], 
    157178signingPriKeyFilePath=self.cfg['test7GetMappedAttCert']['userprikeyfilepath'], 
     179signingPriKeyPwd=userPriKeyPwd, 
    158180tracefile=sys.stderr) 
    159181     
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/AttAuthority/attAuthorityClientTest.cfg

    r2251 r2287  
    1111# setting for test6GetMappedAttCert 
    1212#uri = http://localhost:5000/AttributeAuthority 
    13 uri = https://localhost:5000/AttributeAuthority 
     13#uri = https://localhost:5000/AttributeAuthority 
     14uri = http://glue.badc.rl.ac.uk/DEWS/Portal/AttributeAuthority 
    1415 
    1516# X.509 certificate for Attribute Authority - to verify the signature of 
Note: See TracChangeset for help on using the changeset viewer.