Skip to content

Commit

Permalink
[backend] improve getsslcert error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Feb 11, 2013
1 parent 6c49c65 commit 66e5e1f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,15 @@ sub getfollowupsources {
sub getsslcert {
my ($buildinfo, $dir) = @_;
my $server = $buildinfo->{'srcserver'} || $srcserver;
my $res = BSRPC::rpc({
'uri' => "$server/getsslcert",
'timeout' => $gettimeout,
}, undef, "project=$buildinfo->{'project'}", "autoextend=1");
writestr("$dir/_projectcert.crt", undef, $res) if $res;
my $cert;
eval {
$cert = BSRPC::rpc({
'uri' => "$server/getsslcert",
'timeout' => $gettimeout,
}, undef, "project=$buildinfo->{'project'}", "autoextend=1");
};
die("could not retrieve ssl certificate: $@\n") if $@;
writestr("$dir/_projectcert.crt", undef, $cert) if $cert;
}

sub qsystem {
Expand Down

0 comments on commit 66e5e1f

Please sign in to comment.