diff options
author | Kenny Root <kroot@google.com> | 2014-11-17 20:39:45 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-11-17 20:39:46 +0000 |
commit | 3fd279f7853b2f0a523da11fbbe84adc26f835b7 (patch) | |
tree | 608c70a4ee7193589b0ea7ff439e1da22e7afdd9 | |
parent | 47f356d012543f359b0a23d3838337d9c457de34 (diff) | |
parent | cce4d86d447d0e86f94035dd0285726c4025fae6 (diff) | |
download | libcore-3fd279f7853b2f0a523da11fbbe84adc26f835b7.zip libcore-3fd279f7853b2f0a523da11fbbe84adc26f835b7.tar.gz libcore-3fd279f7853b2f0a523da11fbbe84adc26f835b7.tar.bz2 |
Merge "SSLSocketTest: add error message test for fallback_scsv"
-rw-r--r-- | luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ public class SSLSocketTest extends TestCase { 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 @@ public class SSLSocketTest extends TestCase { 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; } |