pgjdbc icon indicating copy to clipboard operation
pgjdbc copied to clipboard

Add Windows and MacOS native certificate support

Open minfrin opened this issue 1 year ago • 10 comments

Add three new SSLSocketFactory implementations to support native keystores on Windows and Mac.

org.postgresql.ssl.MSCAPILocalMachineSSLFactory org.postgresql.ssl.MSCAPISSLFactory org.postgresql.ssl.KeychainSSLFactory

Add the sslsubject parameter to limit the chosen certificate where more than one certificate might match for a given connection.

All Submissions:

  • [x] Have you followed the guidelines in our Contributing document?
  • [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. [x] Does your submission pass tests?
  2. [x] Does ./gradlew styleCheck pass ?
  3. [x] Have you added your new test classes to an existing test suite in alphabetical order?

Changes to Existing Features:

  • [ ] Does this break existing behaviour? If so please explain.
  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [x] Have you written new tests for your core changes, as applicable?
  • [x] Have you successfully run tests with your changes locally?

minfrin avatar Feb 16 '24 10:02 minfrin

Would it be possible to approve the workflows outstanding on this PR?

minfrin avatar Feb 22 '24 11:02 minfrin

Would it be possible to approve the workflows outstanding on this PR?

Yes, sorry. I should have realized they weren't running

davecramer avatar Feb 28 '24 14:02 davecramer

Another gentle bump - is it possible to trigger workflows?

minfrin avatar Mar 25 '24 22:03 minfrin

sorry about that

davecramer avatar Mar 27 '24 11:03 davecramer

@minfrin You can enable actions to run on your pgjdbc fork as well. This is particularly useful if you want to try running something in CI without opening a PR in this repo. The GitHub Actions should work with no issues on your fork. The Windows / AppVeyor stuff is a bit finicky but in theory should work if you set up an account there as well.

(Note that I'm not suggesting opening this PR and running the CI on pgjdbc/pgjdbc was a bad idea ... I'm just suggesting an alternative for the future if you're trying out something else)

sehrope avatar Mar 27 '24 12:03 sehrope

@minfrin I took the liberty of fixing the checker errors

davecramer avatar Apr 24 '24 19:04 davecramer

@minfrin I took the liberty of fixing the checker errors

Much appreciated, thank you.

minfrin avatar Apr 24 '24 21:04 minfrin