Mon Jan 5 06:43:04 CST 2009 Pekka Pessi <first.last@nokia.com>

* tport_tls.c: silences warnings on signedness



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11773 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-02-11 16:14:35 +00:00
parent 0a07ac4b16
commit 1d36053c74
2 changed files with 6 additions and 4 deletions

View File

@ -1 +1 @@
Wed Feb 11 10:13:45 CST 2009
Wed Feb 11 10:14:24 CST 2009

View File

@ -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);
}
}