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

refactor: adapt to netem pinning certificates to hosts #1287

Merged
merged 4 commits into from
Sep 20, 2023
Merged

Conversation

bassosimone
Copy link
Contributor

As explained in ooni/netem#40, netem used to generate on the fly certificates for any host.

I then discovered that this behavior is not desirable because the internet doesn't work like that. Specifically, TLS dialing to, say, www.example.com with www.google.com as the SNI must return a TLS error (ssl_invalid_hostname in OONI).

This wrong behavior of netem has become a bottleneck for writing new tests for the beacons functionality, so it must change.

I have already changed netem and this diff updates the probe-cli tree to use a netem version that behaves more correctly.

While there, I noticed that sniblocking tests were wrong because of the previous netem behavior and asserted that the control should return a nil failure, while it should have been ssl_invalid_hostname.

Part of ooni/probe#2531

As explained in ooni/netem#40, netem used to
generate on the fly certificates for any host.

I then discovered that this behavior is not desirable because the
internet doesn't work like that. Specifically, TLS dialing to, say,
www.example.com with www.google.com as the SNI must return a TLS
error (`ssl_invalid_hostname` in OONI).

This wrong behavior of netem has become a bottleneck for writing
new tests for the beacons functionality, so it must change.

I have already changed netem and this diff updates the probe-cli
tree to use a netem version that behaves more correctly.

While there, I noticed that sniblocking tests were wrong because of
the previous netem behavior and asserted that the control should
return a nil failure, while it should have been `ssl_invalid_hostname`.

Part of ooni/probe#2531
@bassosimone bassosimone merged commit c965601 into master Sep 20, 2023
6 checks passed
@bassosimone bassosimone deleted the issue/2531 branch September 20, 2023 23:41
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this pull request Feb 13, 2024
As explained in ooni/netem#40, netem used to
generate on the fly certificates for any host.

I then discovered that this behavior is not desirable because the
internet doesn't work like that. Specifically, TLS dialing to, say,
www.example.com with www.google.com as the SNI must return a TLS error
(`ssl_invalid_hostname` in OONI).

This wrong behavior of netem has become a bottleneck for writing new
tests for the beacons functionality, so it must change.

I have already changed netem and this diff updates the probe-cli tree to
use a netem version that behaves more correctly.

While there, I noticed that sniblocking tests were wrong because of the
previous netem behavior and asserted that the control should return a
nil failure, while it should have been `ssl_invalid_hostname`.

Part of ooni/probe#2531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant