Re: Refactor MD5 implementations and switch to EVP for OpenSSL

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Refactor MD5 implementations and switch to EVP for OpenSSL
Дата
Msg-id X8nfxHu42K1TdnS9@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>)
Список pgsql-hackers
On Tue, Nov 10, 2020 at 01:28:09PM +0900, Michael Paquier wrote:
> 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.

Now that HEAD has the necessary infrastructure to be able to plug in
easily new cryptohash routines, here is a rebased patch for MD5.  The
basics are unchanged.  Here is a summary:
- The duplication with MD5 implementations (pgcrypto, src/common/) is
removed, and gets only used when not building with OpenSSL.
- MD5 uses EVP when building with OpenSSL.
- Similarly to SHA2, the fallback implementation of MD5 is kept
internal to src/common/, with an internal header called md5_int.h.
The routines for init, update and final calls are similar to the SHA2
equivalents, making the changes of cryptohash.c straight-forward.

The amount of code shaved is still nice:
13 files changed, 641 insertions(+), 775 deletions(-)
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Is it useful to record whether plans are generic or custom?
Следующее
От: "k.jamison@fujitsu.com"
Дата:
Сообщение: RE: [Patch] Optimize dropping of relation buffers using dlist