pgcrypto sha256/384/512 don't work on Redhat. Please help!

Поиск
Список
Период
Сортировка
От Joe Kramer
Тема pgcrypto sha256/384/512 don't work on Redhat. Please help!
Дата
Msg-id b4c00a110605090310q66612671tc8cc03fa7123234e@mail.gmail.com
обсуждение исходный текст
Ответы Re: pgcrypto sha256/384/512 don't work on Redhat. Please help!  ("Marko Kreen" <markokr@gmail.com>)
Список pgsql-general
Hello,

Pgcrypto SHA 256/384/512 algorithm don't work on RedHat:

db=# SELECT digest('test', 'sha1');
                                digest
----------------------------------------------------------------------
 \251J\217\345\314\261\233\246\034L\010s\323\221\351\207\230/\273\323
(1 row)

db=# SELECT digest('test', 'sha256');
ERROR:  Cannot use "sha256": No such hash algorithm


I have standard Fedora Core 4 installed with standard PostgreSQL 8.1.3
Pgcrypto documentation says that it has built-in SHA256 and it should work when OpenSSL is not found:

==============
Without OpenSSL, public-key encryption does not work, as pgcrypto does
not yet contain math functions for large integers.
 

Functionality                built-in   OpenSSL
----------------------------------------------------
 MD5                          yes       yes
 SHA1                         yes       yes
 SHA256/384/512               yes       since 0.9.8

=================

Fedora core has OpenSSL 0.9.7 installed by default. And it's not possible to install 0.9.8 because of glibc conflict.

I suspect pgcrypto looks for SHA256 in OpeSSL lib when it should use built-in.
SHA256 is working fine on Windows but on Redhat it fails. Maybe because windows pgcrypto DLL is compiled statically with OpenSSL?

How to make pgcrypto use built-in sha256?


Thanks.

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

Предыдущее
От: João Miguel Ferreira
Дата:
Сообщение: Re: database size grows (even after vacuum (full and analyze))....
Следующее
От: "Jean-Yves F. Barbier"
Дата:
Сообщение: Re: Arguments Pro/Contra Software Raid