On Wed, Feb 21, 2007, Lutz Jaenicke wrote: > Goetz Babin-Ebell wrote: > > Lutz Jaenicke wrote: > > > Goetz Babin-Ebell wrote: > > [...] > > >> * in SMTP doing a STARTTLS without previous EHLO > > >> will return a > > >> 503 STARTTLS command used when not advertised > > >> * in IMAP doing a STARTLS requires a > > >> . CAPABILITY > > >> first. > > >> > > >> In both cases the server response should be parsed for > > >> the string "STARTTLS"... > > >> > > > This statement is technically correct. As the s_client tool is however > > > intended for testing purposes only (you remember that a capital > > > "R" at the beginning of the line will start a renegotiation instead > > > of being transferred to the server :-) adding the EHLO and .CAPABILITY > > > should be sufficient and the more complex parsing of the response > > > might be omitted... > > > > Do you want something like the attached patch ? > > (untested, I'm off to bed...) > > > Yes, something like this. I have applied your patch to 0.9.8 and -dev... and > was just going to write "thank you" when I discovered that it does not work. > As I just noted BIO_read() does not work "line by line" but on the message > coming in. This message is the complete multi-line response and it has > to be parsed in a different way as attached as a crude hack. > > No: BIO_gets() does not work on here (not supported on "connect BIO". >
Note that adding a buffering BIO to the chain is a simple way to fix this. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]