Mercurial > hg > nginx-tests
comparison h2_ssl.t @ 1860:58951cf933e1
Tests: added has_feature() test for SSL libraries.
This makes it possible to further simplify various SSL tests. It also
avoids direct testing of the $t->{_configure_args} internal field, and
implements proper comparison of version numbers.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 18 May 2023 18:07:06 +0300 |
parents | cdcd75657e52 |
children | f9bb84e4c8e2 |
comparison
equal
deleted
inserted
replaced
1859:5f46af4707e7 | 1860:58951cf933e1 |
---|---|
85 $t->plan(3); | 85 $t->plan(3); |
86 | 86 |
87 ############################################################################### | 87 ############################################################################### |
88 | 88 |
89 SKIP: { | 89 SKIP: { |
90 $t->{_configure_args} =~ /LibreSSL ([\d\.]+)/; | 90 skip 'LibreSSL too old', 1 |
91 skip 'LibreSSL too old', 1 if defined $1 and $1 lt '3.4.0'; | 91 if $t->has_module('LibreSSL') |
92 $t->{_configure_args} =~ /OpenSSL ([\d\.]+)/; | 92 and not $t->has_feature('libressl:3.4.0'); |
93 skip 'OpenSSL too old', 1 if defined $1 and $1 lt '1.1.0'; | 93 skip 'OpenSSL too old', 1 |
94 if $t->has_module('OpenSSL') | |
95 and not $t->has_feature('openssl:1.1.0'); | |
94 | 96 |
95 TODO: { | 97 TODO: { |
96 local $TODO = 'not yet' unless $t->has_version('1.21.4'); | 98 local $TODO = 'not yet' unless $t->has_version('1.21.4'); |
97 | 99 |
98 ok(!get_ssl_socket(['unknown']), 'alpn rejected'); | 100 ok(!get_ssl_socket(['unknown']), 'alpn rejected'); |