--- /dev/null
+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 <https://www.gnu.org/licenses/>.
# 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)