am 3fd279f7: Merge "SSLSocketTest: add error message test for fallback_scsv"
* commit '3fd279f7853b2f0a523da11fbbe84adc26f835b7':
SSLSocketTest: add error message test for fallback_scsv
diff --git a/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java b/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
index 1c5c2fb..742051d 100644
--- a/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
+++ b/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
@@ -1678,6 +1678,10 @@
server.startHandshake();
fail("Should result in inappropriate fallback");
} catch (SSLHandshakeException expected) {
+ Throwable cause = expected.getCause();
+ assertEquals(SSLProtocolException.class, cause.getClass());
+ assertTrue(cause.getMessage(),
+ cause.getMessage().contains("inappropriate fallback"));
}
return null;
}
@@ -1690,6 +1694,10 @@
client.startHandshake();
fail("Should receive TLS alert inappropriate fallback");
} catch (SSLHandshakeException expected) {
+ Throwable cause = expected.getCause();
+ assertEquals(SSLProtocolException.class, cause.getClass());
+ assertTrue(cause.getMessage(),
+ cause.getMessage().contains("inappropriate fallback"));
}
return null;
}