Skip to content

Commit

Permalink
S3Boto3: Add AWS_S3_VERIFY
Browse files Browse the repository at this point in the history
  • Loading branch information
Smosker authored and jschneier committed Sep 2, 2018
1 parent 6ee6a73 commit 98714f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/backends/amazon-S3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ Available are numerous settings. It should be especially noted the following:
``AWS_S3_USE_SSL`` (optional: default is ``True``)
Whether or not to use SSL when connecting to S3.

``AWS_S3_VERIFY`` (optional: default is ``None`` - boto3 only)
Whether or not to verify the connection to S3. Can be set to False to not verify certificates or a path to a CA cert bundle.

``AWS_S3_ENDPOINT_URL`` (optional: default is ``None``)
Custom S3 URL to use when connecting to S3, including scheme. Overrides ``AWS_S3_REGION_NAME`` and ``AWS_S3_USE_SSL``.

Expand Down
4 changes: 3 additions & 1 deletion storages/backends/s3boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ class S3Boto3Storage(Storage):
endpoint_url = setting('AWS_S3_ENDPOINT_URL')
region_name = setting('AWS_S3_REGION_NAME')
use_ssl = setting('AWS_S3_USE_SSL', True)
verify = setting('AWS_S3_VERIFY', None)
max_memory_size = setting('AWS_S3_MAX_MEMORY_SIZE', 0)

def __init__(self, acl=None, bucket=None, **settings):
Expand Down Expand Up @@ -306,7 +307,8 @@ def connection(self):
region_name=self.region_name,
use_ssl=self.use_ssl,
endpoint_url=self.endpoint_url,
config=self.config
config=self.config,
verify=self.verify,
)
return self._connections.connection

Expand Down

0 comments on commit 98714f4

Please sign in to comment.