Skip to content

Commit b2ba1a9

Browse files
committed
Tests: workaround for broken TLSv1.3 sigalgs in LibreSSL.
Although RSA certificate selection is currently [1] broken to complete handshake, it happens late after sending all server handshake messages. This is enough for tests to pick up the corresponding certificate type. Workaround is to avoid sending application data resulting in SIGPIPE. [1] openbsd/src@ccf5fc6
1 parent a5e6efa commit b2ba1a9

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

ssl_certificates.t

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ http {
4343
ssl_certificate rsa.crt;
4444
ssl_ciphers DEFAULT:ECCdraft;
4545
46-
add_header X-SSL-Protocol $ssl_protocol;
47-
4846
server {
4947
listen 127.0.0.1:8443 ssl;
5048
server_name localhost;
@@ -85,28 +83,15 @@ foreach my $name ('ec', 'rsa') {
8583
or die "Can't create certificate for $name: $!\n";
8684
}
8785

88-
$t->write_file('index.html', '');
89-
9086
$t->run()->plan(2);
9187

9288
###############################################################################
9389

94-
TODO: {
95-
local $TODO = 'broken TLSv1.3 sigalgs in LibreSSL'
96-
if $t->has_module('LibreSSL') && test_tls13();
97-
9890
like(cert('RSA'), qr/CN=rsa/, 'ssl cert RSA');
99-
100-
}
101-
10291
like(cert('ECDSA'), qr/CN=ec/, 'ssl cert ECDSA');
10392

10493
###############################################################################
10594

106-
sub test_tls13 {
107-
return http_get('/', SSL => 1) =~ /TLSv1.3/;
108-
}
109-
11095
sub cert {
11196
my $s = get_socket(@_) || return;
11297
return $s->dump_peer_certificate();
@@ -128,8 +113,8 @@ sub get_socket {
128113
or die("Failed to set sigalgs");
129114
};
130115

131-
return http_get(
132-
'/', start => 1,
116+
return http(
117+
'', start => 1,
133118
SSL => 1,
134119
SSL_cipher_list => $type,
135120
SSL_create_ctx_callback => $ctx_cb

0 commit comments

Comments
 (0)