diff --git a/build/Xalan.pm b/build/Xalan.pm deleted file mode 100755 index be9cbb50..00000000 --- a/build/Xalan.pm +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/perl -w - -# -# Simplified access to the Xalan XSLT processor. -# - -# -# xalanCall -# -# Provides the stem of a "system" call string to access Xalan with the -# required extensions. -# -sub xalanCall -{ - my $xalanRoot = "../tools/xalan"; - - my $res = "java"; - - # Endorsed Xalan and Xerces - $res .= " -Djava.endorsed.dirs=$xalanRoot/endorsed"; - - # Classpath - my $classpath = ''; - while (glob "$xalanRoot/lib/*") { - $classpath .= ':' unless $classpath eq ''; - $classpath .= $_; - } - - $res .= " -cp $classpath"; - - # Class to invoke - $res .= " org.apache.xalan.xslt.Process"; - $res; -} - -#print ">>>" . xalanCall . "<<<\n"; - -1; diff --git a/build/check_entity.pl b/build/check_entity.pl index f891783c..50003122 100755 --- a/build/check_entity.pl +++ b/build/check_entity.pl @@ -1,5 +1,4 @@ #!/usr/bin/perl -w -use Xalan; use File::Temp qw(tempfile); use Date::Parse; use Digest::SHA1 qw(sha1 sha1_hex sha1_base64); @@ -28,16 +27,16 @@ # temporary file $temp = '../xml/embedded.pem'; unlink($temp) if -e $temp; - + # extract embedded certificates - open(EXTRACT, xalanCall . " -IN $fn -OUT $temp -XSL extract_embedded.xsl|") + open(EXTRACT, "xsltproc --output $temp extract_embedded.xsl $fn|") || die "could not open certificate extract process"; while () { print $_; } close EXTRACT; die "no embedded certificates extracted" unless -e $temp; - + # check embedded certificates open(CHECK, "cd ../xml; perl ../build/check_embedded.pl <$temp|") || die "could not open certificate check process"; @@ -47,7 +46,7 @@ print $_; } close CHECK; - + # clean up unlink($temp) if -e $temp; } diff --git a/build/extract_locs.pl b/build/extract_locs.pl index a516194d..97fa27c9 100755 --- a/build/extract_locs.pl +++ b/build/extract_locs.pl @@ -1,8 +1,6 @@ #!/usr/bin/perl -w -use Xalan; - -open(XML, xalanCall . " -IN ../mdx/uk/collected.xml -XSL extract_locs.xsl|") || die "could not open input file"; +open(XML, "xsltproc extract_locs.xsl ../mdx/uk/collected.xml|") || die "could not open input file"; while () { chop; if (/^https:\/\/([^\/:]+(:\d+)?)(\/|$)/) { diff --git a/build/extract_locs_edugain.pl b/build/extract_locs_edugain.pl index daf44512..2774e11e 100755 --- a/build/extract_locs_edugain.pl +++ b/build/extract_locs_edugain.pl @@ -1,8 +1,6 @@ #!/usr/bin/perl -w -use Xalan; - -open(XML, xalanCall . " -IN ../mdx/int_edugain/imported.xml -XSL extract_locs.xsl|") || die "could not open input file"; +open(XML, xalanCall . "xsltproc extract_locs.xsl ../mdx/int_edugain/imported.xml|") || die "could not open input file"; while () { chop; if (/^https:\/\/([^\/:]+(:\d+)?)(\/|$)/) { diff --git a/build/extract_locs_noports.pl b/build/extract_locs_noports.pl index 68eeb366..ed4b925a 100755 --- a/build/extract_locs_noports.pl +++ b/build/extract_locs_noports.pl @@ -1,8 +1,6 @@ #!/usr/bin/perl -w -use Xalan; - -open(XML, xalanCall . " -IN ../mdx/uk/collected.xml -XSL extract_locs.xsl|") || die "could not open input file"; +open(XML, xalanCall . "xsltproc extract_locs.xsl ../mdx/uk/collected.xml|") || die "could not open input file"; while () { chop; if (/^https:\/\/([^\/:]+)(:\d+)?(\/|$)/) { diff --git a/build/probe_certs.pl b/build/probe_certs.pl index 5772c566..58f553fa 100755 --- a/build/probe_certs.pl +++ b/build/probe_certs.pl @@ -1,10 +1,9 @@ #!/usr/bin/perl -w use ExtractCert; -use Xalan; print "Loading endpoint locations...\n"; -open(XML, xalanCall . " -IN ../xml/ukfederation-metadata.xml -XSL extract_cert_locs.xsl|") || die "could not open input file"; +open(XML, "xsltproc extract_cert_locs.xsl ../xml/ukfederation-metadata.xml|") || die "could not open input file"; while () { if (/^http:/) { print "skipping http location: $_"; @@ -37,7 +36,7 @@ # Remove any old copy of the DER file. # unlink $temp_der; - + # # Separate location into host and port. # @@ -58,7 +57,7 @@ $failed{$loc} = 1; next; } - + # # Use openssl to convert the certificate to text # @@ -75,7 +74,7 @@ $subject = $1; } } - + if ($subject eq $issuer) { $issuer = "(self-signed certificate)"; } @@ -101,7 +100,7 @@ print "$n: $issuer\n"; foreach $loc (sort keys %locs) { print " $loc\n"; - } + } } # diff --git a/build/probe_nk_certs.pl b/build/probe_nk_certs.pl index 36554355..337e3e66 100755 --- a/build/probe_nk_certs.pl +++ b/build/probe_nk_certs.pl @@ -3,7 +3,6 @@ use POSIX qw(floor); use Date::Parse; use ExtractCert; -use Xalan; sub error { my($s) = @_; @@ -28,7 +27,7 @@ sub comment { my $longExpiredDays = 30*3; # about three months print "Loading endpoint locations...\n"; -open(XML, xalanCall . " -IN ../xml/ukfederation-metadata.xml -XSL extract_nk_cert_locs.xsl|") || die "could not open input file"; +open(XML, "xsltproc extract_nk_cert_locs.xsl ../xml/ukfederation-metadata.xml|") || die "could not open input file"; while () { my ($entity, $url) = split; if ($url =~ /^https:\/\/([^\/:]+(:\d+)?)\//) { @@ -61,7 +60,7 @@ sub comment { # Remove any old copy of the DER file. # unlink $temp_der; - + # # Separate location into host and port. # @@ -82,7 +81,7 @@ sub comment { $failed{$loc} = 1; next; } - + # # Use openssl to convert the certificate to text # @@ -122,7 +121,7 @@ sub comment { } next; } - + if (/Not After : (.*)$/) { $notAfter = $1; $notAfterTime = str2time($notAfter); @@ -143,7 +142,7 @@ sub comment { } } - + if ($pubSize < 2048) { warning("short public key: $pubSize bits, certificate expires $notAfter"); } @@ -173,7 +172,7 @@ sub comment { print "$n: $issuer\n"; foreach $loc (sort keys %locs) { print " $loc\n"; - } + } } # diff --git a/build/probe_nk_nocerts.pl b/build/probe_nk_nocerts.pl index 808f6ac6..07932fb4 100755 --- a/build/probe_nk_nocerts.pl +++ b/build/probe_nk_nocerts.pl @@ -3,7 +3,6 @@ use POSIX qw(floor); use Date::Parse; use ExtractCert; -use Xalan; sub error { my($s) = @_; @@ -30,7 +29,7 @@ sub comment { my $longExpiredDays = 30*3; # about three months print "Loading endpoint locations...\n"; -open(XML, xalanCall . " -IN ../xml/ukfederation-metadata.xml -XSL extract_nk_nocert_locs.xsl|") || die "could not open input file"; +open(XML, "xsltproc extract_nk_nocert_locs.xsl ../xml/ukfederation-metadata.xml|") || die "could not open input file"; while () { my ($entity, $url) = split; if ($url =~ /^https:\/\/([^\/:]+(:\d+)?)(\/|$)/) { @@ -62,12 +61,12 @@ sub comment { my $entity = $locations{$loc}; print "$count: probing $entity: $loc\n"; $count--; - + # # Remove any old copy of the DER file. # unlink $temp_der; - + # # Separate location into host and port. # @@ -88,7 +87,7 @@ sub comment { $failed{$loc} = 1; next; } - + # # Use openssl to convert the certificate to text # @@ -128,7 +127,7 @@ sub comment { } next; } - + if (/Not After : (.*)$/) { $notAfter = $1; $notAfterTime = str2time($notAfter); @@ -179,7 +178,7 @@ sub comment { print "$n: $issuer\n"; foreach $loc (sort keys %locs) { print " $loc\n"; - } + } } # diff --git a/build/probe_nocerts.pl b/build/probe_nocerts.pl index fbb0771c..cd6f5d8d 100755 --- a/build/probe_nocerts.pl +++ b/build/probe_nocerts.pl @@ -1,12 +1,11 @@ #!/usr/bin/perl -w use ExtractCert; -use Xalan; $known_bad{'census.data-archive.ac.uk:8080'} = 1; # it is really http, not https print "Loading endpoint locations...\n"; -open(XML, xalanCall . " -IN ../xml/ukfederation-metadata.xml -XSL extract_nocert_locs.xsl|") || die "could not open input file"; +open(XML, "xsltproc extract_nocert_locs.xsl ../xml/ukfederation-metadata.xml|") || die "could not open input file"; while () { chop; if (/^http:/) { @@ -39,12 +38,12 @@ foreach $loc (sort keys %locations) { print "$count: probing: $loc\n"; $count--; - + # # Remove any old copy of the DER file. # unlink $temp_der; - + # # Separate location into host and port. # @@ -65,7 +64,7 @@ $failed{$loc} = 1; next; } - + # # Use openssl to convert the certificate to text # @@ -108,7 +107,7 @@ print "$n: $issuer\n"; foreach $loc (sort keys %locs) { print " $loc\n"; - } + } } # diff --git a/build/probe_openssl.pl b/build/probe_openssl.pl index d71e759a..1b2e83cb 100755 --- a/build/probe_openssl.pl +++ b/build/probe_openssl.pl @@ -1,12 +1,11 @@ #!/usr/bin/perl -w use ExtractCert; -use Xalan; $known_bad{'census.data-archive.ac.uk:8080'} = 1; # it is really http, not https print "Loading endpoint locations...\n"; -open(XML, xalanCall . " -IN ../xml/ukfederation-metadata.xml -XSL extract_nocert_locs.xsl|") || die "could not open input file"; +open(XML, "xsltproc extract_nocert_locs.xsl ../xml/ukfederation-metadata.xml|") || die "could not open input file"; while () { chop; if (/^http:/) { @@ -39,12 +38,12 @@ foreach $loc (sort keys %locations) { print "$count: probing: $loc\n"; $count--; - + # # Remove any old copy of the DER file. # unlink $temp_der; - + # # Separate location into host and port. #