Unix Technical Forum

pgcrypto: OpenSSL/DES cleanup

This is a discussion on pgcrypto: OpenSSL/DES cleanup within the Pgsql Patches forums, part of the PostgreSQL category; --> As Kris Jurka found out, pgcrypto does not work with OpenSSL 0.9.6x. The DES functions use the older 'des_' ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:38 AM
Marko Kreen
 
Posts: n/a
Default pgcrypto: OpenSSL/DES cleanup

As Kris Jurka found out, pgcrypto does not work with
OpenSSL 0.9.6x. The DES functions use the older 'des_'
API, but the newer 3DES functions use the 0.9.7x-only
'DES_' API.

I think I just used /usr/include/openssl/des.h for reference
when implementing them, and had upgraded OpenSSL in the
meantime.

Following patch converts DES also to newer API and provides
compatibility functions for OpenSSL < 0.9.7.

I chose this route because:

- openssl.c uses few DES functions.
- compatibility for old 'des_' API is going away at some point
of time from OpenSSL.
- as seen from macros, new API is saner
- Thus pgcrypto supports any OpenSSL version from 0.9.5 to 1.0

Tested with OpenSSL 0.9.6c and 0.9.7e.

--
marko

PS. It's nice to see that the 'autoconfiguration' already pays
back.



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 12:38 AM
Michael Fuhr
 
Posts: n/a
Default Re: pgcrypto: OpenSSL/DES cleanup

On Thu, Jul 07, 2005 at 12:25:53PM +0300, Marko Kreen wrote:
>
> Tested with OpenSSL 0.9.6c and 0.9.7e.


I just applied this patch to my system running HEAD and OpenSSL 0.9.8;
all regression tests passed.

BTW, OpenSSL 0.9.8 has been released:

http://www.mail-archive.com/openssl-.../msg00063.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 12:40 AM
Bruce Momjian
 
Posts: n/a
Default Re: pgcrypto: OpenSSL/DES cleanup


Patch applied. Thanks.

---------------------------------------------------------------------------


Marko Kreen wrote:
> As Kris Jurka found out, pgcrypto does not work with
> OpenSSL 0.9.6x. The DES functions use the older 'des_'
> API, but the newer 3DES functions use the 0.9.7x-only
> 'DES_' API.
>
> I think I just used /usr/include/openssl/des.h for reference
> when implementing them, and had upgraded OpenSSL in the
> meantime.
>
> Following patch converts DES also to newer API and provides
> compatibility functions for OpenSSL < 0.9.7.
>
> I chose this route because:
>
> - openssl.c uses few DES functions.
> - compatibility for old 'des_' API is going away at some point
> of time from OpenSSL.
> - as seen from macros, new API is saner
> - Thus pgcrypto supports any OpenSSL version from 0.9.5 to 1.0
>
> Tested with OpenSSL 0.9.6c and 0.9.7e.
>
> --
> marko
>
> PS. It's nice to see that the 'autoconfiguration' already pays
> back.
>


[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match


--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:24 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com