diff --git a/coreapi/lime.c b/coreapi/lime.c index 3d0084567..1ee677307 100644 --- a/coreapi/lime.c +++ b/coreapi/lime.c @@ -880,7 +880,7 @@ int lime_im_encryption_engine_process_incoming_message_cb(LinphoneImEncryptionEn fclose(CACHEFD); cacheXml = xmlParseDoc((xmlChar*)cacheString); ms_free(cacheString); - retval = lime_decryptMultipartMessage(cacheXml, (uint8_t *)msg->message, &decrypted_body, &decrypted_content_type, lp_config_get_int(lc->config, "sip", "lime_key_validity", 0)); + retval = lime_decryptMultipartMessage(cacheXml, (uint8_t *)msg->message, &decrypted_body, &decrypted_content_type, bctbx_time_string_to_sec(lp_config_get_string(lc->config, "sip", "lime_key_validity", "0"))); if (retval != 0) { ms_warning("Unable to decrypt message, reason : %s", lime_error_code_to_string(retval)); if (decrypted_body) ms_free(decrypted_body); diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index f72ac5f58..abb00367f 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2531,7 +2531,7 @@ void linphone_call_init_audio_stream(LinphoneCall *call){ /*call->current_params.media_encryption will be set later when zrtp is activated*/ params.zid_file=lc->zrtp_secrets_cache; params.uri=uri; - params.limeKeyTimeSpan = lp_config_get_int(lc->config, "sip", "lime_key_validity", 0); /* get key lifespan from config file, default is 0:forever valid */ + params.limeKeyTimeSpan = bctbx_time_string_to_sec(lp_config_get_string(lc->config, "sip", "lime_key_validity", "0")); /* get key lifespan from config file, default is 0:forever valid */ setZrtpCryptoTypesParameters(¶ms,call->core); audio_stream_enable_zrtp(call->audiostream,¶ms); if (uri != NULL) ms_free(uri);