From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Zheng Newsgroups: gmane.emacs.bugs Subject: bug#19231: 25.0.50; [PATCH] Fix recent GnuTLS change for MinGW-w64 Date: Wed, 03 Dec 2014 12:37:47 +0800 Message-ID: <20141203.123747.2258800522354877276.chriszheng99@gmail.com> References: <20141202.210337.671564019439610331.chriszheng99@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1417581571 29038 80.91.229.3 (3 Dec 2014 04:39:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2014 04:39:31 +0000 (UTC) Cc: 19231@debbugs.gnu.org To: larsi@gnus.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 03 05:39:21 2014 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 1Xw1ii-0001cO-Nn for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Dec 2014 05:39:20 +0100 Original-Received: from localhost ([::1]:39795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xw1ii-0000iT-8g for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Dec 2014 23:39:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xw1iX-0000i8-By for bug-gnu-emacs@gnu.org; Tue, 02 Dec 2014 23:39:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xw1iR-0007gs-0Y for bug-gnu-emacs@gnu.org; Tue, 02 Dec 2014 23:39:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xw1iQ-0007go-Ta for bug-gnu-emacs@gnu.org; Tue, 02 Dec 2014 23:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xw1iQ-0002yv-Fz for bug-gnu-emacs@gnu.org; Tue, 02 Dec 2014 23:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chris Zheng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Dec 2014 04:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19231 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19231-submit@debbugs.gnu.org id=B19231.141758149111397 (code B ref 19231); Wed, 03 Dec 2014 04:39:02 +0000 Original-Received: (at 19231) by debbugs.gnu.org; 3 Dec 2014 04:38:11 +0000 Original-Received: from localhost ([127.0.0.1]:52264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xw1hX-0002xi-IA for submit@debbugs.gnu.org; Tue, 02 Dec 2014 23:38:11 -0500 Original-Received: from mail-pa0-f45.google.com ([209.85.220.45]:54054) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xw1hR-0002xC-G1 for 19231@debbugs.gnu.org; Tue, 02 Dec 2014 23:38:05 -0500 Original-Received: by mail-pa0-f45.google.com with SMTP id lj1so14998542pab.32 for <19231@debbugs.gnu.org>; Tue, 02 Dec 2014 20:38:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=GfO1uO4Tevt7JcKqhNaQhecZiqPqqj5hbLnLhSmVPio=; b=dXSTpMA4RVqdhUEmKTAxJ2WgpzR+lgIYgu4gKwcPdj/53QM3MPu4RDNl+Zpn2ILTcL S5cJFJSwr3oDF+5KAMfuq0HPH61xLEwIJcfQmsOLWn0i8rNRkklBos4DED7r9G5QjxWl 3MWtEQ9rkg2QZbHJFtdWMMu77EuySQXM0a3NDFKlkYFrSET519FXTTeME7Uk1Zi1WpCR jMO7a8FAeJ1MylrZWNIHlNeZUM/YFX3spigwqWg7YlM8vLLzxWDIwD95X+B/vn02Rrd9 1A7jJtuAdfLjX6VRqUIAOdv8qJjhZkyo4wqMTNVj0s5WJ8bRV4LAj4MozWkLjrkBTxl0 XQUw== X-Received: by 10.66.66.135 with SMTP id f7mr4706151pat.81.1417581480449; Tue, 02 Dec 2014 20:38:00 -0800 (PST) Original-Received: from localhost ([211.64.141.155]) by mx.google.com with ESMTPSA id pl3sm21636532pbb.50.2014.12.02.20.37.57 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 02 Dec 2014 20:37:59 -0800 (PST) In-Reply-To: X-Mailer: Mew version 6.6 on Emacs 25.0.50 / Mule 6.0 (HANACHIRUSATO) 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:96818 Archived-At: From: Lars Magne Ingebrigtsen Subject: Re: bug#19231: 25.0.50; [PATCH] Fix recent GnuTLS change for MinGW-w64 Date: Tue, 02 Dec 2014 17:37:12 +0100 Hi, > Great. Could you redo the patch without the #ifdefs, and just call > fn_gnutls_sign_get_name on all architectures? I don't have older version, maybe we should ask for compatibility check. The revised patch is as follows. >From 7c9c759c33e34c3cc5d031ae15ac9bb3d05a37e3 Mon Sep 17 00:00:00 2001 From: Chris Zheng Date: Wed, 3 Dec 2014 12:05:13 +0800 Subject: [PATCH] Use gnutls_sign_get_name and load missing function. * src/gnutls.c (init_gnutls_functions, gnutls_certificate_details): use `gnutls_sign_get_name' directly. (init_gnutls_functions): Load missing `gnutls_server_name_set'. --- src/gnutls.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gnutls.c b/src/gnutls.c index 752df3c..7c61445 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -185,7 +185,7 @@ DEF_GNUTLS_FN (int, gnutls_x509_crt_get_key_id, (gnutls_x509_crt_t, unsigned int, unsigned char *, size_t *_size)); DEF_GNUTLS_FN (const char*, gnutls_sec_param_get_name, (gnutls_sec_param_t)); -DEF_GNUTLS_FN (const char*, gnutls_sign_algorithm_get_name, +DEF_GNUTLS_FN (const char*, gnutls_sign_get_name, (gnutls_sign_algorithm_t)); DEF_GNUTLS_FN (int, gnutls_server_name_set, (gnutls_session_t, gnutls_server_name_type_t, @@ -265,7 +265,8 @@ init_gnutls_functions (void) LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_signature); LOAD_GNUTLS_FN (library, gnutls_x509_crt_get_key_id); LOAD_GNUTLS_FN (library, gnutls_sec_param_get_name); - LOAD_GNUTLS_FN (library, gnutls_sign_algorithm_get_name); + LOAD_GNUTLS_FN (library, gnutls_sign_get_name); + LOAD_GNUTLS_FN (library, gnutls_server_name_set); max_log_level = global_gnutls_log_level; @@ -337,7 +338,7 @@ init_gnutls_functions (void) #define fn_gnutls_x509_crt_get_signature gnutls_x509_crt_get_signature #define fn_gnutls_x509_crt_get_key_id gnutls_x509_crt_get_key_id #define fn_gnutls_sec_param_get_name gnutls_sec_param_get_name -#define fn_gnutls_sign_algorithm_get_name gnutls_sign_algorithm_get_name +#define fn_gnutls_sign_get_name gnutls_sign_get_name #define fn_gnutls_server_name_set gnutls_server_name_set #endif /* !WINDOWSNT */ @@ -928,7 +929,7 @@ gnutls_certificate_details (gnutls_x509_crt_t cert) err = fn_gnutls_x509_crt_get_signature_algorithm (cert); if (err >= GNUTLS_E_SUCCESS) { - const char *name = fn_gnutls_sign_algorithm_get_name (err); + const char *name = fn_gnutls_sign_get_name (err); if (name) res = nconc2 (res, list2 (intern (":signature-algorithm"), build_string (name))); -- 2.2.0