List Info

Thread: Re: url-retrieve-synchronously randomly fails on https URLs (patch included)




Re: url-retrieve-synchronously randomly fails on https URLs (patch included)
country flaguser name
Sweden
2007-11-05 04:26:46
Richard Stallman <rmsgnu.org> writes:

> Simon, would you please add comments near the code in
GNUtls that
> outputs these messages, telling people to watch out for
the need for
> Emacs to detect the last part of the messages?

Done, the GnuTLS code now contains:

  /* Warning!  Do not touch this text string, it is used by
external
     programs to search for when gnutls-cli has reached this
point. */
  printf ("n- Simple Client Mode:nn");

etc

> +   ;; `gnutls` regexp
> +   (sequence
> +    ;; see src/cli.c lines 721--
> +    (sequence line-start "- Simple Client
Mode:n")
> +    (zero-or-more
> +     (or
> +      "n" ; ignore blank lines
> +      ;; XXX: we have no way of knowing if the
STARTTLS handshake
> +      ;; sequence has completed successfully, because
`gnutls` will
> +      ;; only report failure.
> +      (sequence line-start "*** Starting TLS
handshaken"))))))


I also installed the following patch, because I think the
above comment
was incorrect.

/Simon

Index: lisp/ChangeLog
============================================================
=======
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.12157
diff -u -p -r1.12157 ChangeLog
--- lisp/ChangeLog	5 Nov 2007 09:06:25 -0000	1.12157
+++ lisp/ChangeLog	5 Nov 2007 10:25:21 -0000
 -1,3
+1,7 
+2007-11-05  Simon Josefsson  <simonjosefsson.org>
+
+	* net/tls.el (tls-end-of-info): Doc fix.
+
 2007-11-05  Kenichi Handa  <handani.aist.go.jp>
 
 	* international/utf-7.el (utf-7-imap): New coding system.
Index: lisp/net/tls.el
============================================================
=======
RCS file: /sources/emacs/emacs/lisp/net/tls.el,v
retrieving revision 1.21
diff -u -p -r1.21 tls.el
--- lisp/net/tls.el	4 Nov 2007 01:25:49 -0000	1.21
+++ lisp/net/tls.el	5 Nov 2007 10:25:21 -0000
 -65,9
+65,9 
    ;; `gnutls' regexp. See src/cli.c lines 721-.
    "^- Simple Client Mode:n"
    "\(n\|"                           ; ignore
blank lines
-   ;; XXX: We have no way of knowing if the STARTTLS
handshake sequence
-   ;; has completed successfully, because `gnutls' will
only report
-   ;; failure.
+   ;; According to src/cli.c lines 640-650 and 705-715 the
handshake
+   ;; will start after this message.  If the handshake
fails, the
+   ;; programs will abort.
    "^\*\*\* Starting TLS handshaken\)*"
    "\)")
   "Regexp matching end of TLS client informational
messages.


_______________________________________________
Emacs-devel mailing list
Emacs-develgnu.org
htt
p://lists.gnu.org/mailman/listinfo/emacs-devel

Re: url-retrieve-synchronously randomly fails on https URLs (patch included)
user name
2007-11-05 09:01:03
Thanks Simon,

just a nitpick:

> +   ;; According to src/cli.c lines 640-650 and 705-715
the handshake
> +   ;; will start after this message.  If the handshake
fails, the
> +   ;; programs will abort.

Those line numbers will probably not last eternally, so
please add some
revision information (e.g. the date).


        Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-develgnu.org
htt
p://lists.gnu.org/mailman/listinfo/emacs-devel

Re: url-retrieve-synchronously randomly fails on https URLs (patch included)
country flaguser name
Italy
2007-11-06 05:22:49
Il 2007-11-05, Simon Josefsson <simonjosefsson.org> ha scritto:
>> +      ;; XXX: we have no way of knowing if the
STARTTLS handshake
>> +      ;; sequence has completed successfully,
because `gnutls` will
>> +      ;; only report failure.
>> +      (sequence line-start "*** Starting
TLS handshaken"))))))
>
> I also installed the following patch, because I think
the above comment
> was incorrect.
>

That comment's purpose was to point out that there might be
cases in
which `open-tls-stream' will exit successfully, returning
the buffer
to the caller (as all of `tls-success' and `tls-end-of-info'
matched),
*still* the TLS connection failed.


-- 
Riccardo Murri, via Galeazzo Alessi 61, 00176 Roma




_______________________________________________
Emacs-devel mailing list
Emacs-develgnu.org
htt
p://lists.gnu.org/mailman/listinfo/emacs-devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )