Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7JIX-004uNk-2j for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2024 18:24:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s7JIW-00408H-Qn for pgsql-hackers@arkaria.postgresql.org; Wed, 15 May 2024 18:24:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7JIW-003zxI-Gp for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2024 18:24:16 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s7JIS-000PHc-Ci for pgsql-hackers@lists.postgresql.org; Wed, 15 May 2024 18:24:15 +0000 Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-43e1d15a46eso21080291cf.0 for ; Wed, 15 May 2024 11:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1715797451; x=1716402251; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XwnKF4c8LJFlMhc0vQ51S4J2AplgKeMiw50QXRPhmiI=; b=WtxilRyqcJozJmog5WsDzO167JNEf9SJKjgwoaY+5BWbK1csY/GpAQgh6GE8Dz7LCt Zdd6+ux4XrkPHEcUd6aD1YsXyVgDbcSqZN1h4Gzjx10pfmU0WcOt4BwUXh/vDv/vA6jv Z6B7Wa0YZ5NidlCnK91Ou5QqfW7n9H76VJkjF19RElPEXb+8Buj4kmPi/Qiqiish+lsw eP4lrhmgNP2jiBW9KVg+VASw1oWiLOIPQzH6W4V6D0uGVBGFVF0GI/12oYMib18IMtoX 29ODvREcAXLLcfo4Esy3OVVpexqofbeI85vV6D/mtzV8X4AqEincSmA37YrbeS3wfaJU VzZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715797451; x=1716402251; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XwnKF4c8LJFlMhc0vQ51S4J2AplgKeMiw50QXRPhmiI=; b=dFKZSa0123iJUa0AN+0pkHRdwkmXbmU6VdJlEROHm+qOHdplAiphN1/sLVgAieCEo3 KcNEkzhD1W+emNR7xqR6Weq87L4uSbRqrG9BTjmsU87Wrfi/esYsdEvTLUshALMzUzju bWu1IYD1VOMJVz3SkMBlArSi2d33ImRBd/2mfg7hfkrti0zrFuHrr7fz13HEX4ySHvfi v3oexmk81MCRa4kSmXP8EkeoBs8IahLBQryqm+ikE2JTdFzSnKuxKXfaIqol3pBxOMrE o/jfJxgahgEeXOskge6fJgY4KiHAm10I3zu2/TPQ6A6XTogZvPzvx9iCoMqzihCM3OTP toFw== X-Forwarded-Encrypted: i=1; AJvYcCWTzIwyTJR7mAgBxroLu8SEmUAcCNSZ9hVw3QQ1vS2yerwppgAnEP7z5YOxZrVoNH3s7BaXm2ENDLEkVLqySu4lftv0Mme7VpEKMgwdDyJntUi9 X-Gm-Message-State: AOJu0Ywm+hSq4trH9JPbwIeWpYpkcQ/wfsB48OZQy7Kfy48nIFN/kOZU tLmLQyrzGf1hQslqiliVekZ6RXbrQ0Gh5h7BSLFDqmNyyrgLNqYTZKCwl/S0Qti1jf2PO7n9yZ8 jdZROGG2cNdLKppHd+xU//wIbk1ZKGrs2j3yO X-Google-Smtp-Source: AGHT+IFqS4s4ROM6MYFDpc4tQ836tAopkgW/nL7KFYfoLFxEhRv7bBbwSttJPeLT+lGWc1b0F0Ho7XnBd9lcp7WzrSM= X-Received: by 2002:a05:6214:5d0c:b0:6a0:b3d5:c21a with SMTP id 6a1803df08f44-6a16825d773mr183131066d6.59.1715797451624; Wed, 15 May 2024 11:24:11 -0700 (PDT) MIME-Version: 1.0 References: <3a6f126c-e1aa-4dcc-9252-9868308f6cf0@iki.fi> <1a717f65-7390-4111-8efd-c6e9b213805e@iki.fi> <3fdaf4b1-82d1-45bb-8175-f97ff53a1f01@iki.fi> <2b5b0c20-c531-4f51-a169-17617ba73dd6@iki.fi> In-Reply-To: <2b5b0c20-c531-4f51-a169-17617ba73dd6@iki.fi> From: Jacob Champion Date: Wed, 15 May 2024 11:24:00 -0700 Message-ID: Subject: Re: Direct SSL connection with ALPN and HBA rules To: Heikki Linnakangas Cc: Robert Haas , Daniel Gustafsson , Michael Paquier , Postgres hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, May 15, 2024 at 6:33=E2=80=AFAM Heikki Linnakangas wrote: > Ok, yeah, I can see that now. Here's a new version to address that. I > merged ENC_SSL_NEGOTIATED_SSL and ENC_SSL_DIRECT_SSL to a single method, > ENC_SSL. The places that need to distinguish between them now check > conn-sslnegotiation. That seems more clear now that there is no fallback. That change and the new comment that were added seem a lot clearer to me, too; +1. And I like that this potentially preps for encryption=3Dgss/ssl/none or similar. This assertion seems a little strange to me: > if (conn->sslnegotiation[0] =3D=3D 'p') > { > ProtocolVersion pv; > > Assert(conn->sslnegotiation[0] =3D=3D 'p'); But other than that nitpick, nothing else jumps out at me at the moment. Thanks, --Jacob