Commit 19705a8e authored by jehan's avatar jehan

modify TLS tester to use alt name based certificates

parent b06e1967
......@@ -129,7 +129,7 @@ set(RC_FILES
rcfiles/marie_zrtp_ecdh448_rc
rcfiles/michelle_rc_udp
rcfiles/multi_account_rc
rcfiles/pauline_alt_rc
rcfiles/pauline_cn_rc
rcfiles/pauline_as_friend_rc
rcfiles/pauline_h264_rc
rcfiles/pauline_lime_x3dh_rc
......
127.0.0.1 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org sipv4.example.org conf.example.org subscribe.example.org lime.wildcard1.linphone.org http-proxy.example.org
127.0.0.1 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org sipv4.example.org conf.example.org subscribe.example.org lime.wildcard1.linphone.org http-proxy.example.org cn.example.org
::1 lime.wildcard1.linphone.org sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org
::1 lime.wildcard1.linphone.org sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org cn.example.org
188.165.46.90 tunnel.wildcard2.linphone.org
......
......@@ -13,7 +13,7 @@ realm=sip.example.org
[proxy_0]
reg_proxy=<sip:altname.linphone.org:5062;transport=tls>
reg_proxy=<sip:cn.example.org:5062;transport=tls>
reg_identity=sip:pauline@sip.example.org
reg_expires=3600
reg_sendregister=1
......
......@@ -22,7 +22,7 @@ dial_escape_plus=0
[proxy_1]
reg_proxy=altname.wildcard2.linphone.org:5062;transport=tls
reg_proxy=altname.wildcard2.linphone.org:5061;transport=tls
reg_identity=sip:pauline@sip.example.org
reg_expires=3600
reg_sendregister=1
......
......@@ -994,7 +994,7 @@ static void tls_certificate_subject_check(void){
LinphoneCoreManager* lcm;
LinphoneCore *lc;
char *rootcapath = bc_tester_res("certificates/cn/cafile.pem");
lcm=linphone_core_manager_new2("pauline_alt_rc",FALSE);
lcm=linphone_core_manager_new2("pauline_rc",FALSE);
lc=lcm->lc;
linphone_core_set_root_ca(lc, rootcapath);
/*let's search for a subject that is not in the certificate, it should fail*/
......@@ -1009,7 +1009,7 @@ static void tls_certificate_subject_check(void){
linphone_core_set_network_reachable(lc,FALSE);
/*let's search for a subject (in subjectAltNames and CN) that exist in the certificate, it should pass*/
lp_config_set_string(linphone_core_get_config(lc), "sip", "tls_certificate_subject_regexp", "Jehan Monnier");
lp_config_set_string(linphone_core_get_config(lc), "sip", "tls_certificate_subject_regexp", "See altname for DNS name");
linphone_core_set_network_reachable(lc,TRUE);
BC_ASSERT_TRUE(wait_for(lc,lc,&lcm->stat.number_of_LinphoneRegistrationOk,2));
......@@ -1092,13 +1092,13 @@ static void tls_with_non_tls_server(void){
}
}
static void tls_alt_name_register(void){
static void tls_common_name_register(void){
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager* lcm;
LinphoneCore *lc;
char *rootcapath = bc_tester_res("certificates/cn/cafile.pem");
lcm=linphone_core_manager_new2("pauline_alt_rc",FALSE);
lcm=linphone_core_manager_new2("pauline_cn_rc",FALSE);
lc=lcm->lc;
linphone_core_set_root_ca(lc,rootcapath);
linphone_core_refresh_registers(lc);
......@@ -1454,7 +1454,7 @@ test_t register_tests[] = {
TEST_NO_TAG("Register with custom headers", register_with_custom_headers),
TEST_NO_TAG("TCP register compatibility mode", simple_tcp_register_compatibility_mode),
TEST_NO_TAG("TLS register", simple_tls_register),
TEST_NO_TAG("TLS register with alt. name certificate", tls_alt_name_register),
TEST_NO_TAG("TLS register with Common Name in the Subject field", tls_common_name_register),
TEST_NO_TAG("TLS register with wildcard certificate", tls_wildcard_register),
TEST_NO_TAG("TLS certificate not verified",tls_certificate_failure),
TEST_NO_TAG("TLS certificate subjects check",tls_certificate_subject_check),
......
54.37.202.228 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org sipv4.example.org conf.example.org subscribe.example.org lime.wildcard1.linphone.org http-proxy.example.org
54.37.202.228 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org sipv4.example.org conf.example.org subscribe.example.org lime.wildcard1.linphone.org http-proxy.example.org cn.example.org
2001:41d0:700:789::2010 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org lime.wildcard1.linphone.org
2001:41d0:700:789::2010 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org lime.wildcard1.linphone.org cn.example.org
188.165.46.90 tunnel.wildcard2.linphone.org
......
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