kopia lustrzana https://github.com/weetmuts/wmbusmeters
Only check for 2f2f after aes cbc decrypt.
rodzic
e4d0dfda4e
commit
319cfd709a
|
@ -114,9 +114,6 @@ void MeterIperl::handleTelegram(Telegram *t)
|
|||
} else {
|
||||
t->content = t->payload;
|
||||
}
|
||||
if (t->content[0] != 0x2f || t->content[1] != 0x2f) {
|
||||
warning("(meter_iperl) warning: telegram payload does not start with 2F2F (did you use the correct encryption key?)\n");
|
||||
}
|
||||
char log_prefix[256];
|
||||
snprintf(log_prefix, 255, "(%s) log", "iperl");
|
||||
logTelegram(log_prefix, t->parsed, t->content);
|
||||
|
|
|
@ -126,7 +126,7 @@ void decryptMode5_AES_CBC(Telegram *t, vector<uchar> &aeskey)
|
|||
AES_CBC_decrypt_buffer(decrypted_data, content_data, content.size(), &aeskey[0], iv);
|
||||
|
||||
if (decrypted_data[0] != 0x2F || decrypted_data[1] != 0x2F) {
|
||||
verbose("(Mode5) decrypt failed!\n");
|
||||
warning("(Mode5) warning: telegram payload does not start with 2F2F (did you use the correct encryption key?)\n");
|
||||
}
|
||||
|
||||
t->content.clear();
|
||||
|
|
Ładowanie…
Reference in New Issue