certs moved into modpath

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

View File

@ -26,6 +26,7 @@
- change: JsonList output optimized and more structured
- feature: FHEMWEB save button, smallscreen first screen fix
- feature: FHEMWEB encoding is now UTF-8, alias attribute is respected
- change: HTTPS certs directory moved from cwd into modpath
- 2011-07-08 (5.1)

View File

@ -6711,8 +6711,8 @@ href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">U
apt-get install libio-socket-ssl-perl; the OSX perl already has this
module.<br>
A local certificate has to be generated into a directory called certs,
this directory <b>must</b> be in the working directory (pwd) of fhem,
which is not necessarily the modpath directory. To generate it:
this directory <b>must</b> be in the <a href="#modpath">modpath</a>
directory, at the same level as the FHEM directory.
<ul>
mkdir certs<br>
cd certs<br>

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");
}