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_007'; # TRIAL |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
13
|
$Cassandra::Client::TLSHandling::VERSION = '0.13007';use 5.010; |
|
1
|
|
|
|
|
2
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
7
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# SSLeay needs initialization |
10
|
1
|
|
|
1
|
|
5
|
use Net::SSLeay 1.63 qw/die_now MODE_ENABLE_PARTIAL_WRITE MODE_ACCEPT_MOVING_WRITE_BUFFER/; |
|
1
|
|
|
|
|
16
|
|
|
1
|
|
|
|
|
75
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
1
|
|
|
1
|
|
1304
|
Net::SSLeay::load_error_strings(); |
13
|
1
|
|
|
|
|
73
|
Net::SSLeay::SSLeay_add_ssl_algorithms(); |
14
|
1
|
|
|
|
|
9
|
Net::SSLeay::randomize(); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
821
|
use Devel::GlobalDestruction; |
|
1
|
|
|
|
|
1395
|
|
|
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_007'; # TRIAL |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
1
|
|
235
|
$Cassandra::Client::TLSHandling::conn::VERSION = '0.13007';use 5.010; |
|
1
|
|
|
|
|
4
|
|
52
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
53
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
5
|
use Devel::GlobalDestruction; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
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__ |