summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2012-11-28 16:02:21 +0000
committerattilamolnar <attilamolnar@hush.com>2012-11-28 17:10:22 +0100
commit56cde817e033c6235cc6a846c90fd143ffb2a0ad (patch)
treeeb4225b89d9e210472dbc9f6eb81ea961642ceb9
parent48c73ade31e3d08cd00dd0ade56f5bcc1623b00a (diff)
Fix GnuTLS certificate generation on OS X.
-rw-r--r--make/gnutlscert.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/make/gnutlscert.pm b/make/gnutlscert.pm
index ab8aae427..a67be0cfd 100644
--- a/make/gnutlscert.pm
+++ b/make/gnutlscert.pm
@@ -131,8 +131,14 @@ ocsp_signing_key
time_stamping_key
__END__
close(FH);
-if ( (my $status = system("certtool --generate-privkey --outfile key.pem")) ne 0) { return 1; }
-if ( (my $status = system("certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem --template certtool.template")) ne 0) { return 1; }
+my $certtool = "certtool";
+if (`uname -s` eq "Darwin\n") {
+ # On OS X the certtool binary name is different to prevent
+ # collisions with the system certtool from NSS.
+ $certtool = "gnutls-certtool";
+}
+if ( (my $status = system("$certtool --generate-privkey --outfile key.pem")) ne 0) { return 1; }
+if ( (my $status = system("$certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem --template certtool.template")) ne 0) { return 1; }
unlink("certtool.template");
return 0;
}