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:
parent
e3ff3f485c
commit
012ea2c451
@ -493,6 +493,7 @@ sub Broadlink_auth(@) {
|
|||||||
|
|
||||||
sub Broadlink_getCipher(@) {
|
sub Broadlink_getCipher(@) {
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
my $version = $Crypt::CBC::VERSION // 2;
|
||||||
return Crypt::CBC->new(
|
return Crypt::CBC->new(
|
||||||
-key => $hash->{'.key'},
|
-key => $hash->{'.key'},
|
||||||
-cipher => "Crypt::OpenSSL::AES",
|
-cipher => "Crypt::OpenSSL::AES",
|
||||||
@ -501,6 +502,16 @@ sub Broadlink_getCipher(@) {
|
|||||||
-literal_key => 1,
|
-literal_key => 1,
|
||||||
-keysize => 16,
|
-keysize => 16,
|
||||||
-padding => 'space'
|
-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'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user