mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
9eb88a2e1d
Changes are minor - I ended up just patching the ssl certs at the root
file, rather than trying to keep up with the various darwin changes.
The externalnetwork test helper location changed, to so I had to update
that patch as well.
- Add xcbuild as propagatedBuildInput on darwin 7e25bdba5e
35 lines
754 B
Diff
35 lines
754 B
Diff
diff --git a/src/crypto/x509/root.go b/src/crypto/x509/root.go
|
|
index ac92915128..fb1d70c735 100644
|
|
--- a/src/crypto/x509/root.go
|
|
+++ b/src/crypto/x509/root.go
|
|
@@ -6,7 +6,11 @@ package x509
|
|
|
|
//go:generate go run root_ios_gen.go -version 55161.140.3
|
|
|
|
-import "sync"
|
|
+import (
|
|
+ "io/ioutil"
|
|
+ "os"
|
|
+ "sync"
|
|
+)
|
|
|
|
var (
|
|
once sync.Once
|
|
@@ -20,6 +24,16 @@ func systemRootsPool() *CertPool {
|
|
}
|
|
|
|
func initSystemRoots() {
|
|
+ if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
|
|
+ data, err := ioutil.ReadFile(file)
|
|
+ if err == nil {
|
|
+ roots := NewCertPool()
|
|
+ roots.AppendCertsFromPEM(data)
|
|
+ systemRoots = roots
|
|
+ return
|
|
+ }
|
|
+ }
|
|
+
|
|
systemRoots, systemRootsErr = loadSystemRoots()
|
|
if systemRootsErr != nil {
|
|
systemRoots = nil
|