bugfix: add SSL Handshake
create a connecting socket SSL_startHandshake is dependent on the protocol: this lets us use one socket to work with either SSL or non-SSL sockets.
This commit is contained in:
parent
38c47bd0ef
commit
813dd5ee34
@ -7,6 +7,7 @@
|
|||||||
#
|
#
|
||||||
# Special thanks goes to comitters:
|
# Special thanks goes to comitters:
|
||||||
# - Vitolinker / Commandref
|
# - Vitolinker / Commandref
|
||||||
|
# - ska- / SSL_startHandshake - SSL Port 3001 Support
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# This script is free software; you can redistribute it and/or modify
|
# This script is free software; you can redistribute it and/or modify
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
UPD 2023-05-16_04:16:05 18968 FHEM/82_LGTV_WebOS.pm
|
UPD 2023-11-15_19:19:41 19028 FHEM/82_LGTV_WebOS.pm
|
||||||
UPD 2023-05-16_04:14:37 55512 lib/FHEM/Devices/LGTV/LGTVWebOS.pm
|
UPD 2023-11-15_19:19:45 55994 lib/FHEM/Devices/LGTV/LGTVWebOS.pm
|
||||||
|
@ -643,14 +643,25 @@ sub Open {
|
|||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $host = $hash->{HOST};
|
my $host = $hash->{HOST};
|
||||||
my $port = 3000;
|
|
||||||
my $timeout = 0.1;
|
my $timeout = 0.1;
|
||||||
|
|
||||||
::Log3( $name, 4, "LGTV_WebOS ($name) - Baue Socket Verbindung auf" );
|
::Log3( $name, 4, "LGTV_WebOS ($name) - Baue Socket Verbindung auf" );
|
||||||
|
|
||||||
my $socket = IO::Socket::INET->new(
|
# create a connecting socket
|
||||||
|
# SSL_startHandshake is dependent on the protocol: this lets us use one socket
|
||||||
|
# to work with either SSL or non-SSL sockets.
|
||||||
|
my $socket = IO::Socket::SSL->new(
|
||||||
PeerHost => $host,
|
PeerHost => $host,
|
||||||
PeerPort => $port,
|
PeerPort => 3001,
|
||||||
|
Proto => 'tcp',
|
||||||
|
SSL_startHandshake => 1, #( $proto eq 'wss' ? 1 : 0 ),
|
||||||
|
SSL_verify_mode => SSL_VERIFY_NONE,
|
||||||
|
KeepAlive => 1,
|
||||||
|
Timeout => $timeout
|
||||||
|
)
|
||||||
|
|| IO::Socket::INET->new(
|
||||||
|
PeerHost => $host,
|
||||||
|
PeerPort => 3000,
|
||||||
Proto => 'tcp',
|
Proto => 'tcp',
|
||||||
KeepAlive => 1,
|
KeepAlive => 1,
|
||||||
Timeout => $timeout
|
Timeout => $timeout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user