diff --git a/README.md b/README.md index 50a833a..e59b0f9 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,11 @@ media_storage_providers: store_remote: True store_synchronous: True config: + 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. + 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. 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(