From e4dbc33f424b1faefa0f8f1c5088bc18949df8fc Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Thu, 9 Oct 2014 04:56:48 +0000 Subject: [PATCH] HttpUtils.pm: fix SSL_ERROR (Forum #27565) git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@6716 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/HttpUtils.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/HttpUtils.pm b/fhem/FHEM/HttpUtils.pm index 7d71f9210..f266bc770 100644 --- a/fhem/FHEM/HttpUtils.pm +++ b/fhem/FHEM/HttpUtils.pm @@ -6,7 +6,7 @@ use strict; use warnings; use IO::Socket::INET; use MIME::Base64; -use vars qw($SSL_ERR); +use vars qw($SSL_ERROR); my %ext2MIMEType= qw{ css text/css @@ -174,7 +174,10 @@ HttpUtils_Connect2($) if(!$hash->{conn}) { undef $hash->{conn}; my $err = $@; - $err = $SSL_ERR if(!$err && $hash->{protocol} eq "https"); + if($hash->{protocol} eq "https") { + $err = "" if(!$err); + $err .= " ".($SSL_ERROR ? $SSL_ERROR : IO::Socket::SSL::errstr()); + } return "$hash->{displayurl}: Can't connect(2) to $hash->{addr}: $err"; }