Ignore:
Timestamp:
17/12/08 11:12:08 (12 years ago)
Author:
pjkersha
Message:

#941: added classifiers to MyProxyClient setup

File:
1 edited

Legend:

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

    r4654 r4671  
    415415 
    416416    @classmethod 
    417     def Read(cls, filePath, **isValidTimeKw): 
     417    def Read(cls, filePath, warningStackLevel=4, **isValidTimeKw): 
    418418        """Create a new X509 certificate read in from a file""" 
    419419     
    420420        x509Cert = cls(filePath=filePath) 
    421421         
    422         if 'warningStackLevel' not in isValidTimeKw: 
    423             isValidTimeKw['warningStackLevel'] = 4 
    424              
    425         x509Cert.read(**isValidTimeKw) 
     422        x509Cert.read(warningStackLevel=warningStackLevel, **isValidTimeKw) 
    426423         
    427424        return x509Cert 
    428425     
    429426    @classmethod 
    430     def Parse(cls, x509CertTxt, **isValidTimeKw): 
     427    def Parse(cls, x509CertTxt, warningStackLevel=4, **isValidTimeKw): 
    431428        """Create a new X509 certificate from string of file content""" 
    432429     
    433430        x509Cert = cls() 
    434431         
    435         if 'warningStackLevel' not in isValidTimeKw: 
    436             isValidTimeKw['warningStackLevel'] = 4 
    437              
    438         x509Cert.parse(x509CertTxt, **isValidTimeKw) 
     432        x509Cert.parse(x509CertTxt,  
     433                       warningStackLevel=warningStackLevel, 
     434                       **isValidTimeKw) 
    439435         
    440436        return x509Cert 
    441437         
    442438# Alternative AttCert constructors 
    443 def X509CertRead(filePath, **isValidTimeKw): 
     439def X509CertRead(filePath, warningStackLevel=4, **isValidTimeKw): 
    444440    """Create a new X509 certificate read in from a file""" 
    445441 
    446     x509Cert = X509Cert(filePath=filePath) 
    447      
    448     if 'warningStackLevel' not in isValidTimeKw: 
    449         isValidTimeKw['warningStackLevel'] = 4 
    450          
    451     x509Cert.read(**isValidTimeKw) 
     442    x509Cert = X509Cert(filePath=filePath)     
     443    x509Cert.read(warningStackLevel=warningStackLevel, **isValidTimeKw) 
    452444     
    453445    return x509Cert 
    454446 
    455 def X509CertParse(x509CertTxt, **isValidTimeKw): 
     447def X509CertParse(x509CertTxt, warningStackLevel=4, **isValidTimeKw): 
    456448    """Create a new X509 certificate from string of file content""" 
    457449 
    458450    x509Cert = X509Cert() 
    459     if 'warningStackLevel' not in isValidTimeKw: 
    460         isValidTimeKw['warningStackLevel'] = 4 
    461              
    462     x509Cert.parse(x509CertTxt, **isValidTimeKw) 
     451    x509Cert.parse(x509CertTxt,  
     452                   warningStackLevel=warningStackLevel,  
     453                   **isValidTimeKw) 
    463454     
    464455    return x509Cert 
Note: See TracChangeset for help on using the changeset viewer.