Skip to content

crypto/tls: expose testingOnlyDidHRR from ConnectionState #74425

Description

@jschauma

It can be useful for a TLS server to know (e.g., to log) whether or not a HelloRetryRequest was performed. An example use case is with the increased adoption of PQC and servers doing HRRs depending on whether the client included the X25519MLKEM768 keyshare or not in the ClientHello. With #67516, we now get the CurveID exposed (yay), but that only provides the final negotiated keygroup, which could be arrived at with or without an HRR; to debug and troubleshoot connections, being able to e.g., log whether an HRR took place would be useful.

To this end, I'd like to propose to expose testingOnlyDidHRR from the ConnectionState in a similar manner as the CurveID; perhaps simply named as DidHRR bool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposalProposal-AcceptedProposal-CryptoProposal related to crypto packages or other security issues

    Type

    No type

    Projects

    Status
    Accepted

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions