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

Update x509.CertPool equality checks (release-2.2) #2880

Merged
merged 1 commit into from
Aug 30, 2021

Conversation

denyeart
Copy link
Contributor

Go 1.16 changed the CertPool implementation to employ functions to
lazily acquire certificates. This change effectively breaks
reflect.DeepEqual used by our test assertions.

This commit changes the assertions compare certificate subjects instead
of the entire pool. While not the same, it's a close approximation.

See https://go-review.googlesource.com/c/go/+/229917

Signed-off-by: Matthew Sykes sykesmat@us.ibm.com
Signed-off-by: David Enyeart enyeart@us.ibm.com

Go 1.16 changed the CertPool implementation to employ functions to
lazily acquire certificates. This change effectively breaks
`reflect.DeepEqual` used by our test assertions.

This commit changes the assertions compare certificate subjects instead
of the entire pool. While not the same, it's a close approximation.

See https://go-review.googlesource.com/c/go/+/229917

Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
@denyeart denyeart requested a review from a team as a code owner August 30, 2021 20:21
@denyeart denyeart changed the title Update x509.CertPool equality checks Update x509.CertPool equality checks (release-2.2) Aug 30, 2021
@yacovm yacovm merged commit 50064c8 into hyperledger:release-2.2 Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants