Commit 4a06d301 authored by Pekka Pessi's avatar Pekka Pessi

tport_tls.c: silences warnings on signedness

darcs-hash:20090105124304-db55f-5c938df2b78f19e74f533d9c0561c7259db11f5d.gz
parent 8b070ed1
......@@ -461,16 +461,18 @@ int tls_post_connection_check(tls_t *tls)
char name[256];
subject = X509_get_subject_name(cert);
if (subject) {
if (X509_NAME_get_text_by_NID(subject, NID_commonName,
name, sizeof name) > 0) {
usize_t k, N = su_strlst_len(tls->subject);
name[(sizeof name) - 1] = '\0';
for (i = 0; i < su_strlst_len(tls->subject); i++)
if (strcasecmp(su_strlst_item(tls->subject, i), name) == 0)
for (k = 0; k < N; k++)
if (strcasecmp(su_strlst_item(tls->subject, k), name) == 0)
break;
if (i == su_strlst_len(tls->subject))
if (k == N)
su_strlst_dup_append(tls->subject, name);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment