Skip to content

crypto/x509: add CertPool.Equal #46057

Closed
Closed
@dnephin

Description

@dnephin

What version of Go are you using (go version)?

go 1.16.x

What did you expect to see?

In response to #45891, x509.CertPool structs can no longer be compared with reflect.DeepEqual, and there is no way to export the certificates, so there is no longer any way to fully compare these structs.

CertPool.Subjects can be used for a shallow comparison, but #45891 (comment) shows that this is not a complete comparison.

By adding an Equal(other CertPool) bool these types can be compared directly, and go-cmp will automatically use the method for comparison.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions