Commit 8c3767b1 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Updated client TLS tester

parent ee9d0643
......@@ -115,7 +115,6 @@ set(RC_FILES
rcfiles/pauline_sips_rc
rcfiles/pauline_tcp_rc
rcfiles/pauline_tls_client_rc
rcfiles/pauline_tls_client_2_rc
rcfiles/pauline_tunnel_verify_server_certificate_rc
rcfiles/pauline_v4proxy_rc
rcfiles/pauline_wild_rc
......@@ -297,6 +296,7 @@ if (NOT ANDROID AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
install(FILES ${SIPP_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/sipp")
install(FILES ${CERTIFICATE_ALT_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/certificates/altname")
install(FILES ${CERTIFICATE_CN_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/certificates/cn")
install(FILES ${CERTIFICATE_CLIENT_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/certificates/client")
install(FILES ${RC_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/rcfiles")
install(FILES ${IMAGE_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/images")
install(FILES ${VCARD_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/vcards")
......
......@@ -67,7 +67,6 @@ RCFILES = \
rcfiles/pauline_sips_rc\
rcfiles/pauline_tcp_rc\
rcfiles/pauline_tls_client_rc\
rcfiles/pauline_tls_client_2_rc\
rcfiles/pauline_wild_rc\
rcfiles/pauline_zrtp_aes256_rc\
rcfiles/pauline_zrtp_b256_rc\
......@@ -102,6 +101,8 @@ certificatesaltdir=$(datadir)/liblinphone_tester/certificates/altname
certificatesalt_DATA = $(CERTIFICATE_ALT_FILES)
certificatescndir=$(datadir)/liblinphone_tester/certificates/cn
certificatescn_DATA = $(CERTIFICATE_CN_FILES)
certificatesclientdir=$(datadir)/liblinphone_tester/certificates/client
certificatesclient_DATA = $(CERTIFICATE_CLIENT_FILES)
rcfilesdir = $(datadir)/liblinphone_tester/rcfiles
rcfiles_DATA = $(RCFILES)
imagesdir = $(datadir)/liblinphone_tester/images
......
[sip]
sip_port=-1
sip_tcp_port=-1
sip_tls_port=-1
default_proxy=0
ping_with_options=0
composing_idle_timeout=1
[auth_info_0]
username=pauline
userid=pauline
passwd=secret
realm=sip.example.org
[proxy_0]
realm=sip.example.org
reg_proxy=sip2.linphone.org:5063;transport=tls
reg_route=sip2.linphone.org:5063;transport=tls
reg_identity=sip:pauline@sip.example.org
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
#[friend_0]
#url="Mariette" <sip:marie@sip.example.org>
#pol=accept
#subscribe=0
[rtp]
audio_rtp_port=18070-28000
video_rtp_port=39072-49000
[video]
display=0
capture=0
show_local=0
size=qcif
enabled=0
self_view=0
automatically_initiate=0
automatically_accept=0
device=StaticImage: Static picture
[sound]
echocancellation=0 #to not overload cpu in case of VG
[net]
dns_srv_enabled=0 #no srv needed in general
stun_server=stun.linphone.org
......@@ -4,8 +4,6 @@ sip_tcp_port=-1
sip_tls_port=-1
default_proxy=0
ping_with_options=0
client_cert_chain=tester/certificates/client/cert.pem
client_cert_key=tester/certificates/client/key.pem
composing_idle_timeout=1
......@@ -15,7 +13,6 @@ userid=pauline
passwd=secret
realm=sip.example.org
[proxy_0]
realm=sip.example.org
reg_proxy=sip2.linphone.org:5063;transport=tls
......
......@@ -951,14 +951,24 @@ static void redirect(void){
static void tls_auth_global_client_cert(void) {
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_rc", TRUE);
linphone_core_manager_destroy(pauline);
LinphoneCoreManager *manager = ms_new0(LinphoneCoreManager, 1);
LpConfig *lpc = NULL;
char *cert_path = bc_tester_res("certificates/client/cert.pem");
char *key_path = bc_tester_res("certificates/client/key.pem");
linphone_core_manager_init(manager, "pauline_tls_client_rc", NULL);
lpc = manager->lc->config;
lp_config_set_string(lpc, "sip", "client_cert_chain", cert_path);
lp_config_set_string(lpc, "sip", "client_cert_key", key_path);
linphone_core_manager_start(manager, TRUE);
linphone_core_manager_destroy(manager);
ms_free(cert_path);
ms_free(key_path);
}
}
static void tls_auth_global_client_cert_api(void) {
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_2_rc", FALSE);
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_rc", FALSE);
char *cert_path = bc_tester_res("certificates/client/cert.pem");
char *key_path = bc_tester_res("certificates/client/key.pem");
char *cert = read_file(cert_path);
......@@ -977,7 +987,7 @@ static void tls_auth_global_client_cert_api(void) {
static void tls_auth_global_client_cert_api_path(void) {
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_2_rc", FALSE);
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_rc", FALSE);
char *cert = bc_tester_res("certificates/client/cert.pem");
char *key = bc_tester_res("certificates/client/key.pem");
LinphoneCore *lc = pauline->lc;
......@@ -992,7 +1002,7 @@ static void tls_auth_global_client_cert_api_path(void) {
static void tls_auth_info_client_cert_api(void) {
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_2_rc", FALSE);
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_rc", FALSE);
char *cert_path = bc_tester_res("certificates/client/cert.pem");
char *key_path = bc_tester_res("certificates/client/key.pem");
char *cert = read_file(cert_path);
......@@ -1012,7 +1022,7 @@ static void tls_auth_info_client_cert_api(void) {
static void tls_auth_info_client_cert_api_path(void) {
if (transport_supported(LinphoneTransportTls)) {
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_2_rc", FALSE);
LinphoneCoreManager *pauline = linphone_core_manager_new2("pauline_tls_client_rc", FALSE);
char *cert = bc_tester_res("certificates/client/cert.pem");
char *key = bc_tester_res("certificates/client/key.pem");
LinphoneCore *lc = pauline->lc;
......
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