Skip to content

ECH-draft-13c: s_server ctx switch (switch to inner) bug #30

@Neimhin

Description

@Neimhin

Fix here (but I don't know how to create a PR across repos): https://github.com/Neimhin/openssl/pull/4/files

In s_server we should switch to ctx2 when ECH is successful and when the inner SNI matches the host of the cert in ctx2. I believe the logic currently switches context whenever ECH is successful and an inner SNI is provided (regardless of whether the inner SNI matches the cert for ctx2).

This if condition in [1] is, I think, always true.

I haven't yet run any code to test this, let me know if you want me to do a demo of this bug.

The comment preceding the servername callback function says to use X509_check_host [2], which actually checks whether a hostname matches the CN of the cert (but perhaps does not verify it?). It seems to me it would be okay to not verify the hostname since the server owns the cert.

[1]

if (mrv == 1) {

[2]

* X509_check_host is the way to do that, given an X509* pointer.

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