]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix gnutls cert generation failing. Thx owine.
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 20 Jul 2007 22:06:14 +0000 (22:06 +0000)
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 20 Jul 2007 22:06:14 +0000 (22:06 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7479 e03df62e-2008-0410-955e-edbf42e46eb7

configure
make/gnutlscert.pm

index a99b248b33312a1283f3b5dc21211dbf2f527c6e..db6602bae90aada74bf1d88a03d457f8a5fa6219 100755 (executable)
--- 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";
 * 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";
                                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 {
                        }
                }
                else {
index 517e08b1faaa826e8ceb3ff38082fa57cef460fc..902555fce7b478471f428df4f1a6b6929b5d282c 100644 (file)
@@ -106,9 +106,10 @@ ocsp_signing_key
 time_stamping_key
 __END__
 close(FH);
 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");
 unlink("certtool.template");
+return 0;
 }
 
 1;
 }
 
 1;