commit | 4d8b5b2a31220193401129212afbce4608d6dbdc | [log] [tgz] |
---|---|---|
author | Sergio Giro <sgiro@google.com> | Tue Sep 13 20:45:05 2016 +0100 |
committer | Sergio Giro <sgiro@google.com> | Tue Sep 13 20:45:05 2016 +0100 |
tree | f66b63a75b4902e0d71ddf72d7cf3737129048d2 | |
parent | 772b2b85f51e424ccf62178e41303e21747663d6 [diff] |
ojluni: solve issues with exceptions in cipher-related streams Port from http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/8402ef8fabde Incorrect handling of exceptions and closed ciphers can result in problems with authentication. See http://bugs.java.com/view_bug.do?bug_id=7160837 - CipherOutputStream: when closing, avoid calling doFinal on the cipher (again) if the stream was already closed - DigestOutputStream: write to stream before updating the digest Note: CipherInputStream has been already updated in https://android-review.googlesource.com/#/c/249160/ Bug: 29631070 Test: vogar DigestOutputStream CipherOutputStream Change-Id: If4884d1ece21cfcb46e085a08b0910ee8b6cb2d3