diff --git a/fhem/FHEM/38_Broadlink.pm b/fhem/FHEM/38_Broadlink.pm index faf11c095..3a91188b5 100644 --- a/fhem/FHEM/38_Broadlink.pm +++ b/fhem/FHEM/38_Broadlink.pm @@ -493,6 +493,7 @@ sub Broadlink_auth(@) { sub Broadlink_getCipher(@) { my ($hash) = @_; + my $version = $Crypt::CBC::VERSION // 2; return Crypt::CBC->new( -key => $hash->{'.key'}, -cipher => "Crypt::OpenSSL::AES", @@ -501,6 +502,16 @@ sub Broadlink_getCipher(@) { -literal_key => 1, -keysize => 16, -padding => 'space' + ) if ($version < 3); + + return Crypt::CBC->new( + -key => $hash->{'.key'}, + -cipher => "Crypt::OpenSSL::AES", + -header => "none", + -iv => $hash->{'.iv'}, + -literal_key => 1, + -keysize => 16, + -padding => 'none' ); }