2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 03:44:52 +00:00

38_BEOK.pm: Add support for Crypt::CBC version 3

git-svn-id: https://svn.fhem.de/fhem/trunk@27280 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Wzut 2023-02-28 09:35:15 +00:00
parent c43543d0d9
commit 0a590b0bfb

View File

@ -947,9 +947,12 @@ sub UpdateStatus {
sub getCipher {
my $hash = shift;
my $hash = shift;
# Version von Crypt::CBC feststellen , Forum -> https://forum.fhem.de/index.php/topic,80703.msg1264423.html#msg1264423
# THX to clumsy
my $version = $Crypt::CBC::VERSION // 2;
return Crypt::CBC->new(
return Crypt::CBC->new(
-key => $hash->{'.key'},
-cipher => 'Crypt::OpenSSL::AES',
-header => 'none',
@ -957,7 +960,17 @@ sub getCipher {
-literal_key => 1,
-keysize => 16,
-padding => 'space'
);
) if ($version < 3);
return Crypt::CBC->new(
-pass => $hash->{'.key'},
-cipher => 'Crypt::OpenSSL::AES',
-header => 'none',
-iv => $hash->{'.iv'},
-pbkdf => 'none',
-keysize => 16,
-padding => 'none'
) ;
}
sub send_packet {