[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Unable to link with MD5 routines in libcrypt


On Wed, 15 Aug 2001, J. R. Westmoreland wrote:

> I'm trying to use the MD5 routines in the libcrypt.so dynamic library.
> Specifically the routine labeled as __md5_crypt().
> If I try and link to this routine dynamically I get an unresolved reference.
> If I link to it statically I can link with no problems.

> Is it something I'm doing wrong?
> Is there a problem with the library?

Functions with an underscore as a prefix are normally not intended for public
consumption; indeed, the fact that you're unable to link to this symbol
suggests rather strongly that the authors have gone to the effort of making
sure you DON'T use this symbol.

You should use the published interface to this library, as documented in
/usr/include/crypt.h, which supports md5 passwords transparently when a salt
of the proper form is provided.  If you are looking for direct access to
md5-specific routines, libcrypt is not where you should find it.

Steve Langasek
postmodern programmer

Reply to: