* imap: Garbage: RENEGOTIATING
@ 2000-12-30 16:23 NAGY Andras
0 siblings, 0 replies; only message in thread
From: NAGY Andras @ 2000-12-30 16:23 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]
I'm using openssl to connect to my imap server, and sometimes emacs
prints "Garbage: RENEGOTIATING" and the connection hangs. Figured out
that actually openssl (OpenSSL 0.9.4 09 Aug 1999) prints this and
confuses imap.el.
The reason is that openssl interprets an R as the first character on a
line as some kind of escape sequence and reacts:
lovi:~% openssl s_client -ssl3 -connect pandora.inf.elte.hu:993
[...]
---
* OK pandora Cyrus IMAP4 v2.0.7 server ready
RABCD # I type this
RENEGOTIATING
depth=0 /C=HU/ST=Hungary/L=Budapest/O=ELTE/OU=Department of Computer Science/CN=mailbox.inf.elte.hu/Email=root@inf.elte.hu
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /C=HU/ST=Hungary/L=Budapest/O=ELTE/OU=Department of Computer Science/CN=mailbox.inf.elte.hu/Email=root@inf.elte.hu
verify error:num=21:unable to verify the first certificate
verify return:1
* BYE Error 0
read:errno=0
Using the -quiet option[1] to s_client is the solution:
lovi:~% openssl s_client -quiet -ssl3 -connect pandora.inf.elte.hu:993
[...]
* OK pandora Cyrus IMAP4 v2.0.7 server ready
RABCD
* BAD Invalid tag
Therefore uploading a message matching the regexp "^R" makes the
connection hang. (At least, sometimes, as most messages stored in my
archive groups are followups, containing a _R_eferences header, but
only a few upload results in garbage: renegotiating. Can't find the
pattern.)
See attached patch for fix. Not sure whether this does not break
compatibility with older openssl versions, as the -quiet option might
not be available there.
Andras
[1]
-quiet
inhibit printing of session and certificate
information. This implicitely turns on -ign_eof as
well.
-ign_eof
inhibit shutting down the connection when end of
file is reached in the input.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: imap-quiet.diff --]
[-- Type: text/x-patch, Size: 809 bytes --]
diff -u -r6.3 imap.el
--- imap.el 2000/12/19 22:18:56 6.3
+++ imap.el 2000/12/30 16:06:56
@@ -188,10 +188,10 @@
:group 'imap
:type '(repeat string))
-(defcustom imap-ssl-program '("openssl s_client -ssl3 -connect %s:%p"
- "openssl s_client -ssl2 -connect %s:%p"
- "s_client -ssl3 -connect %s:%p"
- "s_client -ssl2 -connect %s:%p")
+(defcustom imap-ssl-program '("openssl s_client -quiet -ssl3 -connect %s:%p"
+ "openssl s_client -quiet -ssl2 -connect %s:%p"
+ "s_client -ssl3 -quiet -connect %s:%p"
+ "s_client -ssl2 -quiet -connect %s:%p")
"A string, or list of strings, containing commands for SSL connections.
Within a string, %s is replaced with the server address and %p with
port number on server. The program should accept IMAP commands on
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-30 16:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-30 16:23 imap: Garbage: RENEGOTIATING NAGY Andras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).