Magic number for SSLRequest

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: maxtardiveau(at)yahoo(dot)com
Subject: Magic number for SSLRequest
Date: 2020-09-18 09:22:31
Message-ID: 160042095164.14056.845885391728089260@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/protocol-message-formats.html
Description:

On page: https://www.postgresql.org/docs/11/protocol-message-formats.html

it says for SSLRequest packet:

Int32(80877103)
The SSL request code. The value is chosen to contain 1234 in the most
significant 16 bits, and 5679 in the least significant 16 bits.

I don't see how that works. 0x12345678 is 305,419,897.

80877103 decimal in hex is 0x04D2162F

I looked at the packet using Wireshark and it is indeed 0x4D2162F, so the
documentation is correct, except for the explanation about why this number.
It looks like an arbitrary number to me. Not that there's anything wrong
with that.

I suggest removing the sentence "The value is chosen to contain 1234 in the
most significant 16 bits, and 5679 in the least significant 16 bits." which
seems incorrect to me.

Thanks!

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Magnus Hagander 2020-09-18 11:08:55 Re: Magic number for SSLRequest
Previous Message Tom Lane 2020-09-16 19:22:52 Re: How to interpret the salt sent in the AuthenticationMD5Password message from the server.