Skip to content

[Feature Request] Expose selected certificate types in Cert Verify callbacks #2258

@ripatel-fd

Description

@ripatel-fd

Checklist

  • I've searched the issue tracker for similar requests

Is your feature request related to a problem? Please describe.

rustls lacks support for multiple certificate types (you can only have one active certificate type per TLS config).
This is problematic for existing deployments of TLS that want to migrate certificate types, e.g. X.509 to Raw Public Keys (particularly P2P networks, where these migrations take a long time)

Describe the solution you'd like

The main problem is that certain callbacks (via public traits) don't provide the certificate types that were negotiated by the ClientHello/ServerHello exchange.

A practical way to allow multiple certificate types is by extending the following callbacks with additional parameters:

  • ResolvesClientCert::resolve should provide the selected client_certificate_type. Currently, the callback has no way of knowing which certificate type the server would expect
  • ServerCertVerifier::verify_tls13_signature should provide the selected server_certificate_type.
  • ClientCertVerifier::verify_tls13_signature should provide the selected client_certificate_type.

If these 3 changes are made, it's possible to create a TLS config with a custom ResolvesClientCert and cert verifier that supports RawPublicKeys with X.509 fallback.

Describe alternatives you've considered

Additional context

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy