Ignore:
Timestamp:
08/06/06 13:32:29 (14 years ago)
Author:
pjkersha
Message:

NDG/AttAuthority.py: use new AttCert? class vars for mapped/original provenance flags

NDG/AttCert.py:

  • Fixed bug in setValidityTime - code to apply not before time offset was incorrectly indented so that it wasn't

applied.

  • Added class vars for mapped/original provenance flags
File:
1 edited

Legend:

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

    r1131 r1142  
    5252    # Provenance of certificate may be original or mapped from another 
    5353    # certificate 
    54     __provenance = ('original', 'mapped') 
     54    mappedProvenance = 'mapped' 
     55    origProvenance = 'original' 
     56    __provenance = (origProvenance, mappedProvenance) 
    5557 
    5658 
     
    359361    def isOriginal(self): 
    360362        """Check for original provenance.""" 
    361         return self.__dat['provenance'] == 'original' 
     363        return self.__dat['provenance'] == self.__class__.origProvenance 
    362364 
    363365 
    364366    def isMapped(self): 
    365367        """Check for mapped provenance.""" 
    366         return self.__dat['provenance'] == 'mapped' 
     368        return self.__dat['provenance'] == self.__class__.mappedProvenance 
    367369 
    368370 
     
    604606            self.__dtNotBefore = datetime.utcnow() 
    605607             
    606             if notBeforeOffset is not None: 
    607                 self.__dtNotBefore += timedelta(seconds=notBeforeOffset) 
     608        if notBeforeOffset is not None: 
     609            self.__dtNotBefore += timedelta(seconds=notBeforeOffset) 
    608610             
    609611 
Note: See TracChangeset for help on using the changeset viewer.