Don't assert on bad padding.

fork-5.53.8
Moxie Marlinspike 2014-09-05 10:07:16 -07:00
rodzic 9dce376780
commit c4209a65e3
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -328,7 +328,9 @@ public class SessionCipher {
}
}
private byte[] getPlaintext(int version, MessageKeys messageKeys, byte[] cipherText) {
private byte[] getPlaintext(int version, MessageKeys messageKeys, byte[] cipherText)
throws InvalidMessageException
{
try {
Cipher cipher;
@ -340,7 +342,7 @@ public class SessionCipher {
return cipher.doFinal(cipherText);
} catch (IllegalBlockSizeException | BadPaddingException e) {
throw new AssertionError(e);
throw new InvalidMessageException(e);
}
}