Re: Incorrect allocation handling for cryptohash functions with OpenSSL

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Michael Paquier <michael@paquier.xyz>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-12-18T09:51:55Z
Lists: pgsql-hackers

Attachments

On 18/12/2020 11:35, Heikki Linnakangas wrote:
> BTW, looking at pg_cryptohash_ctx and pg_cryptohash_state, why do we
> need two structs? They're both allocated and controlled by the
> cryptohash implementation. It would seem simpler to have just one.

Something like this. Passes regression tests, but otherwise untested.

- Heikki

Commits

  1. Fix and simplify some code related to cryptohashes

  2. Fix allocation logic of cryptohash context data with OpenSSL