]> git.sesse.net Git - skvidarsync/commitdiff
Cache SSL parameters between runs.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 10 Nov 2023 21:46:05 +0000 (22:46 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 10 Nov 2023 21:46:05 +0000 (22:46 +0100)
bin/sync.pl

index 7e0317eb9550f8e431102fc54b5b4ce08bf6b71d..703b0c58d741b036ffbfed7425c804a345ddbaf1 100644 (file)
@@ -10,12 +10,18 @@ use POSIX;
 use Time::HiRes;
 use IO::Select;
 use Unicode::Collate;
+use IO::Socket::SSL;
 binmode STDOUT, ':utf8';
 binmode STDERR, ':utf8';
 use utf8;
 
 require '../include/config.pm';
 
+my $global_ctx = IO::Socket::SSL::SSL_Context->new(
+       SSL_session_cache_size => 100,  # Probably overkill.
+);
+IO::Socket::SSL::set_default_context($global_ctx);
+
 my @log = ();
 my $uca = Unicode::Collate->new(level => 1);