Ignore:
Timestamp:
04/01/08 11:13:51 (13 years ago)
Author:
pjkersha
Message:

security/python/ndg.security.test/ndg/security/test/ndg-test-ca.crt,
security/python/ndg.security.test/ndg/security/test/test.crt,
security/python/ndg.security.test/ndg/security/test/test.key,
security/python/ndg.security.test/ndg/security/test/attCertTest.cfg: added certs from test CA.
security/python/ndg.security.test/ndg/security/test/AttCertTest.py: modified tests 9 and 13 for correct handling of no password set.
security/python/ndg.security.test/setup.py: corrret inclusion of test certs in egg.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/AttCertTest.py

    r2909 r3175  
    176176        self.attCert.signingKeyFilePath=self.cfg['test9Sign']['keyfile'] 
    177177         
    178         try: 
    179             self.attCert.signingKeyPwd=self.cfg['test9Sign'].get('keypwd') or\ 
    180             getpass.getpass(prompt="\ntest9Sign private key password: ") 
    181         except KeyboardInterrupt: 
    182             self.fail("test9Sign: Aborting test") 
    183             return 
    184          
     178        signingKeyPwd = self.cfg['test9Sign'].get('keypwd') 
     179        if signingKeyPwd is None: 
     180            try: 
     181                self.attCert.signingKeyPwd = \ 
     182                getpass.getpass(prompt="\ntest9Sign private key password: ") 
     183            except KeyboardInterrupt: 
     184                self.fail("test9Sign: Aborting test") 
     185                return 
     186        else: 
     187            self.attCert.signingKeyPwd = signingKeyPwd 
     188             
    185189        self.attCert.applyEnvelopedSignature() 
    186190        print 'test9Sign: \n\n%s' % self.attCert 
     
    223227                            self.cfg['test13IsValidStressTest']['keyfile'] 
    224228         
    225         try: 
    226             self.attCert.signingKeyPwd = \ 
    227                         self.cfg['test13IsValidStressTest'].get('keypwd') or \ 
    228                         getpass.getpass(\ 
     229        signingKeyPwd = self.cfg['test13IsValidStressTest'].get('keypwd') 
     230        if signingKeyPwd is None: 
     231            try: 
     232                self.attCert.signingKeyPwd = getpass.getpass(\ 
    229233                    prompt="\ntest13IsValidStressTest private key password: ") 
    230         except KeyboardInterrupt: 
    231             self.fail("test13IsValidStressTest: Aborting test") 
    232             return 
    233  
     234            except KeyboardInterrupt: 
     235                self.fail("test13IsValidStressTest: Aborting test") 
     236                return 
     237        else: 
     238            self.attCert.signingKeyPwd = signingKeyPwd 
     239             
    234240        import base64 
    235241        for i in range(0, int(self.cfg['test13IsValidStressTest']['nruns'])): 
Note: See TracChangeset for help on using the changeset viewer.