From e3b77bf322b7560a319569f20c4c012d0d5fc637 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Thu, 1 Apr 2021 07:20:41 +0000 Subject: [PATCH] Ignore TLS issues AWS decided to push vhost buckets without solving a glaring issue: when a bucket name contains dots, it gets served with an invalid certificate... --- s3-bucket-list | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/s3-bucket-list b/s3-bucket-list index 7898dd3..c2ac623 100755 --- a/s3-bucket-list +++ b/s3-bucket-list @@ -3,6 +3,7 @@ import html import http.client import os import shlex +import ssl import sys import urllib.parse @@ -48,7 +49,7 @@ if '/' not in baseUrl.split('://', 1)[1] or not baseUrl.endswith('/'): hostname = baseUrl.split('://', 1)[1].split('/', 1)[0] -conn = http.client.HTTPSConnection(hostname) +conn = http.client.HTTPSConnection(hostname, context = ssl._create_unverified_context()) params = {} if startMarker is not None: params['marker'] = startMarker