From c9cf025fadfe043f0f2f679e10d1207d8a158bb6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:01:31 +0200 Subject: Adding debian version 2.4.57-2. Signed-off-by: Daniel Baumann --- .../perl-framework/t/htdocs/modules/cgi/ocsp.pl.PL | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 debian/perl-framework/t/htdocs/modules/cgi/ocsp.pl.PL (limited to 'debian/perl-framework/t/htdocs/modules/cgi/ocsp.pl.PL') diff --git a/debian/perl-framework/t/htdocs/modules/cgi/ocsp.pl.PL b/debian/perl-framework/t/htdocs/modules/cgi/ocsp.pl.PL new file mode 100644 index 0000000..efdbe8b --- /dev/null +++ b/debian/perl-framework/t/htdocs/modules/cgi/ocsp.pl.PL @@ -0,0 +1,78 @@ +use File::Temp qw/:POSIX/; + +my $caroot = $ENV{SSL_CA_ROOT}; + +if (! -d $caroot) { + print <', "$filein") or die "Could not open file '$filein' for write: $!"; +binmode IN; +print IN ; +close(IN); + +my $cmd = 'openssl ocsp -CA certs/ca.crt'. + ' -index index.txt'. + ' -rsigner certs/server.crt'. + ' -rkey keys/server.pem'. + ' -reqin ' . $filein . + ' -respout ' . $fileout; +system($cmd); + +# Check system result +my $err = ''; +if ($? == -1) { + my $err = "failed to execute '$cmd': $!\n"; +} +elsif ($? & 127) { + my $err = sprintf("child '$cmd' died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'); +} +else { + my $rc = $? >> 8; + my $err = "child '$cmd' exited with value $rc\n" if $rc; +} + +unlink($filein); + +if ($err ne '') { + print <; +close(OUT); +unlink($fileout); -- cgit v1.2.3