Re: Refactor MD5 implementations and switch to EVP for OpenSSL
От
Michael Paquier
Тема
Re: Refactor MD5 implementations and switch to EVP for OpenSSL
Дата
Msg-id
20201110042809.GI1887@paquier.xyz
Ответ на
Refactor MD5 implementations and switch to EVP for OpenSSL (Michael Paquier)
Список
Дерево обсуждения
Refactor MD5 implementations and switch to EVP for OpenSSL Michael Paquier <michael@paquier.xyz>
Re: Refactor MD5 implementations and switch to EVP for OpenSSL Michael Paquier <michael@paquier.xyz>
Re: Refactor MD5 implementations and switch to EVP for OpenSSL Michael Paquier <michael@paquier.xyz>
Re: Refactor MD5 implementations and switch to EVP for OpenSSL Daniel Gustafsson <daniel@yesql.se>
Re: Refactor MD5 implementations and switch to EVP for OpenSSL Michael Paquier <michael@paquier.xyz>
Re: Refactor MD5 implementations and switch to EVP for OpenSSL Daniel Gustafsson <daniel@yesql.se>
Re: Refactor MD5 implementations and switch to EVP for OpenSSL Michael Paquier <michael@paquier.xyz>
On Fri, Nov 06, 2020 at 04:34:34PM +0900, Michael Paquier wrote: > The attached patch set does a bit of rework to make the Postgres code > more consistent with OpenSSL, similarly to the work I did for all the > SHA2 implementations with EVP in [1]: > - 0001 is something stolen from the SHA2 set, adding to resowner.c > control of EVP contexts, so as it is possible to clean up anything > allocated by OpenSSL. > - 0002 is the central piece, that moves the duplicated > implementation. src/common/ and pgcrypto/ use the same code, but I > have reused pgcrypto as it was already doing the init/update/final > split similarly to PostgreSQL. New APIs are designed to control MD5 > contexts, similarly to the work done for SHA2. Upon using this patch, > note that pgcrypto+OpenSSL uses our in-core implementation instead of > OpenSSL's one, but that's fixed in 0003. We have a set of three > convenience routines used to generate MD5-hashed passwords, that I > have moved to a new file in src/common/md5_common.c, aimed at being > shared between all the implementations. > - 0003 adds the MD5 implementation based on OpenSSL's EVP, ending the > work. The CF bot has been complaining on Windows and this issue is fixed in the attached. A refresh of src/tools/msvc for pgcrypto was just missing. -- Michael
В списке pgsql-hackers по дате отправления
От: Masahiko Sawada
Дата:
От: Thomas Munro
Дата: