From 51d3c6ba994dee9bad18888ecb67ded9a36d31b3 Mon Sep 17 00:00:00 2001 From: AlekseyIvanov199 Date: Thu, 10 Aug 2023 09:10:05 +0300 Subject: [PATCH 1/4] Update README.md appended expalanation verify parm Signed-off-by: AlekseyIvanov199 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 50a833a..7a567d0 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,12 @@ media_storage_providers: store_remote: True store_synchronous: True config: + verify: + #verify (boolean/string) + #Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values: + #False - do not validate SSL certificates. SSL will still be used (unless use_ssl is False), but SSL certificates will not be verified. + #path/to/cert/bundle.pem - A filename of the CA cert bundle to uses. You can specify this argument if you want to use a different CA cert bundle than the one used by botocore. + bucket: # All of the below options are optional, for use with non-AWS S3-like # services, or to specify access tokens here instead of some external method. From 926866704a4866dafa9b86eed35f063521d3ea22 Mon Sep 17 00:00:00 2001 From: AlekseyIvanov199 Date: Thu, 10 Aug 2023 09:11:09 +0300 Subject: [PATCH 2/4] Update README.md Signed-off-by: AlekseyIvanov199 --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a567d0..47f8d1b 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ media_storage_providers: store_remote: True store_synchronous: True config: - verify: - #verify (boolean/string) + verify #Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values: #False - do not validate SSL certificates. SSL will still be used (unless use_ssl is False), but SSL certificates will not be verified. #path/to/cert/bundle.pem - A filename of the CA cert bundle to uses. You can specify this argument if you want to use a different CA cert bundle than the one used by botocore. From e9b0be835a84d15ff00a70a46941500c9102c07a Mon Sep 17 00:00:00 2001 From: AlekseyIvanov199 Date: Thu, 10 Aug 2023 09:22:28 +0300 Subject: [PATCH 3/4] Update README.md Signed-off-by: AlekseyIvanov199 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 47f8d1b..e59b0f9 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ media_storage_providers: store_remote: True store_synchronous: True config: - verify + verify: #Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values: #False - do not validate SSL certificates. SSL will still be used (unless use_ssl is False), but SSL certificates will not be verified. #path/to/cert/bundle.pem - A filename of the CA cert bundle to uses. You can specify this argument if you want to use a different CA cert bundle than the one used by botocore. From ddb2bdd4e8215d6241b1546df27ebcb13258c9f2 Mon Sep 17 00:00:00 2001 From: AlekseyIvanov199 Date: Thu, 10 Aug 2023 09:28:12 +0300 Subject: [PATCH 4/4] Update s3_storage_provider.py Signed-off-by: AlekseyIvanov199 --- s3_storage_provider.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/s3_storage_provider.py b/s3_storage_provider.py index 8047925..c7089be 100644 --- a/s3_storage_provider.py +++ b/s3_storage_provider.py @@ -79,6 +79,9 @@ def __init__(self, hs, config): if "secret_access_key" in config: self.api_kwargs["aws_secret_access_key"] = config["secret_access_key"] + + if "verify" in config: + self.api_kwargs["verify"]=config["verify"] self._s3_client = None self._s3_client_lock = threading.Lock() @@ -179,6 +182,9 @@ def parse_config(config): if "secret_access_key" in config: result["secret_access_key"] = config["secret_access_key"] + if "verify" in config: + result["verify"]=config["verify"] + if "sse_customer_key" in config: result["extra_args"]["SSECustomerKey"] = config["sse_customer_key"] result["extra_args"]["SSECustomerAlgorithm"] = config.get(