-
Notifications
You must be signed in to change notification settings - Fork 734
Description
Checklist
- I've searched the issue tracker for similar requests
Is your feature request related to a problem? Please describe.
We have a ClientCertVerifier
instance for which we would like to extract the result of the call to verify_client_cert
. More specifically, we need to know if any Error
occurred during cert verification, so that we can decide whether to proceed with the connection later on.
Currently, we do this by setting up a new ClientCertVerifier
for each connection, and making it so this verifier shares a piece of state with some other code that makes these decisions (it relies upon other state to do this). This means we need to set up a new ServerConfig
to pass into the Acceptor
API for each connection, rather than keeping a handful of pre-built configs around.
Describe the solution you'd like
I was wondering if there's a better way to do this; either an API I'm missing, or a way to inspect specifically the result of client verification. This issue's comment seems to describe a similar situation, and hints at the fact that there is currently no better solution (?).
Alternatively, I considered having a single ClientCertVerifier
and creating a cache with client cert verification results, but the verify_client_cert
API does not provide me with a way to uniquely identify the current handshake such that I can retrieve the state for the resulting stream elsewhere.