File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 16
16
17
17
use strict;
18
18
use IO::Socket::INET;
19
- use IO::Socket::SSL;
20
19
use URI::Escape;
21
20
22
21
my $addr = shift ;
@@ -25,6 +24,15 @@ my ($from, $to);
25
24
my $limit ;
26
25
my $unescape = 0;
27
26
27
+ eval {
28
+ if ($addr =~ / ^tls:/ ) {
29
+ require IO::Socket::SSL;
30
+ }
31
+ 1;
32
+ } or do {
33
+ die " IO::Socket::SSL is not available: $@ " ;
34
+ };
35
+
28
36
if ($mode eq " display" ) {
29
37
undef $mode if @ARGV ;
30
38
} elsif ($mode eq " move" ) {
@@ -100,7 +108,7 @@ sub server_connect {
100
108
$sock = IO::Socket::SSL-> new(
101
109
PeerAddr => $addr ,
102
110
Proto => ' tcp' ,
103
- SSL_verify_mode => IO::Socket::SSL:: SSL_VERIFY_NONE,
111
+ SSL_verify_mode => IO::Socket::SSL-> SSL_VERIFY_NONE,
104
112
);
105
113
} else {
106
114
$sock = IO::Socket::INET-> new(
You can’t perform that action at this time.
0 commit comments