Index: modules/crypto/src/main/java/javax/crypto/CipherInputStream.java =================================================================== --- modules/crypto/src/main/java/javax/crypto/CipherInputStream.java (revision 438066) +++ modules/crypto/src/main/java/javax/crypto/CipherInputStream.java (working copy) @@ -25,6 +25,7 @@ import java.io.IOException; import java.io.InputStream; import javax.crypto.NullCipher; +import java.security.GeneralSecurityException; /** * @com.intel.drl.spec_ref @@ -134,6 +135,12 @@ */ public void close() throws IOException { in.close(); + try { + cipher.doFinal(); + } catch (GeneralSecurityException e) { + throw new IOException(e.getMessage()); + } + } /**