diff options
author | Michael Paquier <michael@paquier.xyz> | 2020-12-14 12:38:13 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2020-12-14 12:38:13 +0900 |
commit | 9b584953e7bf91e342af87ef44606acd6206cd1c (patch) | |
tree | 878bf508cb9e6c6f484ea502ad3f383783d89120 /contrib/uuid-ossp | |
parent | df9274adf3096feafbbde2562311c8ab80405267 (diff) | |
download | postgresql-9b584953e7bf91e342af87ef44606acd6206cd1c.tar.gz |
Improve some code around cryptohash functions
This adjusts some code related to recent changes for cryptohash
functions:
- Add a variable in md5.h to track down the size of a computed result,
moved from pgcrypto. Note that pg_md5_hash() assumed a result of this
size already.
- Call explicit_bzero() on the hashed data when freeing the context for
fallback implementations. For MD5, particularly, it would be annoying
to leave some non-zeroed data around.
- Clean up some code related to recent changes of uuid-ossp. .gitignore
still included md5.c and a comment was incorrect.
Discussion: https://postgr.es/m/X9HXKTgrvJvYO7Oh@paquier.xyz
Diffstat (limited to 'contrib/uuid-ossp')
-rw-r--r-- | contrib/uuid-ossp/.gitignore | 1 | ||||
-rw-r--r-- | contrib/uuid-ossp/uuid-ossp.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/contrib/uuid-ossp/.gitignore b/contrib/uuid-ossp/.gitignore index 6c989c7872..d7260edc61 100644 --- a/contrib/uuid-ossp/.gitignore +++ b/contrib/uuid-ossp/.gitignore @@ -1,4 +1,3 @@ -/md5.c /sha1.c # Generated subdirectories /log/ diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c index 8f81c94e72..2ff7d9448b 100644 --- a/contrib/uuid-ossp/uuid-ossp.c +++ b/contrib/uuid-ossp/uuid-ossp.c @@ -41,8 +41,8 @@ #undef uuid_hash /* - * Some BSD variants offer md5 and sha1 implementations but Linux does not, - * so we use a copy of the ones from pgcrypto. Not needed with OSSP, though. + * Some BSD variants offer sha1 implementation but Linux does not, so we use + * a copy from pgcrypto. Not needed with OSSP, though. */ #ifndef HAVE_UUID_OSSP #include "sha1.h" |