Changeset 3175


Ignore:
Timestamp:
04/01/08 11:13:51 (12 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.

Location:
TI12-security/trunk/python/ndg.security.test
Files:
4 added
3 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'])): 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/attCertTest.cfg

    r2746 r3175  
    1010 
    1111[test9Sign] 
    12 certFile: ./cert.pem 
    13 keyFile: ./key.pem 
     12certFile: ./test.crt 
     13keyFile: ./test.key 
    1414filePath: ./ac-signed.xml 
    15 #keyPwd: 
     15keyPwd: 
    1616 
    1717[test10Write] 
     
    2222 
    2323[test12IsValid] 
    24 certFilePathList: ./cacert.pem 
     24certFilePathList: ./ndg-test-ca.crt 
    2525 
    2626[test13IsValidStressTest] 
    2727# First cert is added to the signature, both certs are used in the  
    2828# verification 
    29 certFilepathlist: ./cert.pem ./cacert.pem 
    30 keyFile: ./key.pem 
    31 #keyPwd: 
    32 nruns: 30 
     29certFilepathlist: ./test.crt ./ndg-test-ca.crt 
     30keyFile: ./test.key 
     31keyPwd: 
     32nruns: 10 
    3333 
    3434[test14IsValidSignature] 
    35 certFilePathList: ./cacert.pem 
     35certFilePathList: ./ndg-test-ca.crt 
    3636filePath: ./ac.xml 
    3737 
  • TI12-security/trunk/python/ndg.security.test/setup.py

    r3166 r3175  
    3131                                       'siteB-aa.crt' 
    3232                                       'siteB-aa.key'], 
    33     'ndg.security.test.AttAuthority.ca': ['*.crt'], 
    34     'ndg.security.test.AttCert': ['*.cfg'], 
     33    'ndg.security.test.attAuthority.ca': ['*.crt'], 
     34    'ndg.security.test.attCert': ['*.xml', 
     35                                  '*.cfg', 
     36                                  'test.crt', 
     37                                  'test.key', 
     38                                  'ndg-test-ca.crt'], 
    3539    'ndg.security.test.ca': ['*.xml', '*.cfg'], 
    36     'ndg.security.test.MyProxy': ['*.xml', '*.cfg', 'Makefile'], 
     40    'ndg.security.test.myProxy': ['*.xml', '*.cfg', 'Makefile'], 
    3741    'ndg.security.test.sessionMgr': ['*.xml', '*.cfg', '*.sh'], 
    3842    'ndg.security.test.sessionMgr.ca': ['*.crt'], 
Note: See TracChangeset for help on using the changeset viewer.