From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] GnuTLS support on Woe32 Date: Tue, 3 May 2011 04:27:55 +0200 Message-ID: References: <87ipvwl1nx.wl%claudio.bley@gmail.com> <87wrjquacf.fsf@lifelogs.com> <87lj05svwh.fsf@lifelogs.com> <87bp11imgb.wl%claudio.bley@gmail.com> <8739mc5nes.fsf@lifelogs.com> <87ipuubao6.fsf@lifelogs.com> <87fwpjfkkz.fsf@lifelogs.com> <87bp072fb1.fsf@lifelogs.com> <874o5vimm5.fsf@lifelogs.com> <87zknjmcyk.fsf@lifelogs.com> <87sjta2zvp.fsf@lifelogs.com> <87liyzglkh.fsf@lifelogs.com> <4DB77682.1070605@gmail.com> <8762q04ba1.fsf@lifelogs.com> <87hb9dufao.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf303a30ef9f738c04a255e55e X-Trace: dough.gmane.org 1304389726 28680 80.91.229.12 (3 May 2011 02:28:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 May 2011 02:28:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 03 04:28:42 2011 Return-path: Envelope-to: ged-emacs-devel@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 1QH5Ls-0000LS-OB for ged-emacs-devel@m.gmane.org; Tue, 03 May 2011 04:28:41 +0200 Original-Received: from localhost ([::1]:39751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QH5Ls-0007wY-8x for ged-emacs-devel@m.gmane.org; Mon, 02 May 2011 22:28:40 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QH5Lo-0007wN-Sb for emacs-devel@gnu.org; Mon, 02 May 2011 22:28:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QH5Ln-0004iV-U6 for emacs-devel@gnu.org; Mon, 02 May 2011 22:28:36 -0400 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:34281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QH5Ln-0004iP-KU for emacs-devel@gnu.org; Mon, 02 May 2011 22:28:35 -0400 Original-Received: by gwaa12 with SMTP id a12so2618165gwa.0 for ; Mon, 02 May 2011 19:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=K8itU79lpn0NTnTHJ6+MesKVdgEde62H6tzrbQbJpCg=; b=lX+Hnk+QT6GpE9SJgDpmei727XyUh25ZGFiMWujUH5+XmS+yWF4XzxVLllslVF4X8f nxLVqXydgQhFHqH6Ot72DvszMH2P2V2+w6X9YZJkSe3MIbO3Xt4vBU5ZSo1JIxkWHlSh V19V4iHTC9X+mRP4bV66cNvZ3phA7z2P1IiGk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=lDNFVuAEo5Mch7p2KjQlmhZ+9GeV5i4U/UMi5X5U69is6W9vElRmyEOOCR4fcInJzx DNPBGAYKHlDzK/0Ziy0CuFGoQgHqoe7hFt6Cbex06Lu3hFX6+uet7HnnlOYjTUUDDUWM qTUX+nEGRnztEQqrXbDH1PwoLtlnuKWq4QVTM= Original-Received: by 10.236.149.41 with SMTP id w29mr1377999yhj.361.1304389715194; Mon, 02 May 2011 19:28:35 -0700 (PDT) Original-Received: by 10.147.182.5 with HTTP; Mon, 2 May 2011 19:27:55 -0700 (PDT) In-Reply-To: <87hb9dufao.fsf@lifelogs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139038 Archived-At: --20cf303a30ef9f738c04a255e55e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2011/5/2 Ted Zlatanov : > So we just need to modify `emacs_gnutls_global_init' to load and check > the GnuTLS library emacs_gnutls_global_init is called too late, after gnutls_global_set_log_function and gnutls_global_set_log_level have been called. I've chosen to call Fgnutls_available_p at the start of Fgnutls_boot. Please take a look at the attached patch, which is a rough cut; it lacks any documentation (no ChangeLog entries) and I'm not really sure what am I doing with the errors :-) Also, I haven't added GNUTLS_LOG calls; feel free to suggest them as appropriate. =C2=A0 =C2=A0 Juanma --20cf303a30ef9f738c04a255e55e Content-Type: application/octet-stream; name="gnutls2.patch" Content-Disposition: attachment; filename="gnutls2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gn87wwb00 PT09IG1vZGlmaWVkIGZpbGUgJ2xpc3AvdGVybS93MzItd2luLmVsJw0KLS0tIGxpc3AvdGVybS93 MzItd2luLmVsCTIwMTEtMDItMDMgMDc6MzE6NDIgKzAwMDANCisrKyBsaXNwL3Rlcm0vdzMyLXdp bi5lbAkyMDExLTA1LTAyIDAxOjEyOjQyICswMDAwDQpAQCAtMjA4LDcgKzIwOCw4IEBADQogICAg ICAgICAnKHN2ZyAibGlicnN2Zy0yLTIuZGxsIikNCiAgICAgICAgICcoZ2RrLXBpeGJ1ZiAibGli Z2RrX3BpeGJ1Zi0yLjAtMC5kbGwiKQ0KICAgICAgICAgJyh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cuICAqLw0KIA0KLSAgc3RyID0gZ251 dGxzX3N0cmVycm9yIChlcnIpOw0KKyAgc3RyID0gZm5fZ251dGxzX3N0cmVycm9yIChlcnIpOw0K ICAgaWYgKCFzdHIpDQogICAgIHN0ciA9ICJ1bmtub3duIjsNCiANCi0gIGlmIChnbnV0bHNfZXJy b3JfaXNfZmF0YWwgKGVycikpDQorICBpZiAoZm5fZ251dGxzX2Vycm9yX2lzX2ZhdGFsIChlcnIp KQ0KICAgICB7DQogICAgICAgcmV0ID0gZXJyOw0KICAgICAgIEdOVVRMU19MT0cyICgwLCBtYXhf bG9nX2xldmVsLCAiZmF0YWwgZXJyb3I6Iiwgc3RyKTsNCkBAIC0yMzMsOSArMzg1LDkgQEANCiAg IGlmIChlcnIgPT0gR05VVExTX0VfV0FSTklOR19BTEVSVF9SRUNFSVZFRA0KICAgICAgIHx8IGVy ciA9PSBHTlVUTFNfRV9GQVRBTF9BTEVSVF9SRUNFSVZFRCkNCiAgICAgew0KLSAgICAgIGludCBh bGVydCA9IGdudXRsc19hbGVydF9nZXQgKHNlc3Npb24pOw0KKyAgICAgIGludCBhbGVydCA9IGZu X2dudXRsc19hbGVydF9nZXQgKHNlc3Npb24pOw0KICAgICAgIGludCBsZXZlbCA9IChlcnIgPT0g R05VVExTX0VfRkFUQUxfQUxFUlRfUkVDRUlWRUQpID8gMCA6IDE7DQotICAgICAgc3RyID0gZ251 dGxzX2FsZXJ0X2dldF9uYW1lIChhbGVydCk7DQorICAgICAgc3RyID0gZm5fZ251dGxzX2FsZXJ0 X2dldF9uYW1lIChhbGVydCk7DQogICAgICAgaWYgKCFzdHIpDQogCXN0ciA9ICJ1bmtub3duIjsN CiANCkBAIC0zMTMsNyArNDY1LDcgQEANCiAgIGlmICghTlVNQkVSUCAoZXJyKSkNCiAgICAgZXJy b3IgKCJOb3QgYW4gZXJyb3Igc3ltYm9sIG9yIGNvZGUiKTsNCiANCi0gIGlmICgwID09IGdudXRs c19lcnJvcl9pc19mYXRhb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X2FsbG9jYXRlX2NsaWVudF9jcmVkZW50aWFscyAoJmFu b25fY3JlZCkgPCAwKQ0KICAgICAgICAgbWVtb3J5X2Z1bGwgKCk7DQogICAgIH0NCiAgIGVsc2UN CkBAIC01OTksNyArNzc3LDcgQEANCiAgICAgICAgICAgICB7DQogICAgICAgICAgICAgICBHTlVU TFNfTE9HMiAoMSwgbWF4X2xvZ19sZXZlbCwgInNldHRpbmcgdGhlIHRydXN0ZmlsZTogIiwNCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICBTU0RBVEEgKHRydXN0ZmlsZSkpOw0KLSAgICAgICAg ICAgICAgcmV0ID0gZ251dGxzX2NlcnRpZmljYXRlX3NldF94NTA5X3RydXN0X2ZpbGUNCisgICAg ICAgICAgICAgIHJldCA9IGZuX2dudXRsc19jZXJ0aWZpY2F0ZV9zZXRfeDUwOV90cnVzdF9maWxl DQogICAgICAgICAgICAgICAgICh4NTA5X2NyZWQsDQogICAgICAgICAgICAgICAgICBTU0RBVEEg KHRydXN0ZmlsZSksDQogICAgICAgICAgICAgICAgICBmaWxlX2Zvcm1hdCk7DQpAQCAtNjIxLDcg Kzc5OSw3IEBADQogICAgICAgICAgICAgew0KICAgICAgICAgICAgICAgR05VVExTX0xPRzIgKDEs IG1heF9sb2dfbGV2ZWwsICJzZXR0aW5nIHRoZSBrZXlmaWxlOiAiLA0KICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFNTREFUQSAoa2V5ZmlsZSkpOw0KLSAgICAgICAgICAgICAgcmV0ID0gZ251 dGxzX2NlcnRpZmljYXRlX3NldF94NTA5X2NybF9maWxlDQorICAgICAgICAgICAgICByZXQgPSBm bl9nbnV0bHNfY2VydGlmaWNhdGVfc2V0X3g1MDlfY3JsX2ZpbGUNCiAgICAgICAgICAgICAgICAg KHg1MDlfY3JlZCwNCiAgICAgICAgICAgICAgICAgIFNTREFUQSAoa2V5ZmlsZSksDQogICAgICAg ICAgICAgICAgICBmaWxlX2Zvcm1hdCk7DQpAQ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AgICAgR05VVExTX1g1MDlfRk1UX0RFUik7DQogDQogICAg ICAgaWYgKHJldCA8IEdOVVRMU19FX1NVQ0NFU1MpDQogICAgICAgICB7DQotICAgICAgICAgIGdu dXRsc194NTA5X2NydF9kZWluaXQgKGdudXRsc192ZXJpZnlfY2VydCk7DQorICAgICAgICAgIGZu X2dudXRsc194NTA5X2NydF9kZWluaXQgKGdudXRsc192ZXJpZnlfY2VydCk7DQogICAgICAgICAg IHJldHVybiBnbnV0bHNfbWFrZV9lcnJvciAocmV0KTsNCiAgICAgICAgIH0NCiANCi0gICAgICBp ZiAoIWdudXRsc194NTA5X2NydF9jaGVja19ob3N0bmFtZSAoZ251dGxzX3ZlcmlmeV9jZXJ0LCBj X2hvc3RuYW1lKSkNCisgICAgICBpZiAoIWZuX2dudXRsc194NTA5X2NydF9jaGVja19ob3N0bmFt ZSAoZ251dGxzX3ZlcmlmeV9jZXJ0LCBjX2hvc3RuYW1lKSkNCiAgICAgICAgIHsNCiAgICAgICAg ICAgaWYgKE5JTFAgKHZlcmlmeV9ob3N0bmFtZV9lcnJvcikpDQogICAgICAgICAgICAgew0KQEAg LTgwMSwxMyArOTc5LDEzIEBADQogICAgICAgICAgICAgfQ0KICAgICAgICAgICBlbHNlDQogICAg ICAgICAgICAgew0KLSAgICAgICAgICAgICAgZ251dGxzX3g1MDlfY3J0X2RlaW5pdCAoZ251dGxz X3ZlcmlmeV9jZXJ0KTsNCisgICAgICAgICAgICAgIGZuX2dudXRsc194NTA5X2NydF9kZWluaXQg KGdudXRsc192ZXJpZnlfY2VydCk7DQogICAgICAgICAgICAgICBlcnJvciAoIlRoZSB4NTA5IGNl cnRpZmljYXRlIGRvZXMgbm90IG1hdGNoIFwiJXNcIiIsDQogICAgICAgICAgICAgICAgICAgICAg Y19ob3N0bmFtZSk7DQogICAgICAgICAgICAgfQ0KICAgICAgICAgfQ0KIA0KLSAgICAgIGdudXRs c194NTA5X2NydF9kZWluaXQgKGdudXRsc192ZXJpZnlfY2V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