Skip to content

proposal: crypto/x509: add Context to VerifyOptions #61576

@rolandshoemaker

Description

@rolandshoemaker

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

Metadata

Metadata

Labels

ProposalProposal-CryptoProposal related to crypto packages or other security issues

Type

No type

Projects

Status

Incoming

Relationships

None yet

Development

No branches or pull requests

Issue actions