Project

General

Profile

Feature #8434

Automatically test that Tails Upgrader rejects valid certificates for the wrong hostname

Added by intrigeri over 4 years ago. Updated over 4 years ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Test suite
Target version:
-
Start date:
12/14/2014
Due date:
% Done:

0%

Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Upgrader

Description

In features/download_upgrade-description_file/Download_Upgrade-Description_File.feature, we test some invalid certificate cases, but we don't test that a valid certificate for a wrong hostname is rejected. We should.

Implementation-wise, we could:

  • either get ourselves a valid certificate for a test-only hostname (both the public and private keys will be in our iuk Git repo); this requires the least amount of divergence between the code being tested and the code run in production;
  • or use something like TLSPretense, that can generate various kinds of flawed certificates on the fly; it requires adding a CA used by TLSPretense to the list of those trusted by the client; it adds firewall rules to intercept the network traffic

History

#1 Updated by intrigeri over 4 years ago

I just double-checked the code, and we set CURLOPT_SSL_VERIFYPEER to 1 and CURLOPT_SSL_VERIFYHOST to 2, so it should be fine, but still: the Perl bindings might be flawed, or something => it's still worth testing automatically.

#2 Updated by BitingBird over 4 years ago

  • Category set to Test suite

That's for the Test suite, right?

Also available in: Atom PDF