From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: creating unibyte strings Date: Tue, 26 Mar 2019 07:12:55 -0400 Message-ID: References: <83y3b4wdw9.fsf@gnu.org> <83tvhal45r.fsf@gnu.org> <83h8bwt1on.fsf@gnu.org> <83bm24t0hv.fsf@gnu.org> <83wokrs6en.fsf@gnu.org> <837ecrrqdm.fsf@gnu.org> <83sgvfq6yv.fsf@gnu.org> <83ftrcnqp0.fsf@gnu.org> <8336nboc2i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="146446"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel To: Elias =?windows-1252?Q?M=E5rtenson?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 26 12:13:13 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8k12-000byi-Ey for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2019 12:13:12 +0100 Original-Received: from localhost ([127.0.0.1]:57432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8k11-0007Pb-Bd for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2019 07:13:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8k0o-0007OE-GB for emacs-devel@gnu.org; Tue, 26 Mar 2019 07:12:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8k0n-0000MB-G8 for emacs-devel@gnu.org; Tue, 26 Mar 2019 07:12:58 -0400 Original-Received: from mail01.iro.umontreal.ca ([132.204.25.201]:41960) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8k0n-0000M0-6o for emacs-devel@gnu.org; Tue, 26 Mar 2019 07:12:57 -0400 Original-Received: from mail01.iro.umontreal.ca (mail01.iro.umontreal.ca [127.0.0.1]) by mail01.iro.umontreal.ca (Postfix) with ESMTP id 83F3581C9F67 for ; Tue, 26 Mar 2019 07:12:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; h=content-type:content-type:mime-version:user-agent:in-reply-to :date:date:references:message-id:subject:subject:to:from:from; s=dkim; t=1553598776; x=1554462777; bh=EeprVaosOHz3ca6TWwAhv1gM A4ZQ6oXclb2w/jzN9mk=; b=rY3CzqydzRrLMRU6w7beMNUJ5+FzKLdYNvKO/brQ EBqtWhgTNDD3SVfi1hMupYStInY3vJ14pxQjdaduTSTpW8M0+VElFkh7BpEDOEDU pAhGLqPqTVzJmsnBMwQ8v7xCks9ukeBOeXpyqinqXFkFY7feKI/qzqaIMTGRToHM 1i8msW1kj1GSFZFBooIY3obsSBiGHoqcCs8y0JjCXKckDwzz0xHmu3Es4Mqei4wv 97++qnyv/fxHJ0Zl9Y6wazOQenNNrkMS56fuLlrty3j7oHfahIH/c35I4Jyci70D TONHpi4YuEGwtMoKFERAfxfkrK+8jzz/ylmS7fW6CDBFBA== X-Virus-Scanned: amavisd-new at iro.umontreal.ca Original-Received: from mail01.iro.umontreal.ca ([127.0.0.1]) by mail01.iro.umontreal.ca (mail01.iro.umontreal.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZY2ywwlHCwGY for ; Tue, 26 Mar 2019 07:12:56 -0400 (EDT) Original-Received: from pastel (75-119-242-252.dsl.teksavvy.com [75.119.242.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CAFA181C9F4D; Tue, 26 Mar 2019 07:12:55 -0400 (EDT) In-Reply-To: ("Elias \=\?windows-1252\?Q\?M\=E5rtenson\=22's\?\= message of "Tue, 26 Mar 2019 18:23:48 +0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.201 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234739 Archived-At: >> I guess I was asking why is this done in Lisp, not in C. The >> decrypted stuff is human-readable text, is it not? Then why would a >> Lisp program want to see the encrypted byte array? > No, it's not. This is called from the backend protocol implementation of > IMAP, for example. When Gnus wants to load a mailbox, it calls the IMAP > code (Elisp) which then calls into GSSAPI to perform the decryption of the > underlying packets. IIUC the reason why Lisp code sees the byte array is because the module cannot hook itself directly into the underlying network connection, so the imap connection returns the byte-array to your code which then passes it on to the GSSAPI module, which then returns another byte-array which might be sent back to the imap server, ... Stefan