From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel,gmane.comp.encryption.gpg.gnutls.devel Subject: Re: Emacs core TLS support Date: Mon, 27 Sep 2010 15:56:06 +0200 Organization: Programmerer Ingebrigtsen Message-ID: References: <878wc1vfh3.fsf@lifelogs.com> <87d41csktn.fsf@lifelogs.com> <87k4v0n0m8.fsf@lifelogs.com> <87wrrvfnc4.fsf@lifelogs.com> <87r5i2d00q.fsf@lifelogs.com> <87zkwqijye.fsf@stupidchicken.com> <878w4actmg.fsf@lifelogs.com> <877hju123h.fsf@stupidchicken.com> <8762yklrdk.fsf@lifelogs.com> <87wrqzhrjv.fsf@lifelogs.com> <87fwxmihyz.fsf@lifelogs.com> <8762ycfhqo.fsf@lifelogs.com> <87d3sf9soo.fsf@lifelogs.com> <87r5gh2fzj.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285595796 17664 80.91.229.12 (27 Sep 2010 13:56:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Sep 2010 13:56:36 +0000 (UTC) Cc: gnutls-devel@gnu.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 27 15:56:34 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P0EC1-0008LN-SZ for ged-emacs-devel@m.gmane.org; Mon, 27 Sep 2010 15:56:34 +0200 Original-Received: from localhost ([127.0.0.1]:43034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0EC1-0003ZF-B3 for ged-emacs-devel@m.gmane.org; Mon, 27 Sep 2010 09:56:33 -0400 Original-Received: from [140.186.70.92] (port=37846 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0EBr-0003Xh-5K for emacs-devel@gnu.org; Mon, 27 Sep 2010 09:56:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0EBm-00057A-TE for emacs-devel@gnu.org; Mon, 27 Sep 2010 09:56:23 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:60399) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0EBm-00056w-Dx for emacs-devel@gnu.org; Mon, 27 Sep 2010 09:56:18 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P0EBk-0008F5-UB for emacs-devel@gnu.org; Mon, 27 Sep 2010 15:56:16 +0200 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Sep 2010 15:56:16 +0200 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Sep 2010 15:56:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 160 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUrAgFFBwbBiGX34bRg EAyuVi16Lx0XAADAGEqpAAACM0lEQVQ4jW2UTXPbIBCGl5lMdYUMdc9Fo/wAmNyjFHOvEnS2U9he nVz09/susmLH052xhfdhP3hZi2I0mpaTimI1T0OJiblEipVHQ0RqBTkXPBvYO9gDiF1BXI3is4Ah aiL7H+DyHLWyN8CH4OE5GrP/AkJYwauJe855NM02IC2S2XPh5kZFgL4PLqaI+nbUCq3TGcCcSZlH stjcSd/jmsp7Z4RwxcdOA9SQCC/tYrWDIFhVbDwio3n2gwCQuzwhaX7B1xDJ3AeJGFHP7KfWeC9t krGiWpTuY3xrYJJ2yCjp267H3ffeZTcIIU2qbRYrtUI1dDD1AkgCwLCAVg7iuCH3ZASIsmlUo4Ey AHnI0xmQqrWoOGrT7gRGy7KcSJ/ucKcaxNh0Bh2APRBXLscjH38jlxtmAIS8JyZOh8Lf7A9OPK1A UnWkrVz6Ij8UpmOrcYKW5QmKQxbTfcfx1hpyNUjFjCLMf5e3HsJIvAAlQ9ctq9kpPAKcNrD54dg5 avuJhC7LhayeK9+GzBrR3YJFbakavA48e5VuD30JpTYjctYZs2uL3qIoXOwB/yeM7lrxGoRh8m7m uSX8AvzkB+beP3U3QMat1Bz8oVuo/wIe8+tORvFnR3Jj7kKZja3SCIAM+WZzTEfMAyaugU9/5ijT V+c/N2AuIy7RwhUoXQMEdO8OL4b0QvLm+KxRTLd8hIfE6Y0iyAbmESf7FTxjiAiD/gmKhhZofeAd gI2pXgV8iDSvaf4HqqsVIbgJSecAAAAASUVORK5CYII= Mail-Copies-To: never X-Now-Playing: Hector Zazou & Swara's _In the House of Mirrors_: "Hool Ki Seva" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:TdcOXaex2SS/URLWuLwLw0da5tM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130993 gmane.comp.encryption.gpg.gnutls.devel:4544 Archived-At: Ok, now we're getting somewhere. With the following dirty patch: === modified file 'src/gnutls.c' *** src/gnutls.c 2010-09-26 06:06:28 +0000 --- src/gnutls.c 2010-09-27 13:52:46 +0000 *************** *** 221,226 **** --- 221,230 ---- return gnutls_make_error (GNUTLS_E_SUCCESS); } + void my_log_function (int level, const char* string) { + message("hello: %d %s", strlen(string), string); + } + DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 6, 0, doc: /* Initializes client-mode GnuTLS for process PROC. Currently only client mode is supported. Returns a success/failure *************** *** 264,269 **** --- 268,276 ---- state = XPROCESS (proc)->gnutls_state; + gnutls_global_set_log_level(9); + gnutls_global_set_log_function(my_log_function); + /* always initialize globals. */ global_init = gnutls_emacs_global_init (); if (! NILP (Fgnutls_errorp (global_init))) I get the following output (after a lot of other output): gnutls: handshake: handshaking hello: 73 REC[0x16bbe20]: Expected Packet[3] Change Cipher Spec(20) with length: 1 hello: 73 REC[0x16bbe20]: Received Packet[3] Change Cipher Spec(20) with length: 1 hello: 28 ASSERT: gnutls_cipher.c:204 hello: 53 REC[0x16bbe20]: ChangeCipherSpec Packet was received hello: 46 HSK[0x16bbe20]: Cipher Suite: RSA_ARCFOUR_MD5 hello: 61 HSK[0x16bbe20]: Initializing internal [read] cipher sessions hello: 64 REC[0x16bbe20]: Expected Packet[0] Handshake(22) with length: 1 hello: 65 REC[0x16bbe20]: Received Packet[0] Handshake(22) with length: 32 hello: 66 REC[0x16bbe20]: Decrypted Packet[0] Handshake(22) with length: 16 hello: 49 HSK[0x16bbe20]: FINISHED was received [16 bytes] gnutls: handshake: handshaking hello: 62 HSK[0x16bbe20]: Keeping ciphersuite: DHE_RSA_AES_128_CBC_SHA1 hello: 67 HSK[0x16bbe20]: Keeping ciphersuite: DHE_RSA_CAMELLIA_128_CBC_SHA1 hello: 62 HSK[0x16bbe20]: Keeping ciphersuite: DHE_RSA_AES_256_CBC_SHA1 hello: 67 HSK[0x16bbe20]: Keeping ciphersuite: DHE_RSA_CAMELLIA_256_CBC_SHA1 hello: 63 HSK[0x16bbe20]: Keeping ciphersuite: DHE_RSA_3DES_EDE_CBC_SHA1 hello: 62 HSK[0x16bbe20]: Keeping ciphersuite: DHE_DSS_AES_128_CBC_SHA1 hello: 67 HSK[0x16bbe20]: Keeping ciphersuite: DHE_DSS_CAMELLIA_128_CBC_SHA1 hello: 62 HSK[0x16bbe20]: Keeping ciphersuite: DHE_DSS_AES_256_CBC_SHA1 hello: 67 HSK[0x16bbe20]: Keeping ciphersuite: DHE_DSS_CAMELLIA_256_CBC_SHA1 hello: 63 HSK[0x16bbe20]: Keeping ciphersuite: DHE_DSS_3DES_EDE_CBC_SHA1 hello: 58 HSK[0x16bbe20]: Keeping ciphersuite: DHE_DSS_ARCFOUR_SHA1 hello: 67 HSK[0x16bbe20]: Removing ciphersuite: DHE_PSK_SHA_AES_128_CBC_SHA1 hello: 67 HSK[0x16bbe20]: Removing ciphersuite: DHE_PSK_SHA_AES_256_CBC_SHA1 hello: 68 HSK[0x16bbe20]: Removing ciphersuite: DHE_PSK_SHA_3DES_EDE_CBC_SHA1 hello: 63 HSK[0x16bbe20]: Removing ciphersuite: DHE_PSK_SHA_ARCFOUR_SHA1 hello: 67 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_RSA_AES_128_CBC_SHA1 hello: 67 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_RSA_AES_256_CBC_SHA1 hello: 68 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_RSA_3DES_EDE_CBC_SHA1 hello: 67 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_DSS_AES_128_CBC_SHA1 hello: 67 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_DSS_AES_256_CBC_SHA1 hello: 68 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_DSS_3DES_EDE_CBC_SHA1 hello: 58 HSK[0x16bbe20]: Keeping ciphersuite: RSA_AES_128_CBC_SHA1 hello: 63 HSK[0x16bbe20]: Keeping ciphersuite: RSA_CAMELLIA_128_CBC_SHA1 hello: 58 HSK[0x16bbe20]: Keeping ciphersuite: RSA_AES_256_CBC_SHA1 hello: 63 HSK[0x16bbe20]: Keeping ciphersuite: RSA_CAMELLIA_256_CBC_SHA1 hello: 59 HSK[0x16bbe20]: Keeping ciphersuite: RSA_3DES_EDE_CBC_SHA1 hello: 54 HSK[0x16bbe20]: Keeping ciphersuite: RSA_ARCFOUR_SHA1 hello: 53 HSK[0x16bbe20]: Keeping ciphersuite: RSA_ARCFOUR_MD5 hello: 63 HSK[0x16bbe20]: Removing ciphersuite: PSK_SHA_AES_128_CBC_SHA1 hello: 63 HSK[0x16bbe20]: Removing ciphersuite: PSK_SHA_AES_256_CBC_SHA1 hello: 64 HSK[0x16bbe20]: Removing ciphersuite: PSK_SHA_3DES_EDE_CBC_SHA1 hello: 59 HSK[0x16bbe20]: Removing ciphersuite: PSK_SHA_ARCFOUR_SHA1 hello: 63 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_AES_128_CBC_SHA1 hello: 63 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_AES_256_CBC_SHA1 hello: 64 HSK[0x16bbe20]: Removing ciphersuite: SRP_SHA_3DES_EDE_CBC_SHA1 hello: 44 EXT[0x16bbe20]: Sending extension CERT_TYPE hello: 49 HSK[0x16bbe20]: CLIENT HELLO was send [88 bytes] hello: 64 REC[0x16bbe20]: Sending Packet[1] Handshake(22) with length: 88 hello: 62 REC[0x16bbe20]: Sent Packet[2] Handshake(22) with length: 109 hello: 64 REC[0x16bbe20]: Expected Packet[1] Handshake(22) with length: 1 hello: 72 REC[0x16bbe20]: Received Packet[1] Application Data(23) with length: 84 hello: 73 REC[0x16bbe20]: Decrypted Packet[1] Application Data(23) with length: 68 hello: 28 ASSERT: gnutls_record.c:735 hello: 29 ASSERT: gnutls_record.c:1048 hello: 30 ASSERT: gnutls_buffers.c:1032 hello: 32 ASSERT: gnutls_handshake.c:1045 hello: 32 ASSERT: gnutls_handshake.c:2364 I have no idea what this means, though. :-) -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen