Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add option to support client certificates #163

Closed
rgl opened this Issue Sep 16, 2013 · 2 comments

Comments

Projects
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:

https://dl.dropboxusercontent.com/u/20421111/add-support-for-client-certificates.patch

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

The Readme.md 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 https://example.com/pulp/api/v2/content/units/rpm/
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]
            [METHOD] URL [REQUEST_ITEM [REQUEST_ITEM ...]]
http: error: unrecognized arguments: --cert
Owner

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