#NEWLINE# def validate_tls( tls , **overrides ) : #NEWLINE# #INDENT# 'Given a dictionary that could be used as keyword arguments to\n    :class:`ssl.wrap_socket`, checks the existence of any certificate files.\n\n    :param tls: Dictionary of TLS settings as might be passed in to an |Edge|\n                constructor.\n    :type tls: dict\n    :param overrides: May be used to override any of the elements of the\n                      ``tls`` dictionary.\n    :type overrides: keyword arguments\n    :returns: The new, validated ``tls`` dictionary.\n    :raises: OSError\n\n    ' #NEWLINE# if ( not tls ) : #NEWLINE# #INDENT# return tls #NEWLINE# #UNINDENT# tls_copy = tls . copy ( ) #NEWLINE# for arg in ( 'keyfile' , 'certfile' , 'ca_certs' ) : #NEWLINE# #INDENT# if ( overrides in tls_copy ) : #NEWLINE# #INDENT# open ( tls_copy [ arg ] , 'r' ) . close ( ) #NEWLINE# #UNINDENT# #UNINDENT# tls_copy . update ( overrides ) #NEWLINE# return tls_copy