Commit f0e76eb5 authored by Simon Morlat's avatar Simon Morlat

Clarify sofia-sip policy regarding CNAME vs SubjectAltName.

https://tools.ietf.org/html/rfc5922#section-7.1 says that SubjectAltName should be the only one considered when present, but implementations MAY use CN as well for backward compatibility.
This commit implements the backward compatibility.
parent d29b4cf4
......@@ -11,7 +11,7 @@ dnl information on the package
dnl ---------------------------
dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
AC_INIT([sofia-sip], [1.13.39bc])
AC_INIT([sofia-sip], [1.13.40bc])
AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST(VER_LIBSOFIA_SIP_UA_MAJOR_MINOR, [1.13])
......
......@@ -813,8 +813,10 @@ int tls_post_connection_check(tport_t *self, tls_t *tls)
name[(sizeof name) - 1] = '\0';
for (k = 0; k < N; k++)
if (su_casematch(su_strlst_item(tls->subjects, k), name) == 0)
if (su_casematch(su_strlst_item(tls->subjects, k), name) == 1){
/* The CN is already in the list of subjectAltName's DNS, IP, URI fields. Don't add it again.*/
break;
}
if (k >= N)
su_strlst_dup_append(tls->subjects, 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