Skip to Content.
Sympa Menu

freetds - Re: [freetds] des_ecb_encrypt naming

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Steve Langasek <vorlon AT netexpress.net>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] des_ecb_encrypt naming
  • Date: Wed, 18 Dec 2002 03:55:49 -0600

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

Attachment: pgpzxz8r9U1SN.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page