]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix GnuTLS certificate generation on OS X.
authorPeter Powell <petpow@saberuk.com>
Wed, 28 Nov 2012 16:02:21 +0000 (16:02 +0000)
committerattilamolnar <attilamolnar@hush.com>
Wed, 28 Nov 2012 16:10:22 +0000 (17:10 +0100)
make/gnutlscert.pm

index ab8aae4279d1a4d45f251736bff6d5de34510800..a67be0cfdac005981f23c31adb0f5e1bd9a5e330 100644 (file)
@@ -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;
 }