certs moved into modpath

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1142 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2011-12-23 13:21:02 +00:00
parent 211a8ab01a
commit ad8d6806e7
3 changed files with 10 additions and 3 deletions

View File

@@ -208,7 +208,13 @@ FW_Read($)
$selectlist{$nhash{NAME}} = \%nhash;
if($hash->{SSL}) {
my $ret = IO::Socket::SSL->start_SSL($nhash{CD}, { SSL_server=>1, });
# Certs directory must be in the modpath, i.e. at the same level as the FHEM directory
my $mp = AttrVal("global", "modpath", ".");
my $ret = IO::Socket::SSL->start_SSL($nhash{CD}, {
SSL_server => 1,
SSL_key_file => "$mp/certs/server-key.pem",
SSL_cert_file => "$mp/certs/server-cert.pem",
});
Log 1, "FHEMWEB HTTPS: $!" if(!$ret && $! ne "Socket is not connected");
}