Skip to content

Support for custom cert validation #332

Open
@ggwpez

Description

@ggwpez

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 and QUIC_CREDENTIAL_FLAG_REQUIRE_CLIENT_AUTHENTICATION into the CredConfig returned by parse_verify_options.
  • Send an event ATOM_PEER_CERT_RECEIVED to the connection owner in handle_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 return QUIC_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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions