From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Baines Newsgroups: gmane.lisp.guile.bugs Subject: bug#70645: Reliable HTTPS networking Date: Mon, 29 Apr 2024 11:51:36 +0100 Message-ID: <875xw01lxj.fsf@cbaines.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30936"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.2; emacs 29.3 To: 70645@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Apr 29 12:53:12 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s1OdB-0007m3-MA for guile-bugs@m.gmane-mx.org; Mon, 29 Apr 2024 12:53:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1Ocr-0008SL-Bj; Mon, 29 Apr 2024 06:52:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1Ocl-0008Kw-UK for bug-guile@gnu.org; Mon, 29 Apr 2024 06:52:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s1Ock-0005Ok-QP for bug-guile@gnu.org; Mon, 29 Apr 2024 06:52:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s1Od4-0006Ni-MX for bug-guile@gnu.org; Mon, 29 Apr 2024 06:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 29 Apr 2024 10:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70645 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171438793924496 (code B ref -1); Mon, 29 Apr 2024 10:53:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Apr 2024 10:52:19 +0000 Original-Received: from localhost ([127.0.0.1]:56534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1OcM-0006N2-UB for submit@debbugs.gnu.org; Mon, 29 Apr 2024 06:52:19 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:51982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1OcL-0006Ms-DE for submit@debbugs.gnu.org; Mon, 29 Apr 2024 06:52:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1Obr-0007U5-4T for bug-guile@gnu.org; Mon, 29 Apr 2024 06:51:47 -0400 Original-Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1Obl-0005HR-VZ for bug-guile@gnu.org; Mon, 29 Apr 2024 06:51:43 -0400 Original-Received: from localhost (unknown [212.132.255.10]) by mira.cbaines.net (Postfix) with ESMTPSA id B236A27BBE2 for ; Mon, 29 Apr 2024 11:51:39 +0100 (BST) Original-Received: from felis (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 1fab5586 for ; Mon, 29 Apr 2024 10:51:39 +0000 (UTC) Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10821 Archived-At: --=-=-= Content-Type: text/plain For years now I've been trying to work out how to do reliable HTTPS networking with Guile, where reliable just means that it can't hang indefinitely. After a few wrong turns, I believe the way to do this is use non-blocking ports as that combined with suspendable ports in Guile allows you to provide current-read-waiter/current-write-waiter procedures that will timeout at some point. I think the final hurdle is to get tls-wrap in (web client) to support Asynchronous operation with GnuTLS [1] and I think there are only a couple of things missing. make-session needs passing connection-flag/nonblock and error/again plus error/interrupted exceptions need handling for the handshake using the information from record-get-direction about whether Guile should wait to write or read. 1: https://gnutls.org/manual/html_node/Asynchronous-operation.html I think I forgot to move things forward after guile-gnutls 4.0.0 released with record-get-direction, so I'm opening this bug to try and keep track of things. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmYve7hfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XfnlhAArWnkH3YMqRxXbe+91T772lJq7LEto6EX bWXZB01e2NuinHvzNzM60CVVlb7/WQ/+F5fuK+/bYNI0zYqyYHsPaZfK5NXMsVRi SqvLmuhFGsEe7Lsf7nTWFeDf14J/2W3Pwa+ZzHI007R1iX/rBXARtWUSD0xPoHza 1cOsPT0R4PSi/EG413DYtxL/3d07MoFso5B0Am1IxrnxlL2PwaYuuw74h8qNjKpR SqkV3DrAeXrboURtWSZMEOwaH85nHu+S3RxNi0PF0fvK2WLU89m/B/RHcD/ujrX8 vcRiNiceha30uiCPynWcvBWGp5Rl9a15R3CGOL39Qqx+SgFBpXKb7hjwF/eCc69K jUTYtWc4krZaDCDQ5gsHXPFBdv0YMEQ/FCwoMQKE8HbSQor4sJdgFroQPh1XRsDm 2Odx/4+9pUTN2Q2PLHyps0vy96FZnkPU84nO3BZX/Bm9XXPsxc3hoQVJ8h05ljV/ DuavaHHJ1neJjK8R30Ex8J6F/jl3MHRSr7SXD3GN+pUcR0/jJnnkVWHqM4lGdrVa FwEDDmnT0MWhBcwT4SfBu1gknmBGhIoH64NaqH8EMiubz35J6T5LgnyA49c1OuMG 5px8aOVaMqaTVRpE7fLTXdNXBOZ97cxF1caz4MpWD76W2Mz8XcJ+GGK3pnn9eabm n2FtXs4JOXU= =GopD -----END PGP SIGNATURE----- --=-=-=--