Skip to content

crypto/tls: allow VerifyConnection to request a full handshake #77378

Description

@FiloSottile

If VerifyConnection returns an error, the connection is terminated. If the connection is a resumption, there is no way for the callback to decide it would like the client to proceed to a full handshake, instead.

We could define a special error, tested with errors.Is, which causes the resumption to be rejected. In that case VerifyConnection can be called two or more times for a connection. (More if there are multiple session tickets.)

This is an issue and not a proposal for two reasons:

  1. we need to figure out if it's technically feasible to call VerifyConnection the first time while still in the handshake phase at which we choose whether to resume or not;
  2. we need to spec out a precise API.

Originally discussed at #77217 (comment).

(@espadolini pointed out that while we define smart errors for VerifyConnection, we could also make one that allows sending the peer a different TLS alert to close the connection.)

/cc @golang/security

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions