From 450f505c35f8762cca29d56b6e928490288ec166 Mon Sep 17 00:00:00 2001 From: Cedric Brandily Date: Sun, 10 Apr 2016 23:18:17 +0200 Subject: Support client certificate/key This change enables to specify a client certificate/key with: * usual CLI options (--os-cert/--os-key) * usual environment variables ($OS_CERT/$OS_KEY) Closes-Bug: #1565112 Change-Id: I12e151adcb6084d801c6dfed21d82232a3259aea --- swiftclient/shell.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'swiftclient/shell.py') diff --git a/swiftclient/shell.py b/swiftclient/shell.py index 53d7d99..c9e1b75 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -1294,6 +1294,8 @@ def main(arguments=None): [--os-service-type ] [--os-endpoint-type ] [--os-cacert ] [--insecure] + [--os-cert ] + [--os-key ] [--no-ssl-compression] [--help] [] @@ -1535,6 +1537,16 @@ Examples: help='Specify a CA bundle file to use in verifying a ' 'TLS (https) server certificate. ' 'Defaults to env[OS_CACERT].') + os_grp.add_argument('--os-cert', + metavar='', + default=environ.get('OS_CERT'), + help='Specify a client certificate file (for client ' + 'auth). Defaults to env[OS_CERT].') + os_grp.add_argument('--os-key', + metavar='', + default=environ.get('OS_KEY'), + help='Specify a client certificate key file (for ' + 'client auth). Defaults to env[OS_KEY].') options, args = parse_args(parser, argv[1:], enforce_requires=False) if options.help or options.os_help: -- cgit v1.2.1