• Steven Hartland's avatar
    crypto/x509: load certs from env vars + extra locations · e83bcd95
    Steven Hartland authored
    Add the ability to override the default file and directory from
    which certificates are loaded by setting the OpenSSL compatible
    environment variables: SSL_CERT_FILE, SSL_CERT_DIR.
    
    If the variables are set the default locations are not checked.
    
    Added new default file "/usr/local/etc/ssl/cert.pem" for FreeBSD.
    
    Certificates in the first valid location found for both file and
    directory are added, instead of only the first file location if
    a valid one was found, which is consistent with OpenSSL.
    
    Fixes #3905
    Fixes #14022
    Fixes #14311
    Fixes #16920
    Fixes #18813 - If user sets SSL_CERT_FILE.
    
    Change-Id: Ia24fb7c1c2ffff4338b4cf214bd040326ce27bb0
    Reviewed-on: https://go-review.googlesource.com/36093Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    e83bcd95
Name
Last commit
Last update
..
pkix Loading commit data...
testdata Loading commit data...
cert_pool.go Loading commit data...
example_test.go Loading commit data...
pem_decrypt.go Loading commit data...
pem_decrypt_test.go Loading commit data...
pkcs1.go Loading commit data...
pkcs8.go Loading commit data...
pkcs8_test.go Loading commit data...
root.go Loading commit data...
root_bsd.go Loading commit data...
root_cgo_darwin.go Loading commit data...
root_darwin.go Loading commit data...
root_darwin_arm_gen.go Loading commit data...
root_darwin_armx.go Loading commit data...
root_darwin_test.go Loading commit data...
root_linux.go Loading commit data...
root_nacl.go Loading commit data...
root_nocgo_darwin.go Loading commit data...
root_plan9.go Loading commit data...
root_solaris.go Loading commit data...
root_unix.go Loading commit data...
root_unix_test.go Loading commit data...
root_windows.go Loading commit data...
sec1.go Loading commit data...
sec1_test.go Loading commit data...
sha2_windows_test.go Loading commit data...
test-file.crt Loading commit data...
verify.go Loading commit data...
verify_test.go Loading commit data...
x509.go Loading commit data...
x509_test.go Loading commit data...
x509_test_import.go Loading commit data...