-
Notifications
You must be signed in to change notification settings - Fork 384
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
Conversation
…pected is pem with private key and cert in same pem file
@@ -63,6 +64,8 @@ var ( | |||
redirectsFollowed int | |||
|
|||
version = "devel" // for -v flag, updated during the release process with -ldflags=-X=main.version=... | |||
|
|||
clientCertFile string |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, will change.
…aration to be with others
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.