提交 9d4d4689 编写于 作者: A ascarpino

8037846: Ensure streaming of input cipher streams

Reviewed-by: xuelei, valeriep
上级 ff823294
......@@ -107,9 +107,10 @@ public class CipherInputStream extends FilterInputStream {
done = true;
try {
obuffer = cipher.doFinal();
} catch (IllegalBlockSizeException | BadPaddingException e) {
obuffer = null;
throw new IOException(e);
}
catch (IllegalBlockSizeException e) {obuffer = null;}
catch (BadPaddingException e) {obuffer = null;}
if (obuffer == null)
return -1;
else {
......@@ -120,7 +121,10 @@ public class CipherInputStream extends FilterInputStream {
}
try {
obuffer = cipher.update(ibuffer, 0, readin);
} catch (IllegalStateException e) {obuffer = null;};
} catch (IllegalStateException e) {
obuffer = null;
throw e;
}
ostart = 0;
if (obuffer == null)
ofinish = 0;
......@@ -308,6 +312,7 @@ public class CipherInputStream extends FilterInputStream {
}
}
catch (BadPaddingException | IllegalBlockSizeException ex) {
throw new IOException(ex);
}
ostart = 0;
ofinish = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册