Hannu Krosing <hannu(at)tm(dot)ee> writes:
>> One possibility is to forget the direct call to recv() and use
>> pqReadData --- since conn->ssl isn't set yet, and we aren't expecting
>> the server to send more than one byte, this should in theory be safe.
> I was scared by the comment before recv(...,1,0) which said we must be
> careful not to read more than 1 byte
When I wrote that, I was trying to assume as little as possible about
the SSL protocol. The only way there could be a problem is if the
server is first to send during the SSL negotiation handshake; which
seems odd but not impossible. Anyone know for sure?
regards, tom lane