summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-25 16:41:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-25 16:41:24 +0000
commitd7079f8b69f23f8aba981e2e6f4c13618b7f04c7 (patch)
treed707dd665ad7345724e85b13358b3445f0cbcc60
parentcdaf7ac3781a0ea1bfbfac85c4a428ddea7725f9 (diff)
Properly check that existing key resides in conf/ and not current dir
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2890 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-xconfigure8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure b/configure
index 971ba6e10..1a0e47181 100755
--- a/configure
+++ b/configure
@@ -566,9 +566,9 @@ print "\033[0mMultithread DNS:\033[1;32m\t\t$config{THREADED_DNS}\033[0m\n\n";
if ($config{USE_GNUTLS} eq "y") {
`cp src/modules/extra/m_ssl_gnutls.cpp src/modules/m_ssl_gnutls.cpp`;
$failed = 0;
- open(TMP, "key.pem") or $failed = 1;
+ open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
close(TMP);
- open(TMP, "cert.pem") or $failed = 1;
+ open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
close(TMP);
if ($failed) {
print "SSL Certificates Not found, Generating.. \n\n
@@ -582,8 +582,8 @@ if ($config{USE_GNUTLS} eq "y") {
system("certtool --generate-privkey --outfile key.pem");
system("certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem");
print "\nCertificate generation complete, copying to config directory... ";
- `cp key.pem $config{CONFIG_DIR}/key.pem`;
- `cp cert.pem $config{CONFIG_DIR}/cert.pem`;
+ `mv key.pem $config{CONFIG_DIR}/key.pem`;
+ `mv cert.pem $config{CONFIG_DIR}/cert.pem`;
print "Done.\n\n";
} else {
print "SSL Certificates found, skipping."