Re: Some more hackery around cryptohashes (some fixes + SHA1)

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: Some more hackery around cryptohashes (some fixes + SHA1)
Date: 2021-01-22 13:50:04
Message-ID: 36026a25-0de7-317f-b77d-e8b142d9beb9@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-01-22 13:58:50 Re: plpgsql variable assignment not supporting distinct anymore
Previous Message easteregg 2021-01-22 13:41:06 Re: plpgsql variable assignment not supporting distinct anymore