Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto/x509: add CertPool.Clone #35044

Closed
wbl opened this issue Oct 21, 2019 · 7 comments
Closed

crypto/x509: add CertPool.Clone #35044

wbl opened this issue Oct 21, 2019 · 7 comments
Labels
Milestone

Comments

@wbl
Copy link

wbl commented Oct 21, 2019

I have a program that creates a custom certificate pool in several steps, loading various certificates that have different levels of access to the resources in the program. I would like to use one of the earlier stages as a separate certificate pool to ensure that only certificates from that pool can access a particular port.

Unfortunately the best solution seems to be to load the certificates twice since there is no way to clone pools. I see this has been suggested a number of times before, although each time the particular application suggested has been solved by a different method. The code to do this is already there in the copy method: I'm just suggesting we upper-case it.

See the very closely related:
#24540

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 21, 2019
@dmitshur
Copy link
Contributor

/cc @FiloSottile @frankgreco

@FiloSottile FiloSottile changed the title crypto/x509: enable deep copy of x509.CertPool crypto/x509: add CertPool.Clone Nov 7, 2021
@FiloSottile FiloSottile changed the title crypto/x509: add CertPool.Clone proposal: crypto/x509: add CertPool.Clone Mar 2, 2022
@FiloSottile FiloSottile added Proposal Proposal-Crypto Proposal related to crypto packages or other security issues and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 2, 2022
@FiloSottile FiloSottile added this to the Proposal milestone Mar 2, 2022
@FiloSottile
Copy link
Contributor

FiloSottile commented Mar 2, 2022

@golang/proposal-review, this would be a good thing to land in Go 1.19 along with CertPool.Equal #46057 and it's pretty easy after the Go 1.18 changes. /cc @golang/security

@rsc
Copy link
Contributor

rsc commented Mar 16, 2022

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc
Copy link
Contributor

rsc commented Mar 23, 2022

Does anyone object to adding this?

@rsc
Copy link
Contributor

rsc commented Mar 30, 2022

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

@rsc
Copy link
Contributor

rsc commented Apr 13, 2022

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

@rsc rsc changed the title proposal: crypto/x509: add CertPool.Clone crypto/x509: add CertPool.Clone Apr 13, 2022
@rsc rsc modified the milestones: Proposal, Backlog Apr 13, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/400175 mentions this issue: crypto/x509: add CertPool.Clone

@rsc rsc added this to Proposals Aug 10, 2022
@rsc rsc moved this to Accepted in Proposals Aug 10, 2022
@rsc rsc removed this from Proposals Apr 19, 2023
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants