Changeset 6961


Ignore:
Timestamp:
10/06/10 09:11:26 (9 years ago)
Author:
pjkersha
Message:

Incomplete - task 5: MyProxy? Logon HTTPS Interface

  • updated test certificate
  • fixed CA cert dir cleanup for unit tests.
Location:
TI12-security/trunk/MyProxyWebService
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/MyProxyWebService

    • Property svn:ignore
      •  

        old new  
        22dist 
        33MyProxyWebService.egg-info 
         4temp 
  • TI12-security/trunk/MyProxyWebService/myproxy/server/test/localhost.crt

    r6892 r6961  
    1 Certificate: 
    2     Data: 
    3         Version: 3 (0x2) 
    4         Serial Number: 263 (0x107) 
    5         Signature Algorithm: md5WithRSAEncryption 
    6         Issuer: O=NDG, OU=BADC, CN=Test CA 
    7         Validity 
    8             Not Before: Jun  9 09:28:37 2009 GMT 
    9             Not After : Jun  9 09:28:37 2010 GMT 
    10         Subject: C=UK, ST=Oxfordshire, O=BADC, OU=Security, CN=localhost 
    11         Subject Public Key Info: 
    12             Public Key Algorithm: rsaEncryption 
    13             RSA Public Key: (2048 bit) 
    14                 Modulus (2048 bit): 
    15                     00:c0:e0:94:c2:e9:c0:df:96:36:ba:4d:0e:3f:bc: 
    16                     41:51:7b:4f:fe:d8:82:47:52:f8:36:57:35:15:3b: 
    17                     83:77:ba:84:aa:a3:48:f0:03:0b:5a:b7:31:40:8d: 
    18                     3f:87:05:9e:06:c6:72:1f:ca:7d:ed:73:3c:d0:76: 
    19                     4d:3b:32:89:e7:1f:5b:84:27:bf:8b:72:09:2a:d4: 
    20                     40:8d:2c:c4:c3:23:68:6c:f4:62:55:a8:e0:2e:8a: 
    21                     c8:b4:5f:bf:e1:18:d7:6a:a6:1a:90:6d:e6:83:17: 
    22                     10:3a:95:b5:da:0d:44:3f:df:fb:6c:c5:9e:bf:1d: 
    23                     04:5f:1c:16:ce:9e:f7:9d:81:f8:fe:ca:43:82:5f: 
    24                     6b:c8:70:17:f8:e8:f3:74:d9:fb:ac:14:af:99:8f: 
    25                     fd:f3:ad:e2:7e:8d:f3:bd:89:15:f0:39:ea:51:7c: 
    26                     29:81:8c:bc:ba:63:6b:69:e0:c1:46:2f:27:93:83: 
    27                     85:be:8b:bb:aa:b8:76:c3:ec:8a:f6:50:e1:c3:90: 
    28                     9e:47:1d:19:68:40:62:59:13:8b:eb:e8:89:64:20: 
    29                     ec:a3:b7:e7:b2:8f:98:f2:64:b4:aa:6e:d0:f1:73: 
    30                     fc:ea:ed:19:19:67:98:11:f5:95:ca:76:0b:c7:43: 
    31                     35:3c:53:23:b5:67:b0:b5:26:59:d1:c5:3e:4a:d1: 
    32                     70:dd 
    33                 Exponent: 65537 (0x10001) 
    34         X509v3 extensions: 
    35             Netscape Cert Type:  
    36                 SSL Client, SSL Server, S/MIME, Object Signing 
    37     Signature Algorithm: md5WithRSAEncryption 
    38         8b:8c:45:03:bb:90:4a:70:54:28:69:b7:02:3e:50:95:12:10: 
    39         ef:c7:d4:48:c2:56:be:7a:4d:0a:6e:28:9f:07:4d:71:8c:01: 
    40         fc:e0:e0:dd:6e:ef:5a:d7:b0:0c:df:14:be:af:e4:20:11:4c: 
    41         ca:9b:4b:ae:ce:4b:0f:1f:46:b0:57:74:e0:86:ff:94:b2:27: 
    42         0b:2a:7b:e9:09:d5:2b:72:14:fe:99:5c:66:12:87:31:2f:e0: 
    43         7b:5c:47:b5:52:09:bb:18:09:d8:0a:c2:95:8e:bf:23:e6:ac: 
    44         0d:ea:48:19:c8:11:e6:8f:da:10:d2:cd:a2:de:72:e7:b1:75: 
    45         c0:d8 
    461-----BEGIN CERTIFICATE----- 
    47 MIICmDCCAgGgAwIBAgICAQcwDQYJKoZIhvcNAQEEBQAwLzEMMAoGA1UEChMDTkRH 
    48 MQ0wCwYDVQQLEwRCQURDMRAwDgYDVQQDEwdUZXN0IENBMB4XDTA5MDYwOTA5Mjgz 
    49 N1oXDTEwMDYwOTA5MjgzN1owWTELMAkGA1UEBhMCVUsxFDASBgNVBAgTC094Zm9y 
    50 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JHUvg2VzUVO4N3uoSqo0jwAwtatzFA 
     7jT+HBZ4GxnIfyn3tczzQdk07MonnH1uEJ7+Lcgkq1ECNLMTDI2hs9GJVqOAuisi0 
     8X7/hGNdqphqQbeaDFxA6lbXaDUQ/3/tsxZ6/HQRfHBbOnvedgfj+ykOCX2vIcBf4 
     96PN02fusFK+Zj/3zreJ+jfO9iRXwOepRfCmBjLy6Y2tp4MFGLyeTg4W+i7uquHbD 
     107Ir2UOHDkJ5HHRloQGJZE4vr6IlkIOyjt+eyj5jyZLSqbtDxc/zq7RkZZ5gR9ZXK 
     11dgvHQzU8UyO1Z7C1JlnRxT5K0XDdAgMBAAGjFTATMBEGCWCGSAGG+EIBAQQEAwIE 
     128DANBgkqhkiG9w0BAQUFAAOBgQCPfUsOEPhwgMDfQnjg6ZgQfX1/VPnZ3Grcdv8g 
     13vwIQEzGCM8NlIy+6D84o4o5HNzLyNhME9Jb9ebczVzOHsuTmvI7L4nl3pjVdxfMX 
     148hAkokZwBxdk8vsMxEx1qDPIMwcXN55mpcie+X0SiG+O3F3Ag/fe/DHpPbH66uh3 
     15d0jkMQ== 
    6116-----END CERTIFICATE----- 
  • TI12-security/trunk/MyProxyWebService/myproxy/server/test/test_myproxywsgi_with_paster.py

    r6957 r6961  
    1212__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    1313__revision__ = '$Id$' 
    14 from os import path 
     14from os import path, listdir, remove 
    1515from getpass import getpass 
    1616from ConfigParser import SafeConfigParser, NoOptionError 
     
    3434    CA_DIR = path.join(THIS_DIR, CA_DIRNAME) 
    3535    CA_ENV_VARNAME = 'X509_CERT_DIR' 
     36     
     37    # CA files retrieved by the getTrustRoots unittest are cleared out  
     38    # afterwards by this classes' __del__' method but some CA file(s) need to be 
     39    # reserved to allow verification of the paster web service's SSL certificate 
     40    RESERVED_CA_DIR_FILENAMES = ('3d41aba9.0', ) 
     41     
    3642    INI_FILENAME = 'myproxywsgi.ini' 
    3743    INI_FILEPATH = path.join(THIS_DIR, INI_FILENAME)   
     
    170176 
    171177    def __del__(self): 
    172         """Stop any services started with the addService method""" 
     178        """Stop any services started with the addService method and clean up 
     179        the CA directory following the trust roots call 
     180        """ 
    173181        if hasattr(self, 'services'): 
    174182            for service in self.services: 
     
    178186        if hasattr(parentObj, '__del__'): 
    179187            parentObj.__del__() 
     188             
     189        for fileName in listdir(self.__class__.CA_DIR): 
     190            if (fileName not in self.__class__.RESERVED_CA_DIR_FILENAMES and 
     191                fileName[0] != '.'): 
     192                filePath = path.join(self.__class__.CA_DIR, fileName) 
     193                remove(filePath) 
     194                                 
    180195 
    181196if __name__ == "__main__": 
Note: See TracChangeset for help on using the changeset viewer.