Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJEGT-0000QN-2r for pgsql-docs@arkaria.postgresql.org; Fri, 18 Sep 2020 11:09:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kJEGR-000780-R8 for pgsql-docs@arkaria.postgresql.org; Fri, 18 Sep 2020 11:09:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJEGR-00077t-HF for pgsql-docs@lists.postgresql.org; Fri, 18 Sep 2020 11:09:15 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kJEGK-0004XX-Q2 for pgsql-docs@lists.postgresql.org; Fri, 18 Sep 2020 11:09:14 +0000 Received: by mail-lf1-x12e.google.com with SMTP id x69so5690840lff.3 for ; Fri, 18 Sep 2020 04:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=hQ8Fx7GDpRy41AOAGco6CPtpzQ8MTkyQmCx/hOwbjVs=; b=dIomUvf4aeofv0yel6rL7TdEMtJpU44KLwZXR9JwDzbsB2yAT2p33taiGJxfyJGRx1 5Gsr9Em/xAxg3jwGaKhawzhI/wRPW87wXJ47Db63NOdGM6TL59GgLeilYsnD75X8VniM dokNATArZtG1Crxwxsi25F85RdPsy//m2RmrX9YfAyL2F+h3MPUnZlZ4MumhtEqI30or JWOdNRPYmxHpAUl9fRncEkF4k6+IyWxty+BS0Ca6MaOn68v0U4DCoceXuZ7eUqFqz68u E87l1p9gHWFEOMwFgo7b6PScgWYqJywYmu0ieE/SYVcblL3VbhCWi0jTc7lnLtZ8vKAC mzKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=hQ8Fx7GDpRy41AOAGco6CPtpzQ8MTkyQmCx/hOwbjVs=; b=d3rgachHHRKnjZVg1Vm+owdwshTswsWDInHYfUDUMaAhQgdXqked4eGTCoQPaO6vED DHqYZg4b/Gt7LqLE3TVJgo0C2BizIZPfPqnw02B/gCefNvtefP8J3qHEJx0oOsYBV/5h okolPIzSTsV8IVRJmPe0iJwwMFtVHiSqlrIT0MaBZHqWIMqAlgV/f5WWm8AQJv+zTnaW ZwFRdblnjkYQNH7BrGVoP+1vmhvPrgFl/qXc6huD2MKx9Dg/IGNM8p4p2DzjE+VsBhaO TbZxr6KAIu6UFKTr/Pitz9k7v9HDIXucntrr7nxcTvyrOoU1Ctt6vprK/q6deFJwRcLU SIaQ== X-Gm-Message-State: AOAM532TGtL6hLMg9fAqcZsYVd5/8/g6pCuFFNe7pWtuEOrjcd3w4B4/ 2iATWGgX8oKiD88OnzLloV8HkptNclgt9kf1zagCjA== X-Google-Smtp-Source: ABdhPJwzKQMjR42DLi+he9xDpChYBvnBPmkzZJel2iH7+t3lUiSi7cKfn+d8VLL04lPgkIQnxzVh5W6JCo74DIZN5nU= X-Received: by 2002:a19:d13:: with SMTP id 19mr11758778lfn.402.1600427346858; Fri, 18 Sep 2020 04:09:06 -0700 (PDT) MIME-Version: 1.0 References: <160042095164.14056.845885391728089260@wrigleys.postgresql.org> In-Reply-To: <160042095164.14056.845885391728089260@wrigleys.postgresql.org> From: Magnus Hagander Date: Fri, 18 Sep 2020 13:08:55 +0200 Message-ID: Subject: Re: Magic number for SSLRequest To: maxtardiveau@yahoo.com, Pg Docs Content-Type: multipart/alternative; boundary="0000000000007fa7b405af948796" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000007fa7b405af948796 Content-Type: text/plain; charset="UTF-8" On Fri, Sep 18, 2020 at 1:07 PM PG Doc comments form wrote: > 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 > It's 1234 and 5679, not 0x1234 and 0x5679. That is, it's decimal, not hexadecimal. 0x04D2 = 1234 0x162F = 5679 -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ --0000000000007fa7b405af948796 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Sep 18, 2020 at 1:07 PM PG Do= c comments form <noreply@postg= resql.org> wrote:
The following documentation comment has been logged on the websi= te:

Page: https://www.postgresql.org/doc= s/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= t's 1234 and 5679, not 0x1234 and 0x5679. That is, it's decimal, no= t hexadecimal.

0x04D2 =3D 1234
0x162F = =3D 5679

--
--0000000000007fa7b405af948796--