<s> """<STR_LIT>""" <EOL> from src . Test import * <EOL> class TestCaseImmed ( TestCase ) : <EOL> pass <EOL> class TestCaseChained ( TestCase ) : <EOL> def __init__ ( self , fqdn , metadata , info , depth = DEFAULT_NUM_CHAINED ) : <EOL> self . newTestCaseChained ( fqdn , metadata , info , depth ) <EOL> def newTestCaseChained ( self , fqdn , metadata , info , depth ) : <EOL> super ( TestCaseChained , self ) . __init__ ( fqdn , metadata , info , depth ) <EOL> return self <EOL> class TestCaseWildcard ( TestCase ) : <EOL> pass <EOL> class TestCaseAltName ( TestCase ) : <EOL> def __init__ ( self , fqdn , metadata , info ) : <EOL> self . newTestCaseAltName ( fqdn , metadata , info ) <EOL> def newTestCaseAltName ( self , fqdn , metadata , info ) : <EOL> super ( TestCaseAltName , self ) . __init__ ( fqdn , metadata , info ) <EOL> self . includeAltName ( ) <EOL> self . getServCert ( ) . subject . commonName = getInvalidDomain ( fqdn ) <EOL> return self <EOL> class TestCaseNameConstraint ( TestCaseChained ) : <EOL> def __init__ ( self , fqdn , metadata , info ) : <EOL> self . newTestCaseNameConstraint ( fqdn , metadata , info ) <EOL> def newTestCaseNameConstraint ( self , fqdn , metadata , info ) : <EOL> super ( TestCaseNameConstraint , self ) . __init__ ( fqdn , metadata , info ) <EOL> self . includeAltName ( critical = False ) <EOL> self . appendPermit ( self . getFirstCA ( ) , getIntCADomain ( ) ) <EOL> return self <EOL> def appendConstraint ( self , cert , ln , k ) : <EOL> ext = cert . getExtension ( NameConstraints ) <EOL> ext = ext if ext else cert . addExtension ( NameConstraints ( ) ) <EOL> ext . field [ k ] . append ( ln ) <EOL> def appendPermit ( self , cert , ln ) : <EOL> self . appendConstraint ( cert , ln , '<STR_LIT>' ) <EOL> def appendExclude ( self , cert , ln ) : <EOL> self . appendConstraint ( cert , ln , '<STR_LIT>' ) </s>
