Skip site navigation (1) Skip section navigation (2)

Re: Error Writing/Reading Encrypted Values

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: cnliou(at)eurosport(dot)com
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Error Writing/Reading Encrypted Values
Date: 2002-01-15 00:03:30
Message-ID: 3C4371D2.3B38CC1F@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
cnliou(at)eurosport(dot)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

In response to

pgsql-odbc by date

Next:From: Curtis GallowayDate: 2002-01-15 00:14:40
Subject: Bad SQL generated by application
Previous:From: Dave PageDate: 2002-01-14 21:39:56
Subject: Re: transfer from Access2000 to postgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group