comparison ssl_certificates.t @ 1397:d3d2aabe16dd

Tests: LibreSSL client detection in multiple certificate tests. SSL_CTRL_SET_SIGALGS_LIST and TLSv1.3 support are missing from LibreSSL despite high OPENSSL_VERSION_NUMBER. Treat it as pre-1.0.2 OpenSSL client.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 13 Nov 2018 18:29:16 +0300
parents 0090e2476ef0
children 94bcad5611af
comparison
equal deleted inserted replaced
1396:28ddfda3ca2a 1397:d3d2aabe16dd
131 } 131 }
132 132
133 my $ctx = Net::SSLeay::CTX_new() or die("Failed to create SSL_CTX $!"); 133 my $ctx = Net::SSLeay::CTX_new() or die("Failed to create SSL_CTX $!");
134 134
135 if (defined $type) { 135 if (defined $type) {
136 if (Net::SSLeay::SSLeay() < 0x1000200f) { 136 my $ssleay = Net::SSLeay::SSLeay();
137 if ($ssleay < 0x1000200f || $ssleay == 0x20000000) {
137 Net::SSLeay::CTX_set_cipher_list($ctx, $type) 138 Net::SSLeay::CTX_set_cipher_list($ctx, $type)
138 or die("Failed to set cipher list"); 139 or die("Failed to set cipher list");
139 } else { 140 } else {
140 # SSL_CTRL_SET_SIGALGS_LIST 141 # SSL_CTRL_SET_SIGALGS_LIST
141 Net::SSLeay::CTX_ctrl($ctx, 98, 0, $type . '+SHA256') 142 Net::SSLeay::CTX_ctrl($ctx, 98, 0, $type . '+SHA256')