Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wolfSSL HTTP/3 peer verification is lacking #13487

Closed
bagder opened this issue Apr 26, 2024 · 4 comments
Closed

wolfSSL HTTP/3 peer verification is lacking #13487

bagder opened this issue Apr 26, 2024 · 4 comments
Labels
HTTP/3 h3 or quic related not-a-curl-bug This is not a bug in curl

Comments

@bagder
Copy link
Member

bagder commented Apr 26, 2024

I did this

build curl with ngtcp2 + nghttp3 + wolfSSL

Issue a request that should fail the certificate check, like this:

curl --http3 --resolve example:443:151.101.129.91 https://example

The problem is likely here:

curl/lib/vquic/vquic-tls.c

Lines 325 to 330 in c8e0cd1

(void)data;
if(conn_config->verifyhost) {
if(!peer->sni ||
wolfSSL_check_domain_name(ctx->ssl, peer->sni) == SSL_FAILURE)
return CURLE_PEER_FAILED_VERIFICATION;
}

This does not really verify the peer certificate. For TCP connections this works as it is wired into the wolfSSL connect() implementation and gives a special return code on such a fail.

I expected the following

A request to a server that fails the check should error out.

curl/libcurl version

git master

operating system

independent

@bagder bagder added the HTTP/3 h3 or quic related label Apr 26, 2024
@bagder
Copy link
Member Author

bagder commented Apr 26, 2024

@icing feel free to edit/follow-up with corrections or added details as you see fit

@bagder
Copy link
Member Author

bagder commented Apr 28, 2024

This appears to be a wolfSSL problem, would you agree @icing? I see nothing in the wolfSSL docs that suggests that this would not work for QUIC connections but only for TCP. Or am I missing something?

@icing
Copy link
Contributor

icing commented Apr 29, 2024

I agree. I found no obvious way to do this with the wolfSSL API.

@bagder
Copy link
Member Author

bagder commented Apr 30, 2024

Since we believe this problem is in the wolfSSL end, I'm closing this issue.

@bagder bagder closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTTP/3 h3 or quic related not-a-curl-bug This is not a bug in curl
Development

No branches or pull requests

2 participants