#NEWLINE# def copy_certs_and_keys( self , cert_path , key_path , chain_path = None ) : #NEWLINE# #INDENT# 'Copies certs and keys into the temporary directory' #NEWLINE# cert_and_key_dir = os . path . join ( self . _temp_dir , 'certs_and_keys' ) #NEWLINE# if ( not os . path . isdir ( cert_and_key_dir ) ) : #NEWLINE# #INDENT# os . mkdir ( cert_and_key_dir ) #NEWLINE# #UNINDENT# cert = os . path . join ( cert_and_key_dir , 'cert' ) #NEWLINE# shutil . copy ( cert_path , cert ) #NEWLINE# key = os . path . join ( cert_and_key_dir , 'key' ) #NEWLINE# shutil . copy ( key_path , key ) #NEWLINE# if chain_path : #NEWLINE# #INDENT# chain = os . path . join ( cert_and_key_dir , 'chain' ) #NEWLINE# shutil . copy ( chain_path , chain ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# chain = None #NEWLINE# #UNINDENT# return ( cert , cert_and_key_dir , chain )