Commit 715bc460 authored by Leigh B Stoller's avatar Leigh B Stoller

Minor tweak to previous revision; the return value from the

certificate decodingis slightly different by version.
parent 92e97d3f
......@@ -157,7 +157,8 @@ if (exists($ENV{'SSL_CLIENT_CERT'})) {
XMLError(-1, "Error decoding certificate:" . $decoded->error);
}
foreach my $tmp (@{ $decoded->SubjectAltName }) {
if ($tmp =~ /^uniformResourceIdentifier=(.*)$/) {
if ($tmp =~ /^uniformResourceIdentifier=(.*)$/ ||
$tmp =~ /^(urn:.*)$/) {
$ENV{'GENIURN'} = $1;
}
}
......
......@@ -163,7 +163,8 @@ if (exists($ENV{'SSL_CLIENT_CERT'})) {
XMLError(-1, "Error decoding certificate:" . $decoded->error);
}
foreach my $tmp (@{ $decoded->SubjectAltName }) {
if ($tmp =~ /^uniformResourceIdentifier=(.*)$/) {
if ($tmp =~ /^uniformResourceIdentifier=(.*)$/ ||
$tmp =~ /^(urn:.*)$/) {
$ENV{'GENIURN'} = $1;
}
}
......@@ -249,10 +250,7 @@ elsif ($VERSION eq "2.0") {
},);
}
else {
my $decoder = Frontier::RPC2->new();
print "Content-Type: text/xml \n\n";
print $decoder->encode_fault(-3, "Invalid API Version");
exit(0);
XMLError(-3, "Invalid API Version");
}
#
......@@ -279,14 +277,6 @@ my $response = $responder->{'_decode'}->serve($request,
# Add stuff for log message if sent.
AddAuditInfo("message", $response . "\n\n" . $request);
# When debugging on, generate some output so email is sent.
if ($debug) {
my $decoder = Frontier::RPC2->new();
my $object = $decoder->decode($response);
my $value = $object->{'value'};
print STDERR Dumper($value);
}
#
# Terminate the log capture so that we can print the response to STDOUT
# for the web server.
......
......@@ -157,7 +157,8 @@ if (exists($ENV{'SSL_CLIENT_CERT'})) {
XMLError(-1, "Error decoding certificate:" . $decoded->error);
}
foreach my $tmp (@{ $decoded->SubjectAltName }) {
if ($tmp =~ /^uniformResourceIdentifier=(.*)$/) {
if ($tmp =~ /^uniformResourceIdentifier=(.*)$/ ||
$tmp =~ /^(urn:.*)$/) {
$ENV{'GENIURN'} = $1;
}
}
......
......@@ -154,7 +154,8 @@ if (exists($ENV{'SSL_CLIENT_CERT'})) {
XMLError(-1, "Error decoding certificate:" . $decoded->error);
}
foreach my $tmp (@{ $decoded->SubjectAltName }) {
if ($tmp =~ /^uniformResourceIdentifier=(.*)$/) {
if ($tmp =~ /^uniformResourceIdentifier=(.*)$/ ||
$tmp =~ /^(urn:.*)$/) {
$ENV{'GENIURN'} = $1;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment