diff options
author | Kenny Root <kroot@google.com> | 2013-09-12 10:48:37 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2013-09-12 11:25:50 -0700 |
commit | 9a4eb515a0b50c9ff5c57127a0ddcbd07dbcc312 (patch) | |
tree | 979bb4aa96c8e6e4e30ad196801ee75361b14bec /luni/src/main/java/javax/crypto | |
parent | d7d63254bae2311762c9cf1cc11406133128a161 (diff) | |
download | libcore-9a4eb515a0b50c9ff5c57127a0ddcbd07dbcc312.zip libcore-9a4eb515a0b50c9ff5c57127a0ddcbd07dbcc312.tar.gz libcore-9a4eb515a0b50c9ff5c57127a0ddcbd07dbcc312.tar.bz2 |
Add specific exception for wrong final block length
EVP_DecryptFinal_ex can have an error on the wrong block length at the
end of a decrypted block, so throw IllegalBlockSizeException when that
happens instead of a RuntimeException.
Bug: 10610957
Bug: https://code.google.com/p/android/issues/detail?id=58396
Change-Id: I70ea040c3b52fc30591963270850871a8cc581d3
Diffstat (limited to 'luni/src/main/java/javax/crypto')
-rw-r--r-- | luni/src/main/java/javax/crypto/CipherInputStream.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/luni/src/main/java/javax/crypto/CipherInputStream.java b/luni/src/main/java/javax/crypto/CipherInputStream.java index a59a425..f2f59c1 100644 --- a/luni/src/main/java/javax/crypto/CipherInputStream.java +++ b/luni/src/main/java/javax/crypto/CipherInputStream.java @@ -104,7 +104,7 @@ public class CipherInputStream extends FilterInputStream { try { outputLength = cipher.doFinal(outputBuffer, 0); } catch (Exception e) { - throw new IOException(e.getMessage()); + throw new IOException("Error while finalizing cipher", e); } finished = true; break; |