Re: [TLS] multiple clients in one process (was: Re: Deployment ... Re: This working group has failed)

Andy Lutomirski <luto@amacapital.net> Wed, 20 November 2013 06:24 UTC

Return-Path: <luto@amacapital.net>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AE6271AE33D for <tls@ietfa.amsl.com>; Tue, 19 Nov 2013 22:24:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.979
X-Spam-Level:
X-Spam-Status: No, score=-1.979 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AIXjs6LgnqQk for <tls@ietfa.amsl.com>; Tue, 19 Nov 2013 22:24:30 -0800 (PST)
Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 2DF701AE339 for <tls@ietf.org>; Tue, 19 Nov 2013 22:24:30 -0800 (PST)
Received: by mail-vc0-f172.google.com with SMTP id ij19so5595650vcb.3 for <tls@ietf.org>; Tue, 19 Nov 2013 22:24:23 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=x8RuarYNGIpNnuWfg2J77sBFZl+ywCqystank/B3UqE=; b=mTrknqr2dBt/Xwdp6Mte2rSq+x+MEA0EbGsJ3/YFCmV3aRsHA3XhKszfsFOznJUR9w Zs+p7GIOnct1A3Govu2596xzjIA7Cz8wB1OWNmJWm5J+UtNLWV9Fr+mAUsBiemZuodCM usj252MUiSdb//73gcXD7u+PS/8o7+Vl6ar7M4qCsIEQ2lLKS2bFw4TiPxgW3ono3GcP aBZxLJHGctfpr0hWJyxs8Ooq/uPk7GREDlOqCbhpnFKROBdpXdMyA9Us04YF1Kp3lBd8 yUbnpJaW9wkvPO8porDKT0jBGedi848Dn0SGY75Opxf1kHsyCmpbp5v5A3dWt2KdcQ7v UU9g==
X-Gm-Message-State: ALoCoQlDz5oxveN27g/9woZuTmmoYoF0sZAkr2PLIPv8JAGpkjiyqPyEJb9Xrbamgl9fWcZQXQ0B
X-Received: by 10.52.118.98 with SMTP id kl2mr1259998vdb.30.1384928663649; Tue, 19 Nov 2013 22:24:23 -0800 (PST)
MIME-Version: 1.0
Received: by 10.58.8.18 with HTTP; Tue, 19 Nov 2013 22:24:03 -0800 (PST)
In-Reply-To: <528C4332.9060806@funwithsoftware.org>
References: <CACsn0c=i2NX2CZ=Md2X+WM=RM8jAysaenz6oCxmoPt+LC5wvjA@mail.gmail.com> <52874576.9000708@gmx.net> <CAPMEXDbgp5+Gg6mkMWNrcOzmAbSpv3kjftGV0cjpqvMnRxpw=A@mail.gmail.com> <44D7624E-75D8-47D3-93BF-97427206E800@iki.fi> <CACsn0c=9GrO21ECZczB2zft3bVODcc=1ZRp3pG22c-rrDfTPXQ@mail.gmail.com> <2A0EFB9C05D0164E98F19BB0AF3708C711DAEEE373@USMBX1.msg.corp.akamai.com> <528AD194.9060003@amacapital.net> <528AD326.8080908@kirils.com> <CAM_a8Jy_x-qZFdpxsLMnFjuYeAJBwqNqQLrnsAcf05GU5PuJfw@mail.gmail.com> <528BBD84.60700@amacapital.net> <528C4332.9060806@funwithsoftware.org>
From: Andy Lutomirski <luto@amacapital.net>
Date: Tue, 19 Nov 2013 22:24:03 -0800
Message-ID: <CALCETrU0sN+dUGQ60v96hndKx_=7xUpgmxATtDVPJ3DqyGnbqA@mail.gmail.com>
To: Patrick Pelletier <code@funwithsoftware.org>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: "tls@ietf.org" <tls@ietf.org>, GnuTLS development list <gnutls-devel@lists.gnutls.org>
Subject: Re: [TLS] multiple clients in one process (was: Re: Deployment ... Re: This working group has failed)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Nov 2013 06:24:31 -0000

On Tue, Nov 19, 2013 at 9:05 PM, Patrick Pelletier
<code@funwithsoftware.org> wrote:
> On 11/19/13, 11:35 AM, Andy Lutomirski wrote:
>
>>   - Support multiple clients in the same process linked against the same
>> library without causing those clients to interfere with each other
>> (hello, GnuTLS).
>
>
> What's the issue that GnuTLS has with this?  I'm more familiar with the
> issue OpenSSL has, namely that it requires threading callbacks to be set, so
> each client in the same process is going to be stomping on the same set of
> global callbacks.  I'd thought GnuTLS was better about global state, but
> maybe there's something I've missed.
>

GnuTLS has gnutls_pkcs11_init, which is rather impolite -- it
manipulates global state, and it sometimes causes things to
malfunction after forking.  gnutls_global_init is documented as being
unsafe if called from multiple threads, which seems silly.

(As an even more off-topic aside, how is there nothing better than
pkcs11 for interfacing with abstract keys?)

> Also, I thought Botan wasn't good on this point either, since it requires a
> LibraryInitializer object to be created, and (I thought) it doesn't support
> more than one LibraryInitializer existing at once.

No clue -- I've never used it.

--Andy


-- 
Andy Lutomirski
AMA Capital Management, LLC