<s> """<STR_LIT>""" <EOL> from smtplib import SMTP <EOL> from tlslite . tlsconnection import TLSConnection <EOL> from tlslite . integration . clienthelper import ClientHelper <EOL> class SMTP_TLS ( SMTP ) : <EOL> """<STR_LIT>""" <EOL> def starttls ( self , <EOL> username = None , password = None , <EOL> certChain = None , privateKey = None , <EOL> checker = None , <EOL> settings = None ) : <EOL> """<STR_LIT>""" <EOL> ( resp , reply ) = self . docmd ( "<STR_LIT>" ) <EOL> if resp == <NUM_LIT> : <EOL> helper = ClientHelper ( <EOL> username , password , <EOL> certChain , privateKey , <EOL> checker , <EOL> settings ) <EOL> conn = TLSConnection ( self . sock ) <EOL> helper . _handshake ( conn ) <EOL> self . sock = conn <EOL> self . file = conn . makefile ( '<STR_LIT:rb>' ) <EOL> return ( resp , reply ) </s>
