git-lfs/lfshttp/certs_nix.go
brian m. carlson 497fdce397
Make lfshttp package builds more portable
Currently, we have a large number of identical cert files for various
platforms, all of which are non-macOS Unix systems.  These files all
simply provide the default system configuration and nothing else.

We recently noticed by looking at the NetBSD pkgsrc repository, which,
despite its name, can be used on many systems, that there is a patch to
support Solaris.  Unsurprisingly, it duplicates this same file.

Since using the default system behavior is the prudent thing to do if we
don't have anything else to do, let's make our project more portable by
simply using this same file for all systems other than macOS or Windows.
That way, we'll work on Solaris and NetBSD, among other systems, and any
other Unix systems which support Go in the future will also magically
work.
2021-04-14 18:28:10 +00:00

11 lines
206 B
Go

// +build !darwin,!windows
package lfshttp
import "crypto/x509"
func appendRootCAsForHostFromPlatform(pool *x509.CertPool, host string) *x509.CertPool {
// Do nothing, use golang default
return pool
}