Skip to content

Support for optional Server Name Indication (SNI) with httplib::SSLClient #2223

@torres98

Description

@torres98

Today I was trying to connect to a rustls powered HTTPs server using your library, and I've noticed an issue during the TLS handshake. Apparently if openssl is used, the SSLClient always sets the SNI with either SSL_set_tlsext_host_name or SSL_ctrl(ssl2, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ...).
While I understand the importance of this extension, this raised an issue in our setup. Since we use IPs for our clients (instead of hostnames), the rustls server rejected the TLS handshake cause it doesn't accept an IP as the SNI (more info about this issue on their side here rustls/rustls#184). The only way I could find to disable this extension was by manually removing those openSSL function calls. Would it be possible to allow the user to disable this extension?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions