Changeset 2092 for TI12-security


Ignore:
Timestamp:
01/02/07 14:01:56 (13 years ago)
Author:
pjkersha
Message:

python/ndg.security.test/ndg/security/test/SessionMgr/SessionMgrClientTest.py:
uncommented disconnect call arguments

python/ndg.security.common/ndg/security/common/wsSecurity.py:
Added 'ec' into prefix list for exclusive canonicalization of the SignedInfo? section. This
fixes bug with signature for test3ProxyCertConnect test. TODO: fix test4CookieDisconnect
'block type is not 01' verify error.

Location:
TI12-security/trunk/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/wsSecurity.py

    r2085 r2092  
    353353         
    354354        # Signed Info - Canonicalization method 
     355        # 
     356        # Added 'ec' to list P J Kershaw 01/02/07 
    355357        signedInfoC14nKw = {} 
    356         signedInfoC14nKw['unsuppressedPrefixes'] = ['xsi', 'xsd', 'SOAP-ENV', 'ds', 'wsse'] 
     358        signedInfoC14nKw['unsuppressedPrefixes'] = \ 
     359            ['xsi', 'xsd', 'SOAP-ENV', 'ds', 'wsse', 'ec'] 
    357360        c14nMethodElem = signedInfoElem.createAppendElement(DSIG.BASE, 
    358361                                                    'CanonicalizationMethod') 
     
    653656            # which case the verifying cert will need to have been set  
    654657            # elsewhere 
     658            binSecTokNode = None 
    655659            pass  
    656660         
    657661         
    658         try: 
    659             b64EncX509Cert = self.__class__.__beginCert + \ 
     662        if binSecTokNode: 
     663            try: 
     664                b64EncX509Cert = self.__class__.__beginCert + \ 
    660665                         str(binSecTokNode.childNodes[0]._get_nodeValue()) + \ 
    661666                         self.__class__.__endCert 
    662                           
    663             self.__setVerifyingCert(b64EncX509Cert) 
    664         except Exception, e: 
    665             raise VerifyError, "Error extracting BinarySecurityToken from " +\ 
    666                                 "WSSE header: " + str(e) 
     667                              
     668                self.__setVerifyingCert(b64EncX509Cert) 
     669            except Exception, e: 
     670                raise VerifyError, "Error extracting BinarySecurityToken " + \ 
     671                                   "from WSSE header: " + str(e) 
    667672         
    668673        if self.__verifyingCert is None: 
     
    670675                "of the signature" 
    671676         
    672          
     677        import pdb;pdb.set_trace() 
    673678        # Extract RSA public key from the cert 
    674679        rsaPubKey = self.__verifyingCert.m2CryptoX509.get_pubkey().get_rsa() 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/SessionMgr/SessionMgrClientTest.py

    r2086 r2092  
    125125        self.clnt.signatureHandler.signingCertPriKey = self.proxyPriKey 
    126126         
    127         self.clnt.disconnect(#userCert=self.userCert, 
    128                              #sessCookie=str(self.sessCookie) 
    129                              #sessID="A", 
    130                              #encrSessionMgrURI="B" 
    131                              ) 
     127        self.clnt.disconnect(userCert=self.userCert, 
     128                             sessCookie=str(self.sessCookie)) 
    132129         
    133130        print "User disconnected from Session Manager:\n%s" % self.sessCookie 
Note: See TracChangeset for help on using the changeset viewer.