Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
715bc460
Commit
715bc460
authored
Apr 26, 2010
by
Leigh B Stoller
Browse files
Minor tweak to previous revision; the return value from the
certificate decodingis slightly different by version.
parent
92e97d3f
Changes
4
Hide whitespace changes
Inline
Side-by-side
protogeni/xmlrpc/protogeni-ch.pl.in
View file @
715bc460
...
...
@@ -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;
}
}
...
...
protogeni/xmlrpc/protogeni-cm.pl.in
View file @
715bc460
...
...
@@ -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.
...
...
protogeni/xmlrpc/protogeni-sa.pl.in
View file @
715bc460
...
...
@@ -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
;
}
}
...
...
protogeni/xmlrpc/protogeni-ses.pl.in
View file @
715bc460
...
...
@@ -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
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment