Skip to content

Missing TLS HandshakeType support (certificate_request) #19521

Open

Description

@richard-powers

Zig Version

0.11.0

Steps to Reproduce and Observed Behavior

I found this issue when trying to connect to a postgres database which requires ssl.
In std.crypto.tls.Client there is a switch statement over the HandshakeType, but certificate_request is unhandled, so I simply receive error.TlsUnexpectedMessage instead of being able to connect to my database.

In the TLS RFC, A server which is authenticating with a certificate MAY optionally request a certificate from the client

So it seems this must be supported in some cases, unless I'm mistaken?

Expected Behavior

HandshakeType.certificate_request to be supported, if it is indeed required for the protocol

Activity

  1. added
    bug
    on Apr 3, 2024
  2. added
    enhancement
    and removed
    bug
    on Apr 3, 2024
  3. clickingbuttons commented on Apr 4, 2024

    @clickingbuttons
    Contributor

    Yes, the TLS Client should add an option for a Certificate to respond to these messages. This isn't required for HTTPS, which is what the client is currently designed for.

    I think this is blocked on #14171. After it lands it this feature should be added to both the TLS client and the TLS server and tested.

  4. rockorager commented on May 8, 2024

    @rockorager
    Contributor

    Chiming in here that this is a blocker for me in an IRC client appllication. Several IRC servers fail TLS handshakes because of this.

  5. VaskoBozhurski commented on Jun 20, 2024

    @VaskoBozhurski

    Just wanted to note that some HTTPS endpoints such as the Kubernetes API Server may do a certificate_request during the handshake.

  6. added
    standard library
    on Aug 14, 2024
  7. added this to the 0.16.0 milestone on Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementstandard library

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions