#NEWLINE# def _ssl_handshake( self ) : #NEWLINE# #INDENT# '\n            Perform an SSL handshake w/ the server.\n            Precondition: a successful STARTTLS exchange has\n                         taken place with Riak\n            returns True upon success, otherwise an exception is raised\n            ' #NEWLINE# if self . _client . _credentials : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ssl_ctx = configure_pyopenssl_context ( self . _client . _credentials ) #NEWLINE# ssl_socket = Connection ( e , self . _socket ) #NEWLINE# ssl_socket . set_connect_state ( ) #NEWLINE# ssl_socket . do_handshake ( ) #NEWLINE# self . _socket = ssl_socket #NEWLINE# self . _client . _credentials . _check_revoked_cert ( ssl_socket ) #NEWLINE# return True #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise SecurityError ( e )