Currently, there is no way to cancel or put a deadline on certificate verification operations, which due to the graph nature of chain building (and the associated signature verifications) can be somewhat expensive.
I propose we add a context.Context to the VerifyOptions struct, which would then be checked during path building. This can then be populated during TLS handshakes using the existing context.
type VerifyOptions struct {
...
// Context is the context used for certificate chain building and
// verification. If nil, verification time is unbounded.
Context context.Context
}
cc @FiloSottile
Currently, there is no way to cancel or put a deadline on certificate verification operations, which due to the graph nature of chain building (and the associated signature verifications) can be somewhat expensive.
I propose we add a context.Context to the VerifyOptions struct, which would then be checked during path building. This can then be populated during TLS handshakes using the existing context.
cc @FiloSottile