comparison cagou/plugins/plugin_wid_chat.py @ 334:36d6763af547

chat: encrypt uploaded file if the session is encrypted
author Goffi <goffi@goffi.org>
date Fri, 20 Dec 2019 12:29:37 +0100
parents 69d2a96ce26f
children d4883f9576db
comparison
equal deleted inserted replaced
333:69d2a96ce26f 334:36d6763af547
690 def transferFile(self, file_path, transfer_type=C.TRANSFER_UPLOAD, cleaning_cb=None): 690 def transferFile(self, file_path, transfer_type=C.TRANSFER_UPLOAD, cleaning_cb=None):
691 if transfer_type == C.TRANSFER_UPLOAD: 691 if transfer_type == C.TRANSFER_UPLOAD:
692 options = { 692 options = {
693 "ignore_tls_errors": not G.host.tls_validation, 693 "ignore_tls_errors": not G.host.tls_validation,
694 } 694 }
695 if self.encrypted:
696 options['encryption'] = C.ENC_AES_GCM
695 G.host.bridge.fileUpload( 697 G.host.bridge.fileUpload(
696 str(file_path), 698 str(file_path),
697 "", 699 "",
698 "", 700 "",
699 data_format.serialise(options), 701 data_format.serialise(options),