Skip to content

advancedtls: Use the New tls.Config.VerifyConnection callback #3610

@ZhenLian

Description

@ZhenLian

Use case(s) - what problem will this feature solve?

A new verification method was recently introduced in PR https://go-review.googlesource.com/c/go/+/229122/ , with the initiative to have all the connection information(such as ServerName, PeerCertificate, etc) in verify callbacks. The original issue is golang/go#36736.

We might also want to switch to use this method in advancedtls, to improve internal code quality and reduce duplicate code with main tls library of gRPC. Right now we are using a workaround of building verification callback in a closure, which could be improved after this function is used.

No API Changes are expected. This is intended for internal code quality enhancement.

Proposed Solution

Use tls.Config.VerifyConnection(s ConnectionState) in advancedtls.

@jiangtaoli2016 FYI.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions