diff --git a/fhem/FHEM/98_update.pm b/fhem/FHEM/98_update.pm index 422a1433a..743d0711c 100644 --- a/fhem/FHEM/98_update.pm +++ b/fhem/FHEM/98_update.pm @@ -28,6 +28,7 @@ my $upd_running; eval "require IO::Socket::SSL"; # Forum #74387 my $upd_hasSSL = $@ ? 0 : 1; +my $upd_wantSSL; ######################################## sub @@ -35,8 +36,8 @@ update_Initialize($$) { my %hash = ( Fn => "CommandUpdate", - Hlp => "[|all|check|checktime|force] [http://.../controlfile],". - "update FHEM", + Hlp => "[-noSSL] [|all|check|checktime|force] ". + "[http://.../controlfile],update FHEM", ); $cmds{update} = \%hash; } @@ -51,6 +52,13 @@ CommandUpdate($$) my $err = upd_metainit(0); return $err if($err); + if($args[0] && $args[0] eq "-noSSL") { + shift @args; + $upd_wantSSL = 0; + } else { + $upd_wantSSL = 1; + } + if($args[0] && ($args[0] eq "list" || $args[0] eq "add" || @@ -240,6 +248,8 @@ doUpdate($$$$) my ($curr, $max, $src, $arg) = @_; my ($basePath, $ctrlFileName); $src =~ s'^http://fhem\.de'https://fhem.de' if($upd_hasSSL); + $src =~ s'^https://'http://' if(!$upd_wantSSL); + uLog 1, "Downloading $src"; if($src !~ m,^(.*)/([^/]*)$,) { uLog 1, "Cannot parse $src, probably not a valid http control file"; return; @@ -585,7 +595,7 @@ upd_writeFile($$$$)

update