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

gen.go: allow to customise the URL when generating #17

Merged

Conversation

dolmen
Copy link
Contributor

@dolmen dolmen commented Apr 15, 2019

With this patch go run gen.go now takes the PEM source URL from the command line.
That URL is persisted in the go:generate line produced in certifi.go, so go generate will reuse that URL forever.

This allows to easily fork the project to use a different URL (such as the PEM built by cURL developer from Mozilla sources: https://curl.haxx.se/ca/cacert.pem) if someone doesn't trust mkcert.org.

This PR still uses mkcert.org certificates as the source like before. It only makes forking easier.

Fork demo:

go run gen.go https://curl.haxx.se/ca/cacert.pem

@dolmen dolmen force-pushed the feature/allow-custom-URL-when-generating branch from c8d4bda to 902606d Compare October 22, 2019 11:56
@dolmen
Copy link
Contributor Author

dolmen commented Oct 22, 2019

Rebased.

"go run gen.go" now takes the URL from the command line.
That URL is persisted in the go:generate line produced in certifi.go, so
"go generate" will reuse that URL forever.

This allows to easily fork the project to use a different URL (such as
the original Mozilla) if someone doesn't trust mkcert.org.
@dolmen dolmen force-pushed the feature/allow-custom-URL-when-generating branch from 902606d to ac88b96 Compare February 11, 2020 10:19
@dolmen
Copy link
Contributor Author

dolmen commented Feb 11, 2020

Rebased.

Also improved to expose the source URL and the timestamp in the Go documentation of the CACerts function.

@mattrobenolt mattrobenolt merged commit 3ee16e4 into certifi:master Feb 11, 2020
@dolmen
Copy link
Contributor Author

dolmen commented Feb 25, 2020

Thanks for the merge! 🎉

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.

2 participants