summaryrefslogtreecommitdiff
path: root/tntconfig.cpp
diff options
context:
space:
mode:
authorMatthias Kortstiege <matthias (at) kortstiege (dot) net>2008-12-10 14:51:56 +0100
committerMatthias Kortstiege <matthias (at) kortstiege (dot) net>2008-12-10 14:51:56 +0100
commit4a486de7c9db11591840c451ebb84c3ac1b2e8b9 (patch)
treeccb56ed3b06e1ad6121f04e1cb08418752fa8a12 /tntconfig.cpp
parent1adde56cbfb3fd20736650c4a35e351272545b0d (diff)
downloadvdr-plugin-live-4a486de7c9db11591840c451ebb84c3ac1b2e8b9.tar.gz
vdr-plugin-live-4a486de7c9db11591840c451ebb84c3ac1b2e8b9.tar.bz2
updated ssl patch
Diffstat (limited to 'tntconfig.cpp')
-rw-r--r--tntconfig.cpp29
1 files changed, 8 insertions, 21 deletions
diff --git a/tntconfig.cpp b/tntconfig.cpp
index 71bee4d..23943a5 100644
--- a/tntconfig.cpp
+++ b/tntconfig.cpp
@@ -128,24 +128,6 @@ namespace vdrlive {
for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) {
file << "Listen " << *ip << " " << port << endl;
}
-
-// not used any more see below: #ifdef TNTVERS7
-// not used any more see below: int s_port = LiveSetup().GetServerSslPort();
-// not used any more see below: string s_cert = LiveSetup().GetServerSslCert();
-// not used any more see below:
-// not used any more see below: if (s_cert.empty()) {
-// not used any more see below: s_cert = configDir + "/live.pem";
-// not used any more see below: }
-// not used any more see below:
-// not used any more see below: if ( ifstream( s_cert.c_str() ) ) {
-// not used any more see below: for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) {
-// not used any more see below: file << "SslListen " << *ip << " " << s_port << " " << s_cert << endl;
-// not used any more see below: }
-// not used any more see below: }
-// not used any more see below: else {
-// not used any more see below: esyslog( "ERROR: %s: %s", s_cert.c_str(), strerror( errno ) );
-// not used any more see below: }
-// not used any more see below: #endif
}
#endif
@@ -277,18 +259,23 @@ namespace vdrlive {
#if TNTSSLSUPPORT
int s_port = LiveSetup().GetServerSslPort();
string s_cert = LiveSetup().GetServerSslCert();
+ string s_key = LiveSetup().GetServerSslKey();
if (s_cert.empty()) {
s_cert = configDir + "/live.pem";
}
- if ( ifstream( s_cert.c_str() ) ) {
+ if (s_key.empty()) {
+ s_key = configDir + "/live-key.pem";
+ }
+
+ if ( ifstream( s_cert.c_str() ) && ifstream( s_key.c_str() ) ) {
for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) {
- app.sslListen(s_cert, s_cert, *ip, s_port);
+ app.sslListen(s_cert, s_key, *ip, s_port);
}
}
else {
- esyslog( "ERROR: %s: %s", s_cert.c_str(), strerror( errno ) );
+ esyslog( "ERROR: Unable to load cert/key (%s/%s): %s", s_cert.c_str(), s_key.c_str(), strerror( errno ) );
}
#endif // TNTSSLSUPPORT