| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | syatskevich(at)n21lab(dot)gosniias(dot)msk(dot)ru, pgsql-bugs(at)postgresql(dot)org | 
| Subject: | Re: Bug #925: typing error in src/backend/libpq/be-secure.c | 
| Date: | 2003-03-29 05:02:24 | 
| Message-ID: | 200303290502.h2T52Os26779@candle.pha.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
Actually, the docs say SSL_read/write can error needing READ or WRITE:
http://www.openssl.org/docs/ssl/SSL_read.html#
The SSL_write docs are the same.  I have applied the following patch to
handle both new cases.  Does this help the SSL test program you have?
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Yep, typo.  Patched to CVS current and backpatched to 7.3.X.
> 
> I think this fix is exactly backward.  Why would SSL_write need to
> return ERROR_WANT_WRITE?  It couldn't.  The correct fix is that
> SSL_write might return ERROR_WANT_READ, for which reading would be
> the right response.
> 
> BTW the real problem, both here and elsewhere in this file, is the
> lack of a "default: elog-out" case in the switch statements.  This
> code will simply break if any unexpected case occurs.
> 
> 			regards, tom lane
> 
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
| Attachment | Content-Type | Size | 
|---|---|---|
| unknown_filename | text/plain | 957 bytes | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-03-29 07:01:43 | Re: Bug #925: typing error in src/backend/libpq/be-secure.c | 
| Previous Message | Tom Lane | 2003-03-29 04:23:37 | Re: Bug #925: typing error in src/backend/libpq/be-secure.c |