Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove outdated ca-bundle.crt and use system default #116 #129

Merged
merged 3 commits into from
Nov 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion default/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ nobase_nodist_default_DATA = \
list_aliases.tt2
nobase_default_DATA = \
auth.conf \
ca-bundle.crt \
charset.conf \
crawlers_detection.conf \
create_list.conf \
Expand Down
3,352 changes: 0 additions & 3,352 deletions default/ca-bundle.crt

This file was deleted.

21 changes: 0 additions & 21 deletions src/lib/Conf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -825,21 +825,6 @@ sub checkfiles {
}
}

## Check cafile and capath access
if (defined $Conf{'cafile'} && $Conf{'cafile'}) {
unless (-f $Conf{'cafile'} && -r $Conf{'cafile'}) {
$log->syslog('err', 'Cannot access cafile %s', $Conf{'cafile'});
$config_err++;
}
}

if (defined $Conf{'capath'} && $Conf{'capath'}) {
unless (-d $Conf{'capath'} && -x $Conf{'capath'}) {
$log->syslog('err', 'Cannot access capath %s', $Conf{'capath'});
$config_err++;
}
}

# Check if directory parameters point to the same directory.
my @keys = qw(bounce_path etc home
queue queueauth queuebounce queuebulk queuedigest
Expand Down Expand Up @@ -1907,12 +1892,6 @@ sub _infer_server_specific_parameter_values {

$param->{'config_hash'}{'robot_name'} = '';

unless ((defined $param->{'config_hash'}{'cafile'})
|| (defined $param->{'config_hash'}{'capath'})) {
$param->{'config_hash'}{'cafile'} =
Sympa::Constants::DEFAULTDIR . '/ca-bundle.crt';
}

unless (
Sympa::Tools::Data::smart_eq(
$param->{'config_hash'}{'dkim_feature'}, 'on'
Expand Down
1 change: 0 additions & 1 deletion src/lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ nobase_modules_DATA = \
Sympa/DatabaseManager.pm \
Sympa/Datasource.pm \
Sympa/Family.pm \
Sympa/Fetch.pm \
Sympa/HTML/FormatText.pm \
Sympa/HTMLDecorator.pm \
Sympa/HTMLSanitizer.pm \
Expand Down
21 changes: 4 additions & 17 deletions src/lib/Sympa/DatabaseDriver/LDAP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,6 @@ sub _connect {
$log->syslog('err', 'Can\'t load IO::Socket::SSL');
return undef;
}

# Earlier releases of IO::Socket::SSL would fallback SSL_verify_mode
# to SSL_VERIFY_NONE when there are no usable CAfile nor CApath.
# However, recent releases won't: They simply deny connection.
# As a workaround, make ca_file or ca_path parameter mandatory unless
# "none" is explicitly assigned to ca_verify parameter.
unless ($self->{ca_verify} and $self->{ca_verify} eq 'none') {
unless ($self->{ca_file} or $self->{ca_path}) {
$log->syslog('err',
'Neither ca_file nor ca_path parameter is specified');
return undef;
}
}
}

# new() with multiple alternate hosts needs perl-ldap >= 0.27.
Expand All @@ -105,8 +92,8 @@ sub _connect {
: ($self->{ca_verify} eq 'required') ? 'require'
: $self->{ca_verify}
),
capath => $self->{'ca_path'},
cafile => $self->{'ca_file'},
($self->{'ca_path'} ? (capath => $self->{'ca_path'}) : ()),
($self->{'ca_file'} ? (cafile => $self->{'ca_file'}) : ()),
sslversion => $self->{'ssl_version'},
ciphers => $self->{'ssl_ciphers'},
clientcert => $self->{'ssl_cert'},
Expand All @@ -132,8 +119,8 @@ sub _connect {
: ($self->{ca_verify} eq 'required') ? 'require'
: $self->{ca_verify}
),
capath => $self->{'ca_path'},
cafile => $self->{'ca_file'},
($self->{'ca_path'} ? (capath => $self->{'ca_path'}) : ()),
($self->{'ca_file'} ? (cafile => $self->{'ca_file'}) : ()),
sslversion => $self->{'ssl_version'},
ciphers => $self->{'ssl_ciphers'},
clientcert => $self->{'ssl_cert'},
Expand Down
214 changes: 0 additions & 214 deletions src/lib/Sympa/Fetch.pm

This file was deleted.

Loading