Add --cacert option to provide custom CA certificate#50
Open
rockbox-y1 wants to merge 1 commit intoameshkov:masterfrom
Open
Add --cacert option to provide custom CA certificate#50rockbox-y1 wants to merge 1 commit intoameshkov:masterfrom
rockbox-y1 wants to merge 1 commit intoameshkov:masterfrom
Conversation
ameshkov
requested changes
Feb 16, 2026
Owner
ameshkov
left a comment
There was a problem hiding this comment.
Looks good, thank you!
Please fix a couple of comments and please add a test to https://github.com/ameshkov/gocurl/blob/master/internal/cmd/cmd_test.go
Also, it becomes possible to run HTTP/3 test without --insecure
| Insecure bool `short:"k" long:"insecure" description:"Disables TLS verification of the connection." optional:"yes" optional-value:"true"` | ||
|
|
||
| // Provide your own CA certificates | ||
| CACert string `long:"cacert" description:"Path to custom CA certificate file." value-name:"<file>"` |
Owner
There was a problem hiding this comment.
Please elaborate a little in the description
Suggested change
| CACert string `long:"cacert" description:"Path to custom CA certificate file." value-name:"<file>"` | |
| CACert string `long:"cacert" description:"Path to a certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM format." value-name:"<file>"` |
| --connect-timeout=<seconds> Maximum time in seconds allowed for the connection phase. | ||
| -I, --head Fetch the headers only. | ||
| -k, --insecure Disables TLS verification of the connection. | ||
| --cacert=<file> Path to custom CA |
Owner
There was a problem hiding this comment.
This will also have to be updated (just run gocurl --help and copy/paste)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds functionality to supply your own CA certificate as in curl. E.g. for testing internal services that are signed with custom CAs.
Thanks for your work and let me know if anything is missing.