diff --git a/.classpath b/.classpath index fb501163..7cec603d 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,4 @@ - - diff --git a/build/ExtractCert.pm b/build/ExtractCert.pm new file mode 100755 index 00000000..ceb0c10c --- /dev/null +++ b/build/ExtractCert.pm @@ -0,0 +1,35 @@ +#!/usr/bin/perl -w + +# +# Simplified access to the ExtractCert utility. +# + +# +# extractCertCall +# +# Provides the stem of a "system" call string to access ExtractCert with the +# required extensions. +# +sub extractCertCall +{ + my $extractCertRoot = "../tools/extractcert"; + + my $res = "java"; + + # Classpath + my $classpath = ''; + while (glob "$extractCertRoot/lib/*") { + $classpath .= ':' unless $classpath eq ''; + $classpath .= $_; + } + + $res .= " -cp $classpath"; + + # Class to invoke + $res .= " uk.ac.sdss.extractcert.ExtractCert"; + $res; +} + +print ">>>" . extractCertCall . "<<<\n"; + +1; diff --git a/build/check_locs_list.pl b/build/check_locs_list.pl index 31a40a79..d48416d3 100755 --- a/build/check_locs_list.pl +++ b/build/check_locs_list.pl @@ -1,4 +1,6 @@ #!/usr/bin/perl -w + +use ExtractCert; use File::Temp qw(tempfile); use Date::Parse; use Digest::SHA1 qw(sha1 sha1_hex sha1_base64); @@ -51,8 +53,7 @@ # # Attempt certificate extraction # - system "java -classpath ../bin uk.org.ukfederation.apps.cert.ExtractCert " . - "$host $port $temp_der"; + system extractCertCall . " $host $port $temp_der"; # # If the output file doesn't exist, the extraction failed. diff --git a/tools/extractcert/lib/sdss-extractcert-1.0.jar b/tools/extractcert/lib/sdss-extractcert-1.0.jar new file mode 100644 index 00000000..47d09175 Binary files /dev/null and b/tools/extractcert/lib/sdss-extractcert-1.0.jar differ