Only check for 2f2f after aes cbc decrypt.

pull/22/head
weetmuts 2019-03-11 17:21:13 +01:00
rodzic e4d0dfda4e
commit 319cfd709a
2 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

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

Wyświetl plik

@ -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();