#NEWLINE# def _openssl_config( protocol , local_project_root , remote_project_root , web_server_config ) : #NEWLINE# #INDENT# def _require_certificate_paths( protocol , local_project_root , remote_project_root , web_server_config ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# ssl_config = web_server_config . get ( 'ssl' , None ) #NEWLINE# if ( not ssl_config ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# lines = [ '  ssl on;' , '  ssl_certificate {};' . format ( ssl_config [ 'certificate_file' ] ) , '  ssl_certificate_key {};' . format ( ssl_config [ 'private_key_file' ] ) , '  ssl_session_timeout  30m;' ] #NEWLINE# if ( 'allowed_cas' in ssl_config ) : #NEWLINE# #INDENT# lines . append ( '  ssl_client_certificate {};' . format ( ssl_config [ 'allowed_cas' ] ) ) #NEWLINE# #UNINDENT# lines . append ( _require_certificate_paths ( protocol , remote_project_root , remote_project_root , web_server_config ) ) #NEWLINE# return '\n' . join ( lines )