Ignore:
Timestamp:
05/08/09 15:22:32 (11 years ago)
Author:
pjkersha
Message:

NDG Security New Release

rc2 fixes bug in ndg.security.common.AttCert? due to change in M2Crypto 0.20 M2Crypto.X509.X509.get_serial_number() now returns a long type intead of int.

Location:
TI12-security/trunk/python/ndg.security.common
Files:
2 edited

Legend:

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

    r5436 r5564  
    371371        """Set holder's Distinguished Name string.""" 
    372372        if not isinstance(holder, basestring): 
    373             raise AttributeError, "holder DN must be a string" 
     373            raise TypeError("holder DN must be a string") 
    374374 
    375375        self.__dat['holder'] = holder 
     
    396396        """Set issuer's Distinguished Name.""" 
    397397        if not isinstance(issuer, basestring): 
    398             raise AttributeError, "issuer DN must be a string" 
     398            raise TypeError("issuer DN must be a string") 
    399399         
    400400        self.__dat['issuer'] = issuer 
     
    421421        """Set the name of the issuer""" 
    422422        if not isinstance(issuerName, basestring): 
    423             raise AttributeError, "issuerName must be a string" 
     423            raise TypeError("issuerName must be a string") 
    424424         
    425425        self.__dat['issuerName'] = issuerName 
     
    438438    def __setIssuerSerialNumber(self, serialNumber): 
    439439        """@param serialNumber: the issuer serial number""" 
    440         if not isinstance(serialNumber, int): 
    441             raise AttributeError, "issuerSerialNumber must be an integer" 
     440        if not isinstance(serialNumber, (int, long)): 
     441            raise TypeError("issuerSerialNumber must be an integer or a long") 
    442442 
    443443        self.__dat['issuerSerialNumber'] = serialNumber 
     
    460460        @param userId: user identifier""" 
    461461        if not isinstance(userId, basestring): 
    462             raise AttributeError, "userId must be a string" 
     462            raise TypeError("userId must be a string") 
    463463         
    464464        self.__dat['userId'] = userId 
  • TI12-security/trunk/python/ndg.security.common/setup.cfg

    r5465 r5564  
    1616 
    1717[egg_info] 
    18 tag_build = rc1 
     18tag_build = rc2 
    1919tag_svn_revision = true 
    2020 
Note: See TracChangeset for help on using the changeset viewer.