Changeset 7056 for TI12-security/trunk


Ignore:
Timestamp:
23/06/10 09:31:10 (9 years ago)
Author:
pjkersha
Message:

Incomplete - task 5: MyProxy? Web Service Interface

  • Added additional test for error on logon response from server. This new test tests for certificate generation failure following authentication.
Location:
TI12-security/trunk/MyProxyClient
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/MyProxyClient

    • Property svn:ignore
      •  

        old new  
        22dist 
        33MyProxyClient.egg-info 
         4temp 
  • TI12-security/trunk/MyProxyClient/myproxy/client.py

    r6981 r7056  
    804804        # get response value 
    805805        respCode = [int(v) for k, v in fields if k == 'RESPONSE'][0] 
    806  
     806         
    807807        # get error text 
    808808        errorTxt = os.linesep.join([v for k, v in fields if k == 'ERROR']) 
     
    13711371        # - n certs 
    13721372        dat = conn.recv(MyProxyClient.SERVER_RESP_BLK_SIZE) 
     1373 
     1374        # Check for error generating certificate 
     1375        try: 
     1376            respCode, errorTxt = self._deserializeResponse(dat) 
     1377            if respCode: 
     1378                raise MyProxyClientGetError(errorTxt) 
     1379             
     1380        except ValueError: 
     1381            # If all is well, no error response will have been set so an attempt 
     1382            # to parse an error code will fail 
     1383            pass 
    13731384     
    13741385        # process server response 
Note: See TracChangeset for help on using the changeset viewer.