diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2018-08-21 06:58:17 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2018-08-23 23:14:10 +0200 |
commit | 71655cf48a09621a2cfcdd497e0804b6a452df7d (patch) | |
tree | f9edbd2f850b6beacedfa56d5d1ff79d113e7570 /test/core/tsi | |
parent | 5fb2281adaad78fbfa946722b4c7dab699053f1b (diff) |
Fixing the SSL_REUSE auth context string attribute.
"true" and "false" are strings, so use similar code that of the cstring variant. Otherwise, the generated properties will have an embedded zero in there.
Diffstat (limited to 'test/core/tsi')
-rw-r--r-- | test/core/tsi/ssl_transport_security_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index b477904d60..baffad6ea3 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -208,9 +208,11 @@ static void check_session_reusage(ssl_tsi_test_fixture* ssl_fixture, tsi_peer_get_property_by_name(peer, TSI_SSL_SESSION_REUSED_PEER_PROPERTY); GPR_ASSERT(session_reused != nullptr); if (ssl_fixture->session_reused) { - GPR_ASSERT(strcmp(session_reused->value.data, "true") == 0); + GPR_ASSERT(strncmp(session_reused->value.data, "true", + session_reused->value.length) == 0); } else { - GPR_ASSERT(strcmp(session_reused->value.data, "false") == 0); + GPR_ASSERT(strncmp(session_reused->value.data, "false", + session_reused->value.length) == 0); } } |