From: Nick Burgan <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] d281a7: Add cert key type checking to chooseClientAlias (#...
Date: Mon, 24 Jan 2022 10:39:29 -0800
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/3d6093-d281a7@github.com> (raw)
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: d281a788b227b73e5a5236a10f3e5f5e73d011e7
https://github.com/pgjdbc/pgjdbc/commit/d281a788b227b73e5a5236a10f3e5f5e73d011e7
Author: Nick Burgan <13688219+nmburgan@users.noreply.github.com>
Date: 2022-01-24 (Mon, 24 Jan 2022)
Changed paths:
M pgjdbc/src/main/java/org/postgresql/ssl/LazyKeyManager.java
M pgjdbc/src/main/java/org/postgresql/ssl/PKCS12KeyManager.java
M pgjdbc/src/test/java/org/postgresql/test/ssl/LazyKeyManagerTest.java
M pgjdbc/src/test/java/org/postgresql/test/ssl/PKCS12KeyTest.java
Log Message:
-----------
Add cert key type checking to chooseClientAlias (#2417)
Previously, these functions ignored the keyType (or 'strings') argument to the chooseClientAlias function. Some libraries (e.g. Bouncy Castle) expect that when chooseClientAlias is called and key types are passed in, that it will return null if the cert doesn't use one of the given key types. For example, if ['EC'] was passed in for keyType and the cert contained an RSA key, since this would return 'user' rather than null in that case, it would cause Bouncy Castle to assume using an ECDSA signing algorithm was okay, and cause problems during the Certificate Verify part of the handshake.
This modifies these functions to only return 'user' if keyType is passed in and the cert contains a key of that type. If keyType is empty or null, it will ignore this and continue to check only the issuer.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: noreply@github.com
Subject: Re: [pgjdbc/pgjdbc] d281a7: Add cert key type checking to chooseClientAlias (#...
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/3d6093-d281a7@github.com>
References: <pgjdbc/pgjdbc/push/refs/heads/master/3d6093-d281a7@github.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox