2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

Problems with Crypt:CBC on newer CBC Versions

See: https://forum.fhem.de/index.php/topic,80703.msg1264423.html#msg1264423

git-svn-id: https://svn.fhem.de/fhem/trunk@29361 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
daniel2311 2024-11-25 20:49:33 +00:00
parent e3ff3f485c
commit 012ea2c451

View File

@ -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'
);
}