aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/tsi
diff options
context:
space:
mode:
authorGravatar Julien Boeuf <jboeuf@google.com>2015-05-13 13:50:59 -0700
committerGravatar Julien Boeuf <jboeuf@google.com>2015-05-13 13:50:59 -0700
commit77e8c1cfb99bc93469e06e75897bbece7d40b26c (patch)
tree046ea09d7e44cf961651f04cd2baea92c38d4b73 /test/core/tsi
parenta468c36601dd5997580129bbd66b5ebed02521f8 (diff)
Clean up tsi properties.
Diffstat (limited to 'test/core/tsi')
-rw-r--r--test/core/tsi/transport_security_test.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/core/tsi/transport_security_test.c b/test/core/tsi/transport_security_test.c
index d591e43faa..e45602bab7 100644
--- a/test/core/tsi/transport_security_test.c
+++ b/test/core/tsi/transport_security_test.c
@@ -256,19 +256,16 @@ static tsi_peer peer_from_cert_name_test_entry(
name_list *nl;
parsed_dns_names dns_entries = parse_dns_names(entry->dns_names);
nl = dns_entries.names;
- GPR_ASSERT(tsi_construct_peer(2, &peer) == TSI_OK);
+ GPR_ASSERT(tsi_construct_peer(1 + dns_entries.name_count, &peer) == TSI_OK);
GPR_ASSERT(tsi_construct_string_peer_property_from_cstring(
TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY, entry->common_name,
&peer.properties[0]) == TSI_OK);
- GPR_ASSERT(tsi_construct_list_peer_property(
- TSI_X509_SUBJECT_ALTERNATIVE_NAMES_PEER_PROPERTY,
- dns_entries.name_count, &peer.properties[1]) == TSI_OK);
- i = 0;
+ i = 1;
while (nl != NULL) {
char *processed = processed_dns_name(nl->name);
GPR_ASSERT(tsi_construct_string_peer_property(
- NULL, processed, strlen(nl->name),
- &peer.properties[1].value.list.children[i++]) == TSI_OK);
+ TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY, processed,
+ strlen(nl->name), &peer.properties[i++]) == TSI_OK);
nl = nl->next;
gpr_free(processed);
}