Skip to content

[http_client] CN checking against caller-specified Host header doesn't strip a port number #1790

@garethsb

Description

@garethsb
Contributor

Related to #832.

Both calc_cn_host in cpprestsdk/Release/src/http/client/http_client_asio.cpp and winhttp_client::send_request in cpprestsdk/Release/src/http/client/http_client_winhttp.cpp cause the entire Host header value to be compared with the certificate Common Name which causes an SSL handshake error if the caller passes a Host header including a port number, e.g. when non-default.

encResult = &hostHeader->second;

const auto& requestHost = hostHeader->second;

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @garethsb

        Issue actions

          [http_client] CN checking against caller-specified Host header doesn't strip a port number · Issue #1790 · microsoft/cpprestsdk