pgsql: As Kris Jurka found out, pgcrypto does not work with OpenSSL

From: momjian(at)svr1(dot)postgresql(dot)org (Bruce Momjian)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: As Kris Jurka found out, pgcrypto does not work with OpenSSL
Date: 2005-07-10 13:54:34
Message-ID: 20050710135434.8170D52AFF@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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 Kreen

Modified Files:
--------------
pgsql/contrib/pgcrypto:
openssl.c (r1.21 -> r1.22)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/pgcrypto/openssl.c.diff?r1=1.21&r2=1.22)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2005-07-10 14:26:30 pgsql: This patch implements putting language handlers for the optional
Previous Message Bruce Momjian 2005-07-10 13:46:29 pgsql: Add missing pgcrypto files from previous commit.