model-writtenrun 7915 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Michael Paquier opened the thread with an EVP conversion to fix SCRAM failures under OpenSSL 1.0.2 FIPS mode, reviving earlier work while proposing a development-branch-only change because the context typedef changes broke ABI compatibility #1.
- Daniel Gustafsson successfully tested the patch with and without FIPS, while Heikki Linnakangas challenged using PostgreSQL's fallback SHA256 implementation as a compatibility workaround; Michael explained the remaining ABI problems, and Tom Lane supported limiting the fix to the development branch #2 #3 #8 #11.
- Peter Eisentraut raised the separate issue of SCRAM's custom HMAC implementation, and Michael identified OpenSSL HMAC interfaces as possible follow-up work rather than part of the attached SHA2 conversion #12 #14.
- Michael committed the initial patch as e21cbb4b89, adding missing initialization and update failure checks after further compatibility testing #19.
- The initial conversion was subsequently reverted because it did not report errors correctly through libpq, prompting Michael to submit a two-part redesign with explicit allocation and freeing, five shared SHA2 operations, caller-controlled error propagation, and a separate EVP conversion #20.
- Heikki recommended built-in resource-owner tracking instead of a callback list, and Michael adopted that mechanism while adding backup-manifest cleanup fixes and a third patch allowing pgcrypto to share the tracking facility #21 #23.
- Michael generalized the SHA2 interface into a cryptohash layer designed to accommodate SHA1, MD5 and HMAC later, while leaving the proposed SQL-function source-file rename outside the series #25.
- Daniel questioned the allocation-heavy API and direct inclusion of sha2.c; Michael explained that newer OpenSSL versions hide context internals, retained explicit allocation and error propagation, and adopted Daniel's private-header approach with corresponding build changes #26 #27 #28 #30.
- Daniel's next review requested consistent braces, clearer allocation documentation, and resource ownership through the generic cryptohash abstraction; Michael polished and separately submitted the API prerequisite while working out the ownership redesign #31 #34.
- After Daniel reread the final API patch, Michael committed #34 unchanged as 87ae9691d2, establishing the allocation-aware cryptohash interface and adapting its callers #35 #36.
- The remaining EVP patch stored both the OpenSSL context and its resource owner behind the cryptohash abstraction, and moved backup-manifest freeing ahead of resource-owner cleanup to avoid double freeing #36.
- Michael discarded the pgcrypto conversion because the new machinery tracked cryptohash-owned states rather than arbitrary EVP contexts, and converting only pgcrypto's digest tracking would leave its similar cipher tracking inconsistent #36.
- After a rebase, Daniel built and tested the final EVP patch and requested a specific out-of-memory SQLSTATE; Michael incorporated that adjustment and committed #37 as 4f48a6fbe2 #38 #39.
- The thread ended with Michael declaring the SHA2 work complete after testing across supported OpenSSL versions and turning back to MD5; the pgcrypto cleanup remained discarded and no stable-branch backpatch was made #36 #39 4f48a6fbe2.