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:
parent
0a07ac4b16
commit
1d36053c74
|
@ -1 +1 @@
|
||||||
Wed Feb 11 10:13:45 CST 2009
|
Wed Feb 11 10:14:24 CST 2009
|
||||||
|
|
|
@ -461,16 +461,18 @@ int tls_post_connection_check(tls_t *tls)
|
||||||
char name[256];
|
char name[256];
|
||||||
|
|
||||||
subject = X509_get_subject_name(cert);
|
subject = X509_get_subject_name(cert);
|
||||||
|
|
||||||
if (subject) {
|
if (subject) {
|
||||||
if (X509_NAME_get_text_by_NID(subject, NID_commonName,
|
if (X509_NAME_get_text_by_NID(subject, NID_commonName,
|
||||||
name, sizeof name) > 0) {
|
name, sizeof name) > 0) {
|
||||||
|
usize_t k, N = su_strlst_len(tls->subject);
|
||||||
name[(sizeof name) - 1] = '\0';
|
name[(sizeof name) - 1] = '\0';
|
||||||
|
|
||||||
for (i = 0; i < su_strlst_len(tls->subject); i++)
|
for (k = 0; k < N; k++)
|
||||||
if (strcasecmp(su_strlst_item(tls->subject, i), name) == 0)
|
if (strcasecmp(su_strlst_item(tls->subject, k), name) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (i == su_strlst_len(tls->subject))
|
if (k == N)
|
||||||
su_strlst_dup_append(tls->subject, name);
|
su_strlst_dup_append(tls->subject, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue