From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0C276294A6 for ; Wed, 8 May 2019 05:11:13 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x0IgV9nXv1qj for ; Wed, 8 May 2019 05:11:12 -0400 (EDT) Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C1E0029429 for ; Wed, 8 May 2019 05:11:12 -0400 (EDT) Received: by smtp57.i.mail.ru with esmtpa (envelope-from ) id 1hOIbW-0006Nc-OA for tarantool-patches@freelists.org; Wed, 08 May 2019 12:11:11 +0300 Date: Wed, 8 May 2019 12:11:10 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 2/2] swim: implement and expose transport-level encryption Message-ID: <20190508091110.GA17434@atlas> References: <5f06694d23bd5fc3e630a42244089193371ce7b3.1556561487.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org * Vladislav Shpilevoy [19/05/08 12:03]: First, I think you're solving a non-problem. There is no big deal in passing the crypto algorithm again. Second, I think the encryption is optional and fairly independent on the rest of the so it's OK to set it separately in swim_set_codec(). No need to rework entire configuration because of encryption issues. Otherwise I don't have a strong opinion. Passing -1 is ugly, you could put a lipstick on the pig by using a special enum value (SWIM_KEEP_CODEC) instead. > I rethought the API and decided that it lacks > flexibility - I can't change private key without > passing crypto algorithm again, in swim_set_codec. > > There are some solutions: > > - Move algo and key to swim_cfg, and make both of them > optional. But it pads out swim_cfg(), which at this moment > is quite compact, atomic, and contains only really > necessary parameters. > > - Make swim_set_codec arguments optional. Then a one could > change private key like this: swim_set_codec(-1, new_key). > > These solutions are simple and not too intrusive. But probably we > should do something more global - get rid of swim_cfg and split it > into separate > > swim_set_