summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure19
-rw-r--r--make/gnutlscert.pm5
2 files changed, 15 insertions, 9 deletions
diff --git a/configure b/configure
index fca38ccb9..0a5674722 100755
--- a/configure
+++ b/configure
@@ -713,13 +713,18 @@ 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();
- 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 "SSL Certificates found, skipping.\n\n"
+ make_gnutls_cert() or $failed = 1;
+ if (!$failed) {
+ 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 {
+ print "SSL Certificates found, skipping.\n\n";
}
}
else
diff --git a/make/gnutlscert.pm b/make/gnutlscert.pm
index a28131f3e..517e08b1f 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");
-system("certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem --template certtool.template");
+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;
unlink("certtool.template");
}
1;
+