From 7fc1f8a69928769b8eac6c853e78ef4fa5ec5616 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 7 Nov 2011 22:11:53 +0100 Subject: [PATCH] linphonec encryption support --- console/commands.c | 12 ++++++++++++ gtk/main.ui | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/console/commands.c b/console/commands.c index 84639ada..e40dda66 100644 --- a/console/commands.c +++ b/console/commands.c @@ -103,6 +103,7 @@ static int lpc_cmd_states(LinphoneCore *lc, char *args); static int lpc_cmd_identify(LinphoneCore *lc, char *args); static int lpc_cmd_ringback(LinphoneCore *lc, char *args); static int lpc_cmd_conference(LinphoneCore *lc, char *args); +static int lpc_cmd_zrtp_verified(LinphoneCore *lc, char *args); /* Command handler helpers */ static void linphonec_proxy_add(LinphoneCore *lc); @@ -348,6 +349,9 @@ static LPC_COMMAND advanced_commands[] = { { "redirect", lpc_cmd_redirect, "Redirect an incoming call", "'redirect '\t: Redirect all pending incoming calls to the \n" }, + { "zrtp-set-verified", lpc_cmd_zrtp_verified,"Set ZRTP SAS verified.", + "'Set ZRTP SAS verified'\n" + }, { NULL,NULL,NULL,NULL} }; @@ -2552,6 +2556,14 @@ static int lpc_cmd_ringback(LinphoneCore *lc, char *args){ return 1; } +static int lpc_cmd_zrtp_verified(LinphoneCore *lc, char *args){ + LinphoneCall *call=linphone_core_get_current_call(lc); + if (linphone_call_params_get_media_encryption(linphone_call_get_current_params(call))==LinphoneMediaEncryptionZRTP){ + linphone_call_set_authentication_token_verified(call,TRUE); + } + return 1; +} + /*************************************************************************** * * Command table management funx diff --git a/gtk/main.ui b/gtk/main.ui index 92549238..9d02cb42 100644 --- a/gtk/main.ui +++ b/gtk/main.ui @@ -167,7 +167,7 @@ - button + Set verified True True True -- 2.39.2