From 619d5a1347cf7f557b373312b6f24a82af4cedd9 Mon Sep 17 00:00:00 2001 From: peavey Date: Fri, 20 Jul 2007 22:06:14 +0000 Subject: Fix gnutls cert generation failing. Thx owine. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7479 e03df62e-2008-0410-955e-edbf42e46eb7 --- configure | 8 ++++---- make/gnutlscert.pm | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configure b/configure index a99b248b3..db6602bae 100755 --- a/configure +++ b/configure @@ -747,14 +747,14 @@ if ($config{USE_GNUTLS} eq "y") { * few times and get that HD going :) Then answer the * * Questions which follow. If you are unsure, just hit enter * *************************************************************\n\n"; - make_gnutls_cert() or $failed = 1; - if (!$failed) { + $failed = make_gnutls_cert(); + if ($failed) { + print "\n\033[1;32mCertificate generation failed!\033[0m\n\n"; + } else { print "\nCertificate generation complete, copying to config directory... "; system("mv key.pem $config{CONFIG_DIR}/key.pem"); system("mv cert.pem $config{CONFIG_DIR}/cert.pem"); print "Done.\n\n"; - } else { - print "\n\033[1;32mCertificate generation failed!\033[0m\n\n"; } } else { diff --git a/make/gnutlscert.pm b/make/gnutlscert.pm index 517e08b1f..902555fce 100644 --- a/make/gnutlscert.pm +++ b/make/gnutlscert.pm @@ -106,9 +106,10 @@ ocsp_signing_key time_stamping_key __END__ close(FH); -system("certtool --generate-privkey --outfile key.pem") or return 1; -system("certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem --template certtool.template") or return 1; +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; } 1; -- cgit v1.2.3