From ad132d08918419e3e33d67f4fd15fe1622d071b0 Mon Sep 17 00:00:00 2001 From: Ian Young Date: Mon, 14 Jul 2008 18:00:04 +0000 Subject: [PATCH] Add code to extract all service locations in the metadata for later processing. --- build.xml | 11 ++++++++++ build/extract_locs.pl | 18 ++++++++++++++++ build/extract_locs.xsl | 47 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100755 build/extract_locs.pl create mode 100644 build/extract_locs.xsl diff --git a/build.xml b/build.xml index 46e8c88a..47df1b8f 100644 --- a/build.xml +++ b/build.xml @@ -407,6 +407,17 @@ + + + Extracting TLS locations + + + + + diff --git a/build/extract_locs.pl b/build/extract_locs.pl new file mode 100755 index 00000000..bd2a12f2 --- /dev/null +++ b/build/extract_locs.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl -w + +open(XML,"java -cp ../xalan-j_2_6_0/bin/xalan.jar org.apache.xalan.xslt.Process -IN ../xml/ukfederation-metadata-unsigned.xml -XSL extract_locs.xsl|") || die "could not open input file"; +while () { + chop; + if (/^https:\/\/([^\/:]+(:\d+)?)(\/|$)/) { + my $location = $1; + $location .= ":443" unless defined $2; + $locations{$location} = 1; + } +} +close XML; + +foreach $loc (sort keys %locations) { + if ($loc =~ /([^:]+):(\d+)/) { + print "$1 $2\n"; + } +} diff --git a/build/extract_locs.xsl b/build/extract_locs.xsl new file mode 100644 index 00000000..e1b658df --- /dev/null +++ b/build/extract_locs.xsl @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +