From 56cde817e033c6235cc6a846c90fd143ffb2a0ad Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 28 Nov 2012 16:02:21 +0000 Subject: Fix GnuTLS certificate generation on OS X. --- make/gnutlscert.pm | 10 ++++++++-- 1 file 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; } -- cgit v1.2.3