summaryrefslogtreecommitdiff
path: root/make/opensslcert.pm
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2015-05-22 04:22:52 +0100
committerPeter Powell <petpow@saberuk.com>2015-06-15 21:30:27 +0100
commit4e3d7a6e30eadf714483994681b8b2534229f4a8 (patch)
treef33bee73a1b379269da38425fd69fbfed86b8bb0 /make/opensslcert.pm
parent77b5bd0dbc10defcbc6bbc49df9da12d6a61dd8c (diff)
Show a better warning when certtool/openssl are missing.
Diffstat (limited to 'make/opensslcert.pm')
-rw-r--r--make/opensslcert.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/make/opensslcert.pm b/make/opensslcert.pm
index b8c9d164f..1bf27df15 100644
--- a/make/opensslcert.pm
+++ b/make/opensslcert.pm
@@ -32,6 +32,11 @@ our @EXPORT = qw(make_openssl_cert);
sub make_openssl_cert()
{
+ if (system 'openssl version >/dev/null 2>&1')
+ {
+ print "\e[1;31mCertificate generation failed:\e[0m unable to find 'openssl' in the PATH!\n";
+ return;
+ }
open (FH, ">openssl.template");
my $commonname = promptstring_s('What is the hostname of your server?', 'irc.example.com');
my $email = promptstring_s('What email address can you be contacted at?', 'example@example.com');