merge in klp-factoryrom-release history after reset to klp-release
diff --git a/crypto/src/main/native/org_conscrypt_NativeCrypto.cpp b/crypto/src/main/native/org_conscrypt_NativeCrypto.cpp
index 6e171a7..f493e5a 100644
--- a/crypto/src/main/native/org_conscrypt_NativeCrypto.cpp
+++ b/crypto/src/main/native/org_conscrypt_NativeCrypto.cpp
@@ -418,7 +418,6 @@
throwBadPaddingException(env, message);
break;
case EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH:
- case EVP_R_WRONG_FINAL_BLOCK_LENGTH:
throwIllegalBlockSizeException(env, message);
break;
case EVP_R_BAD_KEY_LENGTH:
diff --git a/expectations/knownfailures.txt b/expectations/knownfailures.txt
index 794f9ed..c9b2a5b 100644
--- a/expectations/knownfailures.txt
+++ b/expectations/knownfailures.txt
@@ -3,15 +3,6 @@
*/
[
{
- description: "three known CharsetDecoder-/CharsetEncoder-related failures",
- names: [
- "org.apache.harmony.nio_char.tests.java.nio.charset.ASCIICharsetEncoderTest#testMultiStepEncode",
- "org.apache.harmony.nio_char.tests.java.nio.charset.CharsetDecoderTest#testInvalidDecoding",
- "org.apache.harmony.nio_char.tests.java.nio.charset.CharsetDecoderTest#test_decode"
- ],
- bug: 10729779
-},
-{
description: "can't compile a pattern with negative look-behind and quantifiers with upper bounds",
name: "org.apache.harmony.regex.tests.java.util.regex.PatternTest#test_bug_40103",
bug: 40103
diff --git a/luni/src/main/java/javax/crypto/CipherInputStream.java b/luni/src/main/java/javax/crypto/CipherInputStream.java
index f2f59c1..a59a425 100644
--- a/luni/src/main/java/javax/crypto/CipherInputStream.java
+++ b/luni/src/main/java/javax/crypto/CipherInputStream.java
@@ -104,7 +104,7 @@
try {
outputLength = cipher.doFinal(outputBuffer, 0);
} catch (Exception e) {
- throw new IOException("Error while finalizing cipher", e);
+ throw new IOException(e.getMessage());
}
finished = true;
break;
diff --git a/luni/src/test/java/libcore/javax/crypto/CipherInputStreamTest.java b/luni/src/test/java/libcore/javax/crypto/CipherInputStreamTest.java
index 28d95f2..40fd8fd 100644
--- a/luni/src/test/java/libcore/javax/crypto/CipherInputStreamTest.java
+++ b/luni/src/test/java/libcore/javax/crypto/CipherInputStreamTest.java
@@ -24,7 +24,6 @@
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.SecretKey;
-import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import junit.framework.TestCase;
@@ -72,13 +71,4 @@
}
return out.toByteArray();
}
-
- public void testCipherInputStream_TruncatedInput_Failure() throws Exception {
- Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
- cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(new byte[16], "AES"),
- new IvParameterSpec(new byte[16]));
- InputStream is = new CipherInputStream(new ByteArrayInputStream(new byte[31]), cipher);
- is.read(new byte[4]);
- is.close();
- }
}