Re: Error Writing/Reading Encrypted Values

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: Error Writing/Reading Encrypted Values
Дата
Msg-id 3C4371D2.3B38CC1F@tpf.co.jp
обсуждение исходный текст
Ответ на Error Writing/Reading Encrypted Values  (<cnliou@eurosport.com>)
Список pgsql-odbc
cnliou@eurosport.com wrote:
>
> Hello!
>
> I am trying to store encrypted password in a varchar
> (and/or text) column but it is very unstable in my
> environment.
> The plain password string is encrypted by a C routine
> running in Windoz.  The encrypted password is then
> sent from Windoz via psqlODBC to postgresql.
>
> Problem happens when the decryption routine (running
> in Windoz) tries to decrypt the encrypted password
> retrieved from postgresql - it occasionally succeeds
> but hangs most of the time.
>
> "SELECT length(MyEncryptedPasswordColumn) FROM
> MyTable" in psql prompt does not much help debugging
> as the encrypted password may contains low value(s).
>
> I also found in Windoz that when my encryption
> routine aborts, the retrieved encrypted string is
> actually corrupted - its string length is 1 byte
> longer than it is supposed to be.

There could be the following case.

Windows client          *nix server

'\n'            --->    '\n'
(not preceded by 'r')
\r\n            <---    '\n'

regards,
Hiroshi Inoue

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

Предыдущее
От: Graeme Leeming
Дата:
Сообщение: ODBC problem
Следующее
От: Curtis Galloway
Дата:
Сообщение: Bad SQL generated by application