mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 04:09:09 +00:00
merged version-check-doesnt-verify-server-cert-1408375
This commit is contained in:
@@ -2763,7 +2763,8 @@ sub _split_url {
|
||||
ref($self->{fh}) eq 'IO::Socket::SSL'
|
||||
or die(qq/SSL connection failed for $host\n/);
|
||||
if ( $self->{fh}->can("verify_hostname") ) {
|
||||
$self->{fh}->verify_hostname( $host, $ssl_verify_args );
|
||||
$self->{fh}->verify_hostname( $host, $ssl_verify_args )
|
||||
or die(qq/SSL certificate not valid for $host\n/);
|
||||
}
|
||||
else {
|
||||
my $fh = $self->{fh};
|
||||
@@ -3285,11 +3286,12 @@ sub version_check {
|
||||
PTDEBUG && _d(scalar @$instances_to_check, 'instances to check');
|
||||
return unless @$instances_to_check;
|
||||
|
||||
my $protocol = 'https'; # optimistic, but...
|
||||
my $protocol = 'https';
|
||||
eval { require IO::Socket::SSL; };
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d($EVAL_ERROR);
|
||||
$protocol = 'http';
|
||||
PTDEBUG && _d("SSL not available, won't run version_check");
|
||||
return;
|
||||
}
|
||||
PTDEBUG && _d('Using', $protocol);
|
||||
|
||||
@@ -3726,6 +3728,11 @@ sub get_from_mysql {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
|
||||
$item->{vars} = ['version_comment', 'version'];
|
||||
}
|
||||
|
||||
|
||||
my @versions;
|
||||
my %version_for;
|
||||
foreach my $instance ( @$instances ) {
|
||||
|
Reference in New Issue
Block a user