1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
9 // Load root CAs from /etc/arvados/ca-certificates.crt if it exists
10 // and SSL_CERT_FILE does not already specify a different file.
12 envvar := "SSL_CERT_FILE"
13 certfile := "/etc/arvados/ca-certificates.crt"
14 if os.Getenv(envvar) != "" {
15 // Caller has already specified SSL_CERT_FILE.
18 if _, err := os.ReadFile(certfile); err != nil {
19 // Custom cert file is not present/readable.
22 os.Setenv(envvar, certfile)