Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Extract certificate extraction utility out into a separate project an…
…d replace it in this project by the corresponding built .jar file.
  • Loading branch information
iay committed Aug 21, 2009
1 parent 59fa0cc commit 2ec8048
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .classpath
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
35 changes: 35 additions & 0 deletions 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;
5 changes: 3 additions & 2 deletions 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);
Expand Down Expand Up @@ -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.
Expand Down
Binary file added tools/extractcert/lib/sdss-extractcert-1.0.jar
Binary file not shown.

0 comments on commit 2ec8048

Please sign in to comment.