Skip to content

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 [email protected]

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 <[email protected]>
@denyeart denyeart requested a review from a team as a code owner August 30, 2021 20:15
@denyeart denyeart changed the title Update x509.CertPool equality checks Update x509.CertPool equality checks (release-2.3) Aug 30, 2021
@yacovm yacovm merged commit cf3470b into hyperledger:release-2.3 Aug 30, 2021
C0rWin pushed a commit to C0rWin/fabric that referenced this pull request Sep 24, 2022
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 <[email protected]>

Co-authored-by: Matthew Sykes <[email protected]>
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