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.
This commit is contained in:
brian m. carlson 2021-04-12 13:55:54 +00:00
parent e6fb649074
commit 497fdce397
No known key found for this signature in database
GPG Key ID: 2D0C9BC12F82B3A1
4 changed files with 2 additions and 24 deletions

@ -1,8 +0,0 @@
package lfshttp
import "crypto/x509"
func appendRootCAsForHostFromPlatform(pool *x509.CertPool, host string) *x509.CertPool {
// Do nothing, use golang default
return pool
}

@ -1,8 +0,0 @@
package lfshttp
import "crypto/x509"
func appendRootCAsForHostFromPlatform(pool *x509.CertPool, host string) *x509.CertPool {
// Do nothing, use golang default
return pool
}

@ -1,3 +1,5 @@
// +build !darwin,!windows
package lfshttp
import "crypto/x509"

@ -1,8 +0,0 @@
package lfshttp
import "crypto/x509"
func appendRootCAsForHostFromPlatform(pool *x509.CertPool, host string) *x509.CertPool {
// Do nothing, use golang default
return pool
}