From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lawrence Mitchell Newsgroups: gmane.emacs.bugs Subject: bug#9036: [PATCH] gnutls: Add option to set minimum acceptable Diffie-Hellman key size Date: Sat, 16 Jul 2011 11:27:30 +0100 Message-ID: <87zkkefrl9.fsf@gmx.li> References: <87ei1zpl0x.fsf@ed.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1310812109 18337 80.91.229.12 (16 Jul 2011 10:28:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Jul 2011 10:28:29 +0000 (UTC) To: 9036@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 16 12:28:25 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qi26g-0001bz-UK for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Jul 2011 12:28:23 +0200 Original-Received: from localhost ([::1]:42476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi26f-0002Lm-Ur for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Jul 2011 06:28:22 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi26O-0002La-Gh for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 06:28:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qi26N-0000Hi-8w for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 06:28:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi26N-0000HY-7M for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 06:28:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qi26M-00042k-PV; Sat, 16 Jul 2011 06:28:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87ei1zpl0x.fsf@ed.ac.uk> Resent-From: Lawrence Mitchell Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jul 2011 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.131081207515530 (code B ref -1); Sat, 16 Jul 2011 10:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jul 2011 10:27:55 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qi26F-00042R-GJ for submit@debbugs.gnu.org; Sat, 16 Jul 2011 06:27:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qi26D-00042E-T1 for submit@debbugs.gnu.org; Sat, 16 Jul 2011 06:27:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qi267-0000H1-K2 for submit@debbugs.gnu.org; Sat, 16 Jul 2011 06:27:48 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:55488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi267-0000Gx-Ia for submit@debbugs.gnu.org; Sat, 16 Jul 2011 06:27:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi266-0002L2-Ao for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 06:27:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qi265-0000Gn-Av for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 06:27:46 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:41265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi265-0000Gh-3w for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 06:27:45 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qi263-0001NB-85 for bug-gnu-emacs@gnu.org; Sat, 16 Jul 2011 12:27:43 +0200 Original-Received: from host109-152-217-108.range109-152.btcentralplus.com ([109.152.217.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Jul 2011 12:27:43 +0200 Original-Received: from wence by host109-152-217-108.range109-152.btcentralplus.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Jul 2011 12:27:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: host109-152-217-108.range109-152.btcentralplus.com User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Nk3Erk9R7GChmm7nQN4BvypIk0U= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 16 Jul 2011 06:28:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:49243 Archived-At: Lars Magne Ingebrigtsen wrote: > Lawrence Mitchell writes: >> With the recent gnutls changes I could no longer send mail with >> STARTTLS since the smtp server I connect to only advertises a D-H >> key with 512bits. This is smaller than the default value gnutls >> allows and so the connection would be aborted. This patch adds >> the ability to set the minimum acceptable size of key, so that I >> can send email again! > Thanks; I'll apply your patch. > However, is there any way to make the gnutls library adjust the size > downwards automatically if it's too big? The handshake returns GNUTLS_E_DH_PRIME_UNACCEPTABLE if the number of server prime bits is too low. I don't know how to query the size of the server prime. Maybe gnutls_dh_get_prime_bits? I'm wary to automatically adjust downwards. A better error message (pointing at the existance of gnutls-min-prime-bits) in the case of this failure mode would probably be good though. I'll try and cook up a patch in the next few days. Lawrence -- Lawrence Mitchell