Mercurial > libervia-backend
comparison sat/plugins/plugin_misc_attach.py @ 3192:883fb4981958
plugin attach: disable TLS check if "check_certificate" is disabled
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 28 Feb 2020 10:06:23 +0100 |
parents | f2bb57348587 |
children | 2e892f9f54f6 |
comparison
equal
deleted
inserted
replaced
3191:7255286a298a | 3192:883fb4981958 |
---|---|
76 | 76 |
77 options = {} | 77 options = {} |
78 progress_id = attachment.get("progress_id") | 78 progress_id = attachment.get("progress_id") |
79 if progress_id: | 79 if progress_id: |
80 options["progress_id"] = attachment["progress_id"] | 80 options["progress_id"] = attachment["progress_id"] |
81 check_certificate = self.host.memory.getParamA( | |
82 "check_certificate", "Connection", profile_key=client.profile) | |
83 if not check_certificate: | |
84 options['ignore_tls_errors'] = True | |
85 log.warning( | |
86 _("certificate check disabled for upload, this is dangerous!")) | |
81 if client.encryption.isEncryptionRequested(data): | 87 if client.encryption.isEncryptionRequested(data): |
82 # FIXME: we should not use implementation specific value here | 88 # FIXME: we should not use implementation specific value here |
83 # but for not it's the only file encryption method available with | 89 # but for now it's the only file encryption method available with |
84 # with upload. | 90 # with upload. |
85 options['encryption'] = C.ENC_AES_GCM | 91 options['encryption'] = C.ENC_AES_GCM |
86 | 92 |
87 __, upload_d = await self._u.upload( | 93 __, upload_d = await self._u.upload( |
88 client, | 94 client, |