[freetds] des_ecb_encrypt naming

Steve Langasek vorlon at netexpress.net
Wed Dec 18 03:55:49 EST 2002


On Wed, Dec 18, 2002 at 07:53:12AM +0100, Frediano Ziglio wrote:
> Il mer, 2002-12-18 alle 04:36, James K. Lowden ha scritto:
> > On Tue, 17 Dec 2002 17:52:15 -0500, "Mark J. Lilback" <mark at lilback.com>
> > wrote:
> > > Can we rename des_ecb_encrypt to be something else?

> > > Mac OS X includes a function with this name in libcrytpo, and because 
> > > of weak leaking, the FreeTDS version could be called when the 
> > > executable meant to call the system version.

> > $ grep -l  des_ecb_encrypt include/* src/*/* |xargs perl -i
> > -pe's/des_ecb_encrypt/tds_des_ecb_encrypt/g' 

> > Committed.  

> Nobody think those two function make the same thing, so we can use
> system version if present?

The libcrypto from Mac OS X is most likely the very one from OpenSSL
that this code was written in order to avoid linking against for
licensing reasons.  Since they also may not have the same semantics as
the ones from libmcrypt, it is preferrable to not use such system
facilities.  (After all, if our version was compatible with the system
version, would Mark have noticed? :)

If we're looking to clean up the namespace, there are two other DES
functions that ought to be handled: des_set_odd_parity() and des_set_key().
I'd commit a fix right now, but it's rather late here -- if no one in a
happier time zone has committed by morning, I'll go ahead and clean this
up.

-- 
Steve Langasek
postmodern programmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20021218/3ab22b1c/attachment.bin


More information about the FreeTDS mailing list