summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElisey Zamakhov <EZamakhov@luxoft.com>2014-07-16 17:35:09 +0400
committerElisey Zamakhov <EZamakhov@luxoft.com>2014-07-16 17:35:33 +0400
commit16ed9535bb4c9493da5fa95c64d25bf749bd403c (patch)
tree0000687516ed8396cf93b63767b2fc402af6a309
parent2647fbd4f5abdd5f5268017584b0ed6fdf2fc496 (diff)
downloadsdl_core-16ed9535bb4c9493da5fa95c64d25bf749bd403c.tar.gz
Add more broken bytes in SSL tests for correct work in come cases
(Ubuntu 14.04 x64) No subject for review
-rw-r--r--test/components/security_manager/include/security_manager/crypto_manager_impl_test.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/components/security_manager/include/security_manager/crypto_manager_impl_test.h b/test/components/security_manager/include/security_manager/crypto_manager_impl_test.h
index ea16ca90d5..0f4b323a34 100644
--- a/test/components/security_manager/include/security_manager/crypto_manager_impl_test.h
+++ b/test/components/security_manager/include/security_manager/crypto_manager_impl_test.h
@@ -187,7 +187,10 @@ TEST_F(SSLTest, BrokenHandshake) {
security_manager::SSLContext::Handshake_Result_Success);
ASSERT_FALSE(client_buf == NULL);
ASSERT_GT(client_buf_len, 0u);
+ // Broke 3 bytes for get abnormal fail of handshake
+ const_cast<uint8_t*>(client_buf)[0] ^= 0xFF;
const_cast<uint8_t*>(client_buf)[client_buf_len / 2] ^= 0xFF;
+ const_cast<uint8_t*>(client_buf)[client_buf_len - 1] ^= 0xFF;
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_AbnormalFail,
server_ctx->DoHandshakeStep(client_buf,
client_buf_len,