Re: Some more hackery around cryptohashes (some fixes + SHA1)
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Michael Paquier <michael@paquier.xyz>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>
Cc: Daniel Gustafsson <daniel@yesql.se>
Date: 2021-01-22T13:50:04Z
Lists: pgsql-hackers
On 07/01/2021 05:41, Michael Paquier wrote: > On Mon, Dec 14, 2020 at 12:48:15PM +0900, Michael Paquier wrote: >> This is a nice cleanup, so I have moved ahead and applied it. A >> rebased version of the SHA1 business is attached. > > Rebased version attached to address the conflicts caused by 55fe26a. > I have fixed three places in pgcrypto where this missed to issue an > error if one of the init/update/final cryptohash calls failed for > SHA1. > diff --git a/contrib/pgcrypto/sha1.h b/src/common/sha1_int.h > similarity index 72% > rename from contrib/pgcrypto/sha1.h > rename to src/common/sha1_int.h > index 4300694a34..40fbffcd0b 100644 > --- a/contrib/pgcrypto/sha1.h > +++ b/src/common/sha1_int.h > @@ -1,3 +1,17 @@ > +/*------------------------------------------------------------------------- > + * > + * sha1_int.h > + * Internal headers for fallback implementation of SHA1 > + * > + * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group > + * Portions Copyright (c) 1994, Regents of the University of California > + * > + * IDENTIFICATION > + * src/common/sha1_int.h > + * > + *------------------------------------------------------------------------- > + */ > + > /* contrib/pgcrypto/sha1.h */ > /* $KAME: sha1.h,v 1.4 2000/02/22 14:01:18 itojun Exp $ */ Leftover reference to "contrib/pgcrypto/sha1.h" Other than that, looks good to me. - Heikki
Commits
-
Introduce SHA1 implementations in the cryptohash infrastructure
- a8ed6bb8f4cf 14.0 landed
-
Improve some code around cryptohash functions
- 9b584953e7bf 14.0 landed