From: Michael Orlitzky Date: Mon, 6 May 2024 18:56:07 +0000 (-0400) Subject: doc/COPYING: add one to state the "or later" bit X-Git-Url: http://gitweb.michael.orlitzky.com/?p=untangle-https-backup.git;a=commitdiff_plain;h=HEAD;hp=a55c225b9dd34e4c28c3e379c701ac8b6887d20f;ds=sidebyside doc/COPYING: add one to state the "or later" bit --- diff --git a/doc/COPYING b/doc/COPYING new file mode 100644 index 0000000..2d86c7c --- /dev/null +++ b/doc/COPYING @@ -0,0 +1,15 @@ +untangle-https-backup: make untangle backups using the web UI +Copyright (C) 2024 Michael Orlitzky + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . diff --git a/src/untangle/untangle.py b/src/untangle/untangle.py index 570e896..8ce4fb7 100644 --- a/src/untangle/untangle.py +++ b/src/untangle/untangle.py @@ -68,10 +68,10 @@ class Untangle: # SSL mumbo jumbo to make it ignore the certificate's hostname # when verify_cert = False. - if self.verify_cert: - ssl_ctx = ssl.create_default_context() - else: - ssl_ctx = ssl._create_unverified_context() + ssl_ctx = ssl.create_default_context() + if not self.verify_cert: + ssl_ctx.check_hostname = False + ssl_ctx.verify_mode = ssl.CERT_NONE https_handler = urllib.request.HTTPSHandler(context=ssl_ctx)