diff --git a/botocoreclient.py b/botocoreclient.py index 3415dc6..d575955 100644 --- a/botocoreclient.py +++ b/botocoreclient.py @@ -14,6 +14,7 @@ # under the License. import botocore.session +from oslo_config import types def _get_client(client_name, url, region, access, secret, ca_bundle): @@ -29,9 +30,10 @@ def _get_client(client_name, url, region, access, secret, ca_bundle): 'aws_secret_access_key': secret } if ca_bundle: - kwargs['verify'] = ca_bundle - else: - kwargs['verify'] = False + try: + kwargs['verify'] = types.Boolean()(ca_bundle) + except Exception: + kwargs['verify'] = ca_bundle return session.create_client(client_name, **kwargs) diff --git a/config_opts.py b/config_opts.py index 5ea4522..c852572 100644 --- a/config_opts.py +++ b/config_opts.py @@ -28,7 +28,7 @@ AWSGroup = [ cfg.StrOpt('ca_bundle', default=None, help="The CA certificate bundle to use when verifying " - "SSL certificates."), + "SSL certificates. Or True/False to pass to botocore."), cfg.StrOpt('aws_secret', default=None, help="AWS Secret Key",