"Fossies" - the Fresh Open Source Software Archive

Member "memcached-1.6.15/t/ssl_settings.t" (21 Feb 2022, 992 Bytes) of package /linux/www/memcached-1.6.15.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "ssl_settings.t": 1.6.10_vs_1.6.11.

    1 #!/usr/bin/perl
    2 
    3 use strict;
    4 use warnings;
    5 use Test::More;
    6 use FindBin qw($Bin);
    7 use lib "$Bin/lib";
    8 use MemcachedTest;
    9 use Cwd;
   10 
   11 if (!enabled_tls_testing()) {
   12     plan skip_all => 'SSL testing is not enabled';
   13     exit 0;
   14 }
   15 
   16 my $server = new_memcached();
   17 my $settings = mem_stats($server->sock, ' settings');
   18 
   19 my $cert = getcwd ."/t/". MemcachedTest::SRV_CRT;
   20 my $key = getcwd ."/t/". MemcachedTest::SRV_KEY;
   21 
   22 is($settings->{'ssl_enabled'}, 'yes');
   23 is($settings->{'ssl_session_cache'}, 'no');
   24 is($settings->{'ssl_chain_cert'}, $cert);
   25 is($settings->{'ssl_key'}, $key);
   26 is($settings->{'ssl_verify_mode'}, 0);
   27 is($settings->{'ssl_keyformat'}, 1);
   28 is($settings->{'ssl_ciphers'}, 'NULL');
   29 is($settings->{'ssl_ca_cert'}, 'NULL');
   30 is($settings->{'ssl_wbuf_size'}, 16384);
   31 is($settings->{'ssl_min_version'}, 'tlsv1.2');
   32 
   33 $server->DESTROY();
   34 $server = new_memcached("-o ssl_wbuf_size=64");
   35 $settings = mem_stats($server->sock, ' settings');
   36 is($settings->{'ssl_wbuf_size'}, 65536);
   37 
   38 done_testing();