summaryrefslogtreecommitdiff
path: root/tntconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tntconfig.cpp')
-rw-r--r--tntconfig.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tntconfig.cpp b/tntconfig.cpp
index 704ae6f..cdc476e 100644
--- a/tntconfig.cpp
+++ b/tntconfig.cpp
@@ -121,6 +121,24 @@ void TntConfig::WriteConfig()
for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) {
file << "Listen " << *ip << " " << port << endl;
}
+
+#ifdef TNTVERS7
+ int s_port = LiveSetup().GetServerSslPort();
+ string s_cert = LiveSetup().GetServerSslCert();
+
+ if (s_cert.empty()) {
+ s_cert = configDir + "/live.pem";
+ }
+
+ if ( ifstream( s_cert.c_str() ) ) {
+ for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) {
+ file << "SslListen " << *ip << " " << s_port << " " << s_cert << endl;
+ }
+ }
+ else {
+ esyslog( "ERROR: %s: %s", s_cert.c_str(), strerror( errno ) );
+ }
+#endif
}
void TntConfig::WriteProperties()