Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?
Дата
Msg-id 1973.1501442278@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] PostgreSQL not setting OpenSSL session id context?  (Shay Rojansky <roji@roji.org>)
Ответы Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Shay Rojansky <roji@roji.org> writes:
> When trying to connect with Npgsql to PostgreSQL with client authentication
> (PG has ssl_ca_file set), the first connection works just fine. The second
> connection, however, fails and the PostgreSQL logs contain the message
> session id context uninitialized". This occurs when using .NET's default
> SSL implementation, SslStream, which supports session resumption - the
> session connection's ClientHello message contains a session ticket from the
> first session, triggering the issue.

AFAIK Postgres doesn't support session resumption.  If I am correctly
understanding what that is supposed to provide, it would require saving
all of a backend's internal state on the off chance that somebody would
request resuming the session later.  I do not think we are going there.
The idea makes sense for servers with relatively lightweight per-session
state, but that ain't us.

I think what you need to do is tell SslStream not to expect that PG
servers will do session resumption.  (I'm a bit astonished that that
would be its default assumption in the first place, but whatever.)
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: [HACKERS] PostgreSQL not setting OpenSSL session id context?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] PostgreSQL not setting OpenSSL session id context?