Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
943e7b53
Commit
943e7b53
authored
Feb 29, 2020
by
IKEDA Soji
Browse files
Data sources: RemoteFile and RemoteDump: Log subject, issuer and cipher of peer.
parent
db8702f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/DataSource/RemoteDump.pm
View file @
943e7b53
...
...
@@ -52,7 +52,6 @@ sub _open {
}
my
$fh
=
$self
->
SUPER::
_open
(
use_cert
=>
1
);
#FIXME: Log subject, issuer and cipher of peer.
return
$fh
;
}
...
...
src/lib/Sympa/DataSource/RemoteFile.pm
View file @
943e7b53
...
...
@@ -97,12 +97,27 @@ sub _open {
$
Conf::
Conf
{'
tmpdir
'},
$list
->
get_id
,
$PID
,
(
int
rand
9999
);
my
$res
=
$ua
->
request
(
$req
,
$self
->
{
_tmpfile
});
$log
->
syslog
('
debug
',
'
REQUEST: %s
',
$req
->
as_string
);
$log
->
syslog
('
debug
',
'
RESPONSE:%s
',
$res
->
as_string
);
unless
(
$res
->
is_success
)
{
$log
->
syslog
('
err
',
'
Unable to fetch data source %s: %s
',
$self
,
$res
->
message
);
return
undef
;
}
if
(
$self
->
{
url
}
=~
/\Ahttps:/i
and
$options
{
use_cert
})
{
# Log subject, issuer and cipher of peer.
$log
->
syslog
(
'
info
',
'
%s: Peer %s. Certificate subject "%s" issuer "%s". Cipher used "%s"
',
$self
,
$res
->
header
('
Client-Peer
'),
$res
->
header
('
Client-SSL-Cert-Subject
'),
$res
->
header
('
Client-SSL-Cert-Issuer
'),
$res
->
header
('
Client-SSL-Cipher
')
);
}
my
$fh
;
unless
(
open
$fh
,
'
<
',
$self
->
{
_tmpfile
})
{
$log
->
syslog
('
err
',
'
Cannot open file %s: %m
',
$self
->
{
_tmpfile
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment