-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add built-in root certificate fallbacks
Blank-importing golang.org/x/crypto/x509roots/fallback bundles a set of root fallback certificates from Mozilla into the resulting binary. This allows the program to run in environments where the system root certificates are not available, for example inside a minimal container. These are _fallbacks_, meaning that if the system _does have_ a set of root certificates, those will be given priority. The binary size will increase a little (~ 220 kB). It's added to main.go instead of somewhere else because the recommendation is for the package to be imported from binaries, not from libraries. Calling x509.SetFallbackRoots (what the imported package does in its init function) more than once will cause the program to panic. In principle, the Go import system will prevent the package from being imported twice, so that shouldn't be a problem, but it's probably better to keep this very visible, therefore main.go. Signed-off-by: Marcelo E. Magallon <[email protected]>
- Loading branch information
Showing
7 changed files
with
3,900 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3,827 changes: 3,827 additions & 0 deletions
3,827
vendor/golang.org/x/crypto/x509roots/fallback/bundle.go
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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