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
4c2cfe67
Commit
4c2cfe67
authored
May 28, 2014
by
Leigh B Stoller
Browse files
Fix how we store chained certs in tickets.
parent
e92c073a
Changes
2
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCertificate.pm.in
View file @
4c2cfe67
#
!/usr/bin/perl -wT
#
#
Copyright
(
c
)
2008
-
201
3
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2008
-
201
4
University
of
Utah
and
the
Flux
Group
.
#
#
{{{
GENIPUBLIC
-
LICENSE
#
...
...
@@ -662,9 +662,7 @@ sub PipeTo($$$)
#
# Write the certificate to the child.
#
print CHILD "-----BEGIN CERTIFICATE-----\n";
print CHILD $self->cert();
print CHILD "-----END CERTIFICATE-----\n";
print CHILD $self->toString();
if ($withkey && $self->privkey()) {
print CHILD "-----BEGIN RSA PRIVATE KEY-----\n";
print CHILD $self->privkey();
...
...
@@ -732,9 +730,7 @@ sub WriteToFile($;$)
# We want this file to be passed back.
my ($tempfile, $filename) = tempfile(UNLINK => 1);
print $tempfile "-----BEGIN CERTIFICATE-----\n";
print $tempfile $self->cert();
print $tempfile "-----END CERTIFICATE-----\n";
print $tempfile $self->toString();
if ($withkey && $self->privkey()) {
print $tempfile "-----BEGIN RSA PRIVATE KEY-----\n";
...
...
@@ -752,6 +748,18 @@ sub WriteToFile($;$)
return $filename;
}
sub toString($)
{
my ($self) = @_;
my $string = "";
$string .= "-----BEGIN CERTIFICATE-----\n";
$string .= $self->cert();
$string .= "-----END CERTIFICATE-----\n";
return $string;
}
#
# The URL is buried in an extension so we have to parse the text output.
#
...
...
@@ -1250,7 +1258,8 @@ sub URL($) { return undef; }
sub
URN
($)
{
return
field
($
_
[
0
],
"urn"
);
}
sub
certfile
($)
{
return
undef
;
}
sub
GetCertificate
($)
{
return
$
_
[
0
];
}
sub
WriteToFile
($$)
{
return
GeniCertificate
::
WriteToFile
($
_
[
0
],
$
_
[
1
]);
}
sub
WriteToFile
($$)
{
return
GeniCertificate
::
WriteToFile
($
_
[
0
],
$
_
[
1
]);
}
sub
toString
($)
{
return
GeniCertificate
::
toString
($
_
[
0
]);
}
#
#
Need
to
add
DN
to
the
emulab
table
.
#
...
...
protogeni/lib/GeniTicket.pm.in
View file @
4c2cfe67
#
!/usr/bin/perl -wT
#
#
Copyright
(
c
)
2008
-
201
3
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2008
-
201
4
University
of
Utah
and
the
Flux
Group
.
#
#
{{{
GENIPUBLIC
-
LICENSE
#
...
...
@@ -766,8 +766,8 @@ sub RunSigner($$)
my $idx = $self->seqno();
my $expires = $self->redeem_before();
my $target_cert = $self->target_cert()->
cert
();
my $owner_cert = $self->owner_cert()->
cert
();
my $target_cert = $self->target_cert()->
toString
();
my $owner_cert = $self->owner_cert()->
toString
();
my $ticket_uuid = $self->{'
ticket_uuid
'};
my $rspec_xml = GeniXML::Serialize($self->rspec());
...
...
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