Problem with Sun C Libraries and setkey()

Mike Maughmer mike at cosmos.acs.calpoly.edu
Sat Mar 16 08:44:00 AEST 1991


I'm having some problems with the DES encryption library call "setkey()"
under SunOS 4.1.1 on a SPARCstation 1+.

The following program will not compile:

extern int setkey();
main()
{
	setkey(/* the appropriate argument goes here */);
}

The problem is that ld complains about _setkey being an undefined symbol.
Running nm on /usr/lib/libc.a reveals that _setkey does not exist, but
that _des_setkey does.  Changing setkey() to des_setkey() in the program
causes ld to bitch about _des_setkey, as well, being an undefined symbol.

Though setkey() is explained in the Sun man pages, along with crypt() and
encrypt(), is setkey() unavailable?  How do I use it when ld can't even
find it?  encrypt() relies upon the key set by setkey().  What am I
missing?  (Did Sun simply forget to place the code for setkey() in their C
libraries?)  :-)

Please mail your responses to mike at cosmos.acs.calpoly.edu.  I'll post a
summary later.  Thanks . . .

Mike Maughmer
Cal Poly State University
San Luis Obispo, California
mike at cosmos.acs.calpoly.edu



More information about the Comp.sys.sun mailing list