<s> """<STR_LIT>""" <EOL> from src . TestGroups import * <EOL> class TestFunctionality : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , fqdn , info ) : <EOL> self . fqdn = fqdn <EOL> self . info = copy . copy ( info ) <EOL> self . info . metadata = None <EOL> self . sizes = FUNC_KEY_SIZES <EOL> self . types = FUNC_KEY_TYPES <EOL> self . hashes = FUNC_HASH_TYPES <EOL> self . suites = FUNC_CIPHER_SUITES <EOL> self . versions = FUNC_SSL_VERSIONS <EOL> self . cases = [ ] <EOL> """<STR_LIT>""" <EOL> def build ( self ) : <EOL> metadata = TestMetadata ( "<STR_LIT>" , "<STR_LIT>" , None , None , False , True , <EOL> functional = True ) <EOL> for ktype in self . types : <EOL> for size in self . sizes : <EOL> mdata = copy . copy ( metadata ) <EOL> mdata . name = self . getKeyName ( ktype , size ) <EOL> mdata . suite = "<STR_LIT>" <EOL> case = TestCase ( self . fqdn , mdata , self . info ) <EOL> case . getServCert ( ) . security . certKey = CertKey ( None , kSize = size , <EOL> kType = ktype ) <EOL> self . cases . append ( case ) <EOL> for version in self . versions : <EOL> for suite in self . suites : <EOL> mdata = copy . copy ( metadata ) <EOL> mdata . name = self . getSuiteName ( version , suite ) <EOL> mdata . sslVer = version <EOL> mdata . suite = suite <EOL> case = TestCase ( self . fqdn , mdata , self . info ) <EOL> self . cases . append ( case ) <EOL> for version in self . versions : <EOL> for digest in self . hashes : <EOL> mdata = copy . copy ( metadata ) <EOL> mdata . name = self . getHashName ( version , digest ) <EOL> mdata . sslVer = version <EOL> mdata . suite = "<STR_LIT>" <EOL> case = TestCase ( self . fqdn , mdata , self . info ) <EOL> case . getServCert ( ) . security . digest = digest <EOL> self . cases . append ( case ) <EOL> return self <EOL> def getKeyName ( self , ktype , size ) : <EOL> name = "<STR_LIT>" <EOL> if ( ktype == crypto . TYPE_RSA ) : <EOL> name += "<STR_LIT>" <EOL> elif ( ktype == crypto . TYPE_DSA ) : <EOL> name += "<STR_LIT>" <EOL> else : <EOL> forcedExit ( "<STR_LIT>" , self . info . log ) <EOL> name += "<STR_LIT:_>" + str ( size ) <EOL> return name <EOL> def getHashName ( self , version , digest ) : <EOL> return self . getVersionName ( version ) + '<STR_LIT:_>' + digest <EOL> def getSuiteName ( self , version , suite ) : <EOL> return self . getVersionName ( version ) + '<STR_LIT:_>' + suite <EOL> def getVersionName ( self , sver ) : <EOL> ver = None <EOL> if ( sver == SSL . SSLv23_METHOD ) : <EOL> ver = "<STR_LIT>" <EOL> elif ( sver == SSL . SSLv2_METHOD ) : <EOL> ver = "<STR_LIT>" <EOL> elif ( sver == SSL . SSLv3_METHOD ) : <EOL> ver = "<STR_LIT>" <EOL> elif ( sver == SSL . TLSv1_METHOD ) : <EOL> ver = "<STR_LIT>" <EOL> elif ( sver == SSL . TLSv1_1_METHOD ) : <EOL> ver = "<STR_LIT>" <EOL> elif ( sver == SSL . TLSv1_2_METHOD ) : <EOL> ver = "<STR_LIT>" <EOL> else : <EOL> forcedExit ( "<STR_LIT>" , self . info . log ) <EOL> return ver <EOL> def getAllNames ( self , tbl , exclude ) : <EOL> for ktype in self . types : <EOL> for size in self . sizes : <EOL> name = self . getKeyName ( ktype , size ) <EOL> if ( name not in exclude ) : <EOL> tbl [ name ] = name <EOL> for version in self . versions : <EOL> for suite in self . suites : <EOL> name = self . getSuiteName ( version , suite ) <EOL> if ( name not in exclude ) : <EOL> tbl [ name ] = name <EOL> for version in self . versions : <EOL> for digest in self . hashes : <EOL> name = self . getHashName ( version , digest ) <EOL> if ( name not in exclude ) : <EOL> tbl [ name ] = name <EOL> return tbl <EOL> """<STR_LIT>""" <EOL> def getTestCases ( self ) : <EOL> return self . cases </s>
