Open
Description
Hey I needed a way to inspect a cert before accepting a connection and implemented it on this fork by adding four things:
- Always include
QUIC_CREDENTIAL_FLAG_INDICATE_CERTIFICATE_RECEIVED
andQUIC_CREDENTIAL_FLAG_REQUIRE_CLIENT_AUTHENTICATION
into theCredConfig
returned byparse_verify_options
. - Send an event
ATOM_PEER_CERT_RECEIVED
to the connection owner inhandle_connection_event_peer_certificate_received
to notify them of a received cert. - Added function
complete_cert_validation2(conn, bool)
to accept / reject an inbound cert. - Changed
handle_connection_event_peer_certificate_received
to returnQUIC_STATUS_PENDING
instead of success.
This makes it possible to asynchronously inspect a cert and accept or reject it before the connection is established (possibly also interesting for @danicuki).
Do you think this is generally the right direction? The parse_verify_options
would probably need to have some arguments changed to make it possible to indicate the custom cert checking instead of always enabling it. And I would do some other cleanups.
Metadata
Metadata
Assignees
Labels
No labels