Skip to content

crypto/tls: cache TLS (client) cert validation? #8580

Description

@gopherbot

by justin@fathomdb.com:

I'm seeing not-great TLS performance; enabling the ClientSessionCache seems to help. 
But it looks like even when resuming a session, we still call processCertsFromClient,
and do an (expensive) validation of the client cert chain.

Two ideas/questions:

1) Do we really need to re-validate the client cert on resume (haven't we already
validated it on first-connect)?  Can the client switch certs on us?

2) Is it possible to avoid any of this work using a cache?  processCertsFromClient looks
very cacheable to my untrained eye.  I'm thinking something similar to
ClientSessionCache in tls.Config.


I guess I could turn off client-cert validation by the tls package, and implement my own
cache.  It would sure be nice if this was out-of-the-box though!

Session resumption makes this less important, but I don't see why we wouldn't also cache
validation of server certs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions