Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
b8a9c13f
Commit
b8a9c13f
authored
Nov 09, 2010
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do a better job of trying to figure the caller context so that we can
look for an existing credential in the table.
parent
2fafb77e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
protogeni/lib/GeniRegistry.pm.in
protogeni/lib/GeniRegistry.pm.in
+24
-7
No files found.
protogeni/lib/GeniRegistry.pm.in
View file @
b8a9c13f
...
...
@@ -909,14 +909,31 @@ sub GetCredential($;$$)
{
my
($
class
,
$
context
,
$
certfile
)
=
@
_
;
$
context
=
Genixmlrpc
->
GetContext
()
if
(
!defined($context));
#
#
If
there
is
no
UUID
in
the
environment
,
then
try
to
figure
it
#
out
from
the
context
.
#
my
$
myuuid
=
(
exists
($
ENV
{
'MYUUID'
})
?
$
ENV
{
'MYUUID'
}
:
undef
);
if
(
!defined($myuuid) && defined($context)) {
$
myuuid
=
$
context
->
certificate
()->
uuid
();
}
if
(
!defined($myuuid)) {
print
STDERR
"*** GeniRegistry::ClearingHouse::GetCredential: "
.
"No context or MYUUID for RPC
\n
"
;
return
undef
;
}
my
$
clearinghousecert
=
GeniRegistry
::
ClearingHouse
->
GetCertificate
();
if
(
!defined($clearinghousecert)) {
return
undef
;
}
my
$
clearinghousecred
=
GeniCredential
->
Lookup
($
clearinghousecert
->
uuid
(),
$
ENV
{
'MYUUID'
}
);
GeniCredential
->
Lookup
($
clearinghousecert
->
uuid
(),
$
myuuid
);
#
print
"$clearinghousecred
\n
"
;
#
print
"$clearinghousecred
\n
"
if
(
defined
($
clearinghousecred
))
;
if
(
defined
($
clearinghousecred
)
&&
defined
($
clearinghousecred
->
expires
()))
{
...
...
@@ -931,9 +948,6 @@ sub GetCredential($;$$)
}
#
print
STDERR
"Getting new clearinghouse credential
\n
"
;
$
context
=
Genixmlrpc
->
GetContext
()
if
(
!defined($context));
my
$
url
=
$
clearinghousecert
->
URL
();
if
(
!defined($url)) {
print
STDERR
"No URI extension in $clearinghousecert
\n
"
;
...
...
@@ -957,8 +971,11 @@ sub GetCredential($;$$)
print
STDERR
"Could not parse credential from clearinghouse
\n
"
;
return
undef
;
}
$
clearinghousecred
->
Store
();
if
($
clearinghousecred
->
Store
())
{
print
STDERR
"*** GeniRegistry::ClearingHouse::GetCredential: "
.
"Could not store credential for clearinghouse
\n
"
;
return
undef
;
}
return
$
clearinghousecred
;
}
...
...
Write
Preview
Markdown
is supported
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