From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leandro Facchinetti Newsgroups: gmane.emacs.bugs Subject: bug#20465: 24.4; GnuTLS integration seems faulty Date: Wed, 29 Apr 2015 15:34:56 -0400 Message-ID: <87r3r24tjz.fsf@leafac.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430339495 2374 80.91.229.3 (29 Apr 2015 20:31:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Apr 2015 20:31:35 +0000 (UTC) To: 20465@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 29 22:31:21 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YnYdZ-0003ik-38 for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 22:31:17 +0200 Original-Received: from localhost ([::1]:40969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnYdY-00009s-A9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 16:31:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnYdU-00009h-9r for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 16:31:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnYdN-0007Gi-EM for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 16:31:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnYdN-0007GY-AS for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 16:31:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YnYdM-0001I0-K4 for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 16:31:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leandro Facchinetti Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Apr 2015 20:31:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20465 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14303394254904 (code B ref -1); Wed, 29 Apr 2015 20:31:04 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Apr 2015 20:30:25 +0000 Original-Received: from localhost ([127.0.0.1]:56726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnYch-0001Gz-QS for submit@debbugs.gnu.org; Wed, 29 Apr 2015 16:30:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57502) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnXlH-0008Oo-Cc for submit@debbugs.gnu.org; Wed, 29 Apr 2015 15:35:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnXlA-0003BH-LH for submit@debbugs.gnu.org; Wed, 29 Apr 2015 15:35:06 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnXlA-0003AL-I9 for submit@debbugs.gnu.org; Wed, 29 Apr 2015 15:35:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnXl8-00083a-Vv for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 15:35:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnXl4-00033q-6e for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 15:35:02 -0400 Original-Received: from www.leafac.com ([104.236.80.74]:59156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnXl4-00033g-0m for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2015 15:34:58 -0400 Original-Received: from leafac (c-73-200-221-142.hsd1.md.comcast.net [73.200.221.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: me@leafac.com) by www.leafac.com (Postfix) with ESMTPSA id 3FF9366064 for ; Wed, 29 Apr 2015 15:34:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=www.leafac.com; s=mail; t=1430336097; bh=ezRgoBINXcfW5EC+5BwvDhwa+p4V2FJQ1h3r2bXNd00=; h=From:To:Subject:Date:From; b=D5ZKVl4uk2ze+YcneaYGz+28BjkkMyhOF39+gaBFptZ6+b0LdJ+9Qo93JgZUH0xBJ kJTtbeaeBtX7Xmejdo+I95TDx0hQ215zMiM4qLyqWl/WJ+ipac9EbHXzuh5b4DHgx5 WGOK4SYzuvMxge0bp2NeE/6xC2DxJTaGYTMc8vYs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Wed, 29 Apr 2015 16:30:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102259 Archived-At: I'm trying to retrieve a URL hosted on CloudFlare with Universal SSL enabled (more about what's that here: https://blog.cloudflare.com/introducing-universal-ssl/). The following command is the one causing the issue: (url-retrieve-synchronously "https://kill-the-newsletter.com") As you can see on the "Recent messages" section of this bug report, I'm getting back a -12 error, which by the GnuTLS manual means "GNUTLS_E_FATAL_ALERT_RECEIVED: A TLS fatal alert has been received." But then I tried connecting with the server using the `gnutls-cli' tool provided by GnuTLS itself. From the command line, I ran: $ gnutls-cli kill-the-newsletter.com And it worked. This leads me to conclude that somehow `gnutls.c' in Emacs is calling the library in a way it shouldn't. I'd love to help fix this myself, but I'm not experienced with C programming outside the assignments I did as an undergrad a few years ago, and I don't understand the internals of Emacs and GnuTLS very well. So I ask you to please guide me on the right direction. Thanks! In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2) of 2015-04-17 on andyrtr Windowing system distributor `The X.Org Foundation', version 11.0.11701000 Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-: C-g M-: ( C-y SPC " h t t p s : / / k i l l - t h e - n e w s l e t t e r . c o m " ) q M-: C-S-e M-w C-g M-x e m a s c s - r e p o r e p o r t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Quit Contacting host: kill-the-newsletter.com:443 gnutls.c: [0] (Emacs) fatal error: A TLS fatal alert has been received. gnutls.c: [0] (Emacs) Received alert: Internal error gnutls.el: (err=[-12] A TLS fatal alert has been received.) boot: (:priority NORMAL :hostname kill-the-newsletter.com :loglevel 0 :min-prime-bits 256 :trustfiles (/etc/ssl/certs/ca-certificates.crt) :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :callbacks nil) Entering debugger... Back to top level. Quit Making completion list... Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail mail-utils help-mode easymenu debug gnutls cl-loaddefs cl-lib network-stream starttls url-http tls mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util help-fns mail-prsvr password-cache url-vars mailcap time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 91117 5130) (symbols 48 19938 0) (miscs 40 45 118) (strings 32 18371 4972) (string-bytes 1 493143) (vectors 16 11427) (vector-slots 8 411227 6068) (floats 8 74 213) (intervals 56 245 1) (buffers 960 13) (heap 1024 38752 1009)) -- Leandro Facchinetti https://www.leafac.com GPG key: 3DF3D583