Add option to support client certificates #163

rgl opened this Issue Sep 16, 2013 · 2 comments


None yet
3 participants

rgl commented Sep 16, 2013

Add the --cert CERT_FILE option to support client certificates.

This was quite straightforward to add because the requests library already supports this. I did a quick patch at:

Maybe we should check whether the file exists before passing the control to requests?

The says that --cert and --certkey are supported, but it appears that --cert is not recognized with the latest version available from PyPI:

$ http --verify=no --cert ~/.pulp/user-cert.pem GET
usage: http [--json] [--form] [--pretty {all,colors,format,none}]
            [--style STYLE] [--print WHAT] [--verbose] [--headers] [--body]
            [--stream] [--output FILE] [--download] [--continue]
            [--session SESSION_NAME_OR_PATH | --session-read-only SESSION_NAME_OR_PATH]
            [--auth USER[:PASS]] [--auth-type {basic,digest}]
            [--proxy PROTOCOL:PROXY_URL] [--follow] [--verify VERIFY]
            [--timeout SECONDS] [--check-status] [--ignore-stdin] [--help]
            [--version] [--traceback] [--debug]
http: error: unrecognized arguments: --cert

jakubroztocil commented Mar 25, 2015

This is available since 0.9.0:

Added --cert and --cert-key parameters to specify a client side certificate and private key for SSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment