Commit 9a89b62a authored by Leigh Stoller's avatar Leigh Stoller

Minor change to previous revision; delimit private key.

parent d53a7dfb
......@@ -693,7 +693,7 @@ my $blob = {'uuid' => $quickvm_uuid,
'servername' => $SERVER_NAME,
'rspec' => $rspecstr,
'cert' => $alt_certificate->cert(),
'privkey' => $alt_certificate->privkey(),
'privkey' => $alt_certificate->PrivKeyDelimited(),
};
if (defined($project)) {
$blob->{"pid"} = $project->pid();
......@@ -1066,7 +1066,8 @@ sub CreateSliver($)
@dataset_credentials
],
"certificate" => $alt_certificate->cert(),
"key" => $alt_certificate->privkey(),
"key" =>
$alt_certificate->PrivKeyDelimited(),
});
if (!defined($response) || $response->code() != GENIRESPONSE_SUCCESS) {
......@@ -1357,7 +1358,7 @@ sub RunStitcher()
print "Provisioning at $urn\n";
if ($aggobj->Provision(\$errmsg, \@sshkeys,
$alt_certificate->cert(),
$alt_certificate->privkey())) {
$alt_certificate->PrivKeyDelimited())) {
$aggobj->SetStatus("failed");
$webtask->output($errmsg);
$webtask->Exited(-1);
......
......@@ -1043,6 +1043,17 @@ sub WriteKeyToFile($)
return $filename;
}
# Hmm, how did we get into this odd state?
sub PrivKeyDelimited($)
{
my ($self) = @_;
return
"-----BEGIN RSA PRIVATE KEY-----\n" .
$self->privkey() .
"-----END RSA PRIVATE KEY-----\n";
}
#
# Find the root certificate for a single certificate. Optional set of
# chain certs provided.
......
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