model-writtenrun 2627 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb 2024 · 3 entries
- Koshi Shibagaki proposed replacing pgcrypto's crypt() and gen_salt() implementations with OpenSSL because their built-in algorithms could still run when OpenSSL's FIPS mode prohibited equivalent operations #1.
- Peter Eisentraut explained that neither the existing algorithms nor their composition would become FIPS-compliant merely by substituting library calls, and that rewriting the imported implementations would create a maintenance burden #2 #20.
- Daniel Gustafsson proposed checking OpenSSL's FIPS state before allowing built-in crypto, while Peter Eisentraut suggested documentation, a GUC, a separate extension, or deprecation; discussion also exposed portability problems with treating FIPS as a universal operating-system switch #3 #13 #18.
Oct 2024 - Jan 2025 · 15 entries
- After an eight-month gap, Joe Conway revived the work with a boolean legacy_crypto_enabled GUC that explicitly disabled the built-in functions without detecting FIPS mode #22.
- Daniel Gustafsson initially preferred separating the functions into another extension, but acknowledged Joe Conway's concerns about compatibility and upgrades; Jacob Champion also pointed out that a manual switch did not automatically follow system policy #23 #24 #25 #26.
- Daniel Gustafsson then extended Joe Conway's patch to an on/off/fips enum, combining explicit administrator control with an option that follows OpenSSL, while retaining a superuser-changeable setting rather than requiring server restarts #35 #37 #38.
- Daniel Gustafsson briefly removed the older FIPS_mode() API on the assumption that supported pre-3.0 OpenSSL versions could not provide FIPS, but Joe Conway supplied evidence of vendor-patched 1.1.1 builds, leading to restoration of that API #42 #46 #50 #52.
- Joe Conway corrected the GUC help text, and Peter Eisentraut caught C function names mistakenly presented as SQL functions; Daniel Gustafsson incorporated those corrections across the next revisions #53 #54 #55 #56.
- Returning in January after testing with and without FIPS, Daniel Gustafsson corrected API selection to test OPENSSL_VERSION_NUMBER rather than treating function names as preprocessor macros #57.
- Hayato Kuroda requested correct function markup, removal of the remaining internal function name, and reservation of the pgcrypto GUC prefix; Daniel Gustafsson incorporated these changes and renamed legacy_crypto to builtin_crypto because future algorithms might no longer be considered legacy #58 #59.
- Joe Conway supplied a full revision adding tests for the fips setting, and Koshi Shibagaki reported their failure on a FIPS-enabled machine and proposed alternative expected output #60 #61.
- Daniel Gustafsson declined the alternative-output approach because accepting both success and failure would not verify FIPS detection, so the extra tests were omitted from the subsequent series #64 #70.
- Joe Conway proposed exposing FIPS status through SQL and extracting a reusable helper, while discussion with Daniel Gustafsson and Tom Lane settled on reporting OpenSSL's state rather than independently detecting operating-system policy #65 #66 #67 #69.
- Daniel Gustafsson split the work into a new fips_mode() function and the existing built-in-crypto control, with the latter calling the shared helper; adding the SQL function now required an extension upgrade to version 1.4 #70.
- Joe Conway tested the series with ordinary OpenSSL and FIPS-enabled aws-lc, found a missing openssl/crypto.h include, and recommended the term FIPS validated; Daniel Gustafsson incorporated those fixes, and Joe Conway approved the final series #71 #72 #73.
- Daniel Gustafsson committed the fips_mode() portion of #72 as 924d89a354, moving the helper's comment and whitespace cleanup into that commit.
- Daniel Gustafsson committed the built-in-crypto control portion of #72 as 035f99cbeb, with a small documentation-markup correction and shared-helper cleanup already included in the preceding commit.
- The thread ended with Daniel Gustafsson confirming that the work was committed and Joe Conway acknowledging completion; both final patches landed, while replacing the cryptographic implementations and adding the proposed extra FIPS-mode regression tests remained outside the delivered change #74 #75.