Skip to content

crypto/x509: add CertPool.Clone #35044

Closed
Closed
@wbl

Description

@wbl

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

Activity

added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Oct 21, 2019
dmitshur

dmitshur commented on Oct 21, 2019

@dmitshur
Member
changed the title [-]crypto/x509: enable deep copy of x509.CertPool[/-] [+]crypto/x509: add CertPool.Clone[/+] on Nov 7, 2021
changed the title [-]crypto/x509: add CertPool.Clone[/-] [+]proposal: crypto/x509: add CertPool.Clone[/+] on Mar 2, 2022
added
Proposal-CryptoProposal related to crypto packages or other security issues
and removed
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Mar 2, 2022
added this to the Proposal milestone on Mar 2, 2022
FiloSottile

FiloSottile commented on Mar 2, 2022

@FiloSottile
Contributor

@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

rsc commented on Mar 16, 2022

@rsc
Contributor

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

rsc commented on Mar 23, 2022

@rsc
Contributor

Does anyone object to adding this?

rsc

rsc commented on Mar 30, 2022

@rsc
Contributor

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

2 remaining items

modified the milestones: Proposal, Backlog on Apr 13, 2022
gopherbot

gopherbot commented on Apr 13, 2022

@gopherbot
Contributor

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

modified the milestones: Backlog, Go1.19 on May 22, 2022
moved this to Accepted in Proposalson Aug 10, 2022
removed this from Proposalson Apr 19, 2023
locked and limited conversation to collaborators on Jun 23, 2023
added a commit that references this issue on Apr 29, 2024
9298f60
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@wbl@FiloSottile@dmitshur@rolandshoemaker

        Issue actions

          crypto/x509: add CertPool.Clone · Issue #35044 · golang/go