Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding tls client certificate support #99

Merged
merged 4 commits into from
Sep 30, 2016
Merged

Conversation

husobee
Copy link
Contributor

@husobee husobee commented Sep 29, 2016

Fixes #94

This pull request adds support for client certificates. To use specify a client certificate in PEM format that includes both the certificate and the private key in the same file with the "-c" flag.

@@ -63,6 +64,8 @@ var (
redirectsFollowed int

version = "devel" // for -v flag, updated during the release process with -ldflags=-X=main.version=...

clientCertFile string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be moved up to be with the rest of the command line flags?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, will change.

@@ -77,6 +80,7 @@ func init() {
flag.BoolVar(&saveOutput, "O", false, "Save body as remote filename")
flag.StringVar(&outputFile, "o", "", "output file for body")
flag.BoolVar(&showVersion, "v", false, "print version number")
flag.StringVar(&clientCertFile, "c", "", "client cert file for tls config")
Copy link
Contributor

@theckman theckman Sep 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about using E, which is the same flag cURL uses? This project is a Go version of httpstat.py, which is just a wrapper around cURL. So we should try to keep as much parity as possible in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, will change.

@davecheney davecheney merged commit 5ef3031 into davecheney:master Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants