#!@PERL@
-#
-# A dummy SSL certificate validator helper that
-# echos back all the SSL errors sent by Squid.
-#
use warnings;
use strict;
security_fake_certverify [-d | --debug] [-h | --help]
+=head1 DESCRIPTION
+
+Retrieves the SSL certificate error list from Squid and echo back without any change.
+
+=head1 OPTIONS
+
=over 8
=item B<-h | --help>
=back
-=head1 DESCRIPTION
+=head1 AUTHOR
-Retrieves the SSL certificate error list from squid and echo back without any change.
+This program and documentation was written by
+I<Christos Tsantilas <chtsanti@users.sourceforge.net>>
=head1 COPYRIGHT
- * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
terms of the GNU General Public License version 2, or (at your opinion) any
later version.
+=head1 QUESTIONS
+
+Questions on the usage of this program can be sent to the I<Squid Users mailing list <squid-users@lists.squid-cache.org>>
+
+=head1 REPORTING BUGS
+
+Bug reports need to be made in English.
+See http://wiki.squid-cache.org/SquidFaq/BugReporting for details of what you need to include with your bug report.
+
+Report bugs or bug fixes using http://bugs.squid-cache.org/
+
+Report serious security bugs to I<Squid Bugs <squid-bugs@lists.squid-cache.org>>
+
+Report ideas for new improvements to the I<Squid Developers mailing list <squid-dev@lists.squid-cache.org>>
+
+=head1 SEE ALSO
+
+squid (8), GPL (7),
+
+The Squid FAQ wiki http://wiki.squid-cache.org/SquidFaq
+
+The Squid Configuration Manual http://www.squid-cache.org/Doc/config/
+
=cut
GetOptions(
my @responseErrors = ();
while($readlen < $bodylen) {
- my $t = <>;
+ my $t = <>;
if (defined $t) {
$body = $body . $t;
$readlen = length($body);
print(STDERR logPrefix()."\tFOUND cert ".$key.": ".$certs{$key}->subject() . "\n") if ($debug);
}
- #got the peer certificate ID. Assume that the peer certificate is the first one.
+#got the peer certificate ID. Assume that the peer certificate is the first one.
my $peerCertId = (keys %certs)[0];
- # Echo back the errors: fill the responseErrors array with the errors we read.
+ # Echo back the errors: fill the responseErrors array with the errors we read.
foreach my $err (keys %errors) {
$haserror = 1;
- appendError (\@responseErrors,
- $errors{$err}{"name"}, #The error name
- "Checked by Cert Validator", # An error reason
- $errors{$err}{"cert"} # The cert ID. We are always filling with the peer certificate.
+ appendError (\@responseErrors,
+ $errors{$err}{"name"}, #The error name
+ "Checked by Cert Validator", # An error reason
+ $errors{$err}{"cert"} # The cert ID. We are always filling with the peer certificate.
);
}
sub logPrefix
{
- return strftime("%Y/%m/%d %H:%M:%S.0", localtime)." ".$0." ".$$." | " ;
+ return strftime("%Y/%m/%d %H:%M:%S.0", localtime)." ".$0." ".$$." | " ;
}