Skip to content

Commit

Permalink
Ask the user if they want to generate SSL certificates before generat…
Browse files Browse the repository at this point in the history
…ing one

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11436 e03df62e-2008-0410-955e-edbf42e46eb7
  • Loading branch information
danieldg committed Jul 3, 2009
1 parent 1f1997e commit b9e9af8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions configure
Expand Up @@ -870,13 +870,15 @@ if (($config{USE_OPENSSL} eq "y") && ($config{HAS_OPENSSL} ne "y"))
}
our $failed = 0;

$config{CERTGEN} ||= 'y';
yesno('CERTGEN',"Would you like generate SSL certificates now?") if $config{USE_GNUTLS} eq "y" || $config{USE_OPENSSL} eq "y";

if ($config{USE_GNUTLS} eq "y") {
unless (-r "src/modules/m_ssl_gnutls.cpp") {
print "Symlinking src/modules/m_ssl_gnutls.cpp from extra/\n";
symlink "extra/m_ssl_gnutls.cpp", "src/modules/m_ssl_gnutls.cpp" or print STDERR "Symlink failed: $!";
}
getmodules();
if ($interactive)
if ($interactive && $config{CERTGEN} eq 'y')
{
unless (-r "$config{CONFIG_DIR}/key.pem" && -r "$config{CONFIG_DIR}/cert.pem") {
print "SSL Certificates Not found, Generating.. \n\n
Expand Down Expand Up @@ -912,9 +914,8 @@ if ($config{USE_OPENSSL} eq "y") {
print "Symlinking src/modules/m_ssl_openssl.cpp from extra/\n";
symlink "extra/m_ssl_openssl.cpp", "src/modules/m_ssl_openssl.cpp" or print STDERR "Symlink failed: $!";
}
getmodules();
$failed = 0;
if ($interactive)
if ($interactive && $config{CERTGEN} eq 'y')
{
unless (-r "$config{CONFIG_DIR}/key.pem" && -r "$config{CONFIG_DIR}/cert.pem") {
print "SSL Certificates Not found, Generating.. \n\n
Expand Down

0 comments on commit b9e9af8

Please sign in to comment.