Skip to content

crypto/x509: allow cert bundle path to be set by environment variable #3905

Closed
@gopherbot

Description

@gopherbot

by viriketo:

Using go 1.0.2 on linux-x86_64.

It looks like go https works with a hardcoded path to ca-bundle list of accepted
certificates.

I think it would be nice if src/pkg/crypto/x509/root_unix.go could look at some
environment variable for an exclusive ca-cert.

In the GNU/Linux distribution NixOS we have the system ca-cert bundle sitting at a path
different than those hardcoded in root_unix.go, and I can patch go1.0.2 to make it work.
But users may want to have control about the trusted certificates, when they run go
programs.

Activity

robpike

robpike commented on Aug 4, 2012

@robpike
Contributor

Comment 1:

Labels changed: added priority-later, packagechange, removed priority-triage.

Owner changed to @agl.

Status changed to Accepted.

rsc

rsc commented on Nov 27, 2013

@rsc
Contributor

Comment 3:

Labels changed: added go1.3maybe.

rsc

rsc commented on Dec 4, 2013

@rsc
Contributor

Comment 4:

Labels changed: added release-none, removed go1.3maybe.

rsc

rsc commented on Dec 4, 2013

@rsc
Contributor

Comment 5:

Labels changed: added repo-main.

gopherbot

gopherbot commented on Nov 21, 2014

@gopherbot
ContributorAuthor

Comment 6 by sokolyuk:

Please add
"/etc/ssl/cacert.pem",                      // OmniOS
into  pkg/crypto/x509/root_unix.go
added this to the Unplanned milestone on Apr 10, 2015
odeke-em

odeke-em commented on Oct 10, 2016

@odeke-em
Member

Any thoughts on this @agl?

gopherbot

gopherbot commented on Feb 2, 2017

@gopherbot
ContributorAuthor

CL https://golang.org/cl/36093 mentions this issue.

locked and limited conversation to collaborators on May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rsc@robpike@odeke-em@gopherbot

        Issue actions

          crypto/x509: allow cert bundle path to be set by environment variable · Issue #3905 · golang/go