line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Cassandra::Client::TLSHandling; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TVDW'; |
3
|
|
|
|
|
|
|
$Cassandra::Client::TLSHandling::VERSION = '0.13_004'; # TRIAL |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
14
|
$Cassandra::Client::TLSHandling::VERSION = '0.13004';use 5.010; |
|
1
|
|
|
|
|
3
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
7
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
72
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# SSLeay needs initialization |
10
|
1
|
|
|
1
|
|
6
|
use Net::SSLeay 1.63 qw/die_now MODE_ENABLE_PARTIAL_WRITE MODE_ACCEPT_MOVING_WRITE_BUFFER/; |
|
1
|
|
|
|
|
19
|
|
|
1
|
|
|
|
|
77
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
1
|
|
|
1
|
|
1308
|
Net::SSLeay::load_error_strings(); |
13
|
1
|
|
|
|
|
77
|
Net::SSLeay::SSLeay_add_ssl_algorithms(); |
14
|
1
|
|
|
|
|
8
|
Net::SSLeay::randomize(); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
811
|
use Devel::GlobalDestruction; |
|
1
|
|
|
|
|
1401
|
|
|
1
|
|
|
|
|
5
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
0
|
|
|
0
|
0
|
|
my ($class)= @_; |
21
|
|
|
|
|
|
|
|
22
|
0
|
0
|
|
|
|
|
my $ctx= Net::SSLeay::CTX_new() or die_now("Unable to create OpenSSL context"); |
23
|
0
|
|
|
|
|
|
my $self= bless \$ctx, $class; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
Net::SSLeay::CTX_set_options($$self, Net::SSLeay::OP_ALL() | Net::SSLeay::OP_NO_SSLv2() | Net::SSLeay::OP_NO_SSLv3()); |
26
|
0
|
|
|
|
|
|
Net::SSLeay::CTX_set_mode($$self, MODE_ENABLE_PARTIAL_WRITE | MODE_ACCEPT_MOVING_WRITE_BUFFER); |
27
|
0
|
|
|
|
|
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub new_conn { |
31
|
0
|
|
|
0
|
0
|
|
my ($self)= @_; |
32
|
0
|
0
|
|
|
|
|
my $tls= Net::SSLeay::new($$self) or die_now("Unable to create OpenSSL SSL object"); |
33
|
0
|
|
|
|
|
|
return bless \$tls, "Cassandra::Client::TLSHandling::conn"; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub DESTROY { |
37
|
0
|
|
|
0
|
|
|
local $@; |
38
|
0
|
0
|
|
|
|
|
return if in_global_destruction; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my $self= shift; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
Net::SSLeay::CTX_free($$self); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
package Cassandra::Client::TLSHandling::conn; |
48
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TVDW'; |
49
|
|
|
|
|
|
|
$Cassandra::Client::TLSHandling::conn::VERSION = '0.13_004'; # TRIAL |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
1
|
|
291
|
$Cassandra::Client::TLSHandling::conn::VERSION = '0.13004';use 5.010; |
|
1
|
|
|
|
|
3
|
|
52
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
53
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
4
|
use Devel::GlobalDestruction; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub DESTROY { |
58
|
0
|
|
|
0
|
|
|
local $@; |
59
|
0
|
0
|
|
|
|
|
return if in_global_destruction; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
my $self= shift; |
62
|
0
|
|
|
|
|
|
Net::SSLeay::free($$self); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |