Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 08:58 AM
03-01-2006 08:58 AM
Based on the man page, I include
#include
#include
When compiling using "cc myfl.c" I get
/usr/ccs/bin/ld: Unsatisfied symbols:
bigcrypt (first referenced in myfl.c)(code)
What library should I be referencing to get this to work?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 09:10 AM
03-01-2006 09:10 AM
Re: bigcrypt
What's the command you are using for compiling the C source code.
thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 09:14 AM
03-01-2006 09:14 AM
Re: bigcrypt
#include
#include
#include
char *bigcrypt(char *key, char *salt);
void main()
{
printf( "I am alive\n" );
}
...compiles ok for me.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 10:16 AM
03-01-2006 10:16 AM
Re: bigcrypt
don't you have to call the function to get a linker error?
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 10:17 AM
03-01-2006 10:17 AM
Re: bigcrypt
#include
#include
main(argc,argv)
int argc;
char *argv[];
{
char encrypted[40];
strcpy(encrypted,(char *)bigcrypt(argv[1],argv[2]));
printf("%s",encrypted);
exit(0);
}
Here is how I compile it on a plain vanilla HP-UX 11.00 box...
# cc myfl.c
/usr/ccs/bin/ld: Unsatisfied symbols:
bigcrypt (first referenced in myfl.o) (code)
#
I can compile the code just fine if I use crypt() and include different header files, but crypt() limits the encryption of a string upto 8 chars in length, and I need it to encrypt a bigger string for password encryption.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 10:25 AM
03-01-2006 10:25 AM
Re: bigcrypt
Yes, of course I have to call the function to see the error --- I was just not thinking!
I too can reproduce the error. Sorry.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 10:26 AM
03-01-2006 10:26 AM
Re: bigcrypt
I guess you need to link the lib with bigcrypt to the program. Have a look at
http://web.mit.edu/ghudson/dev/xscreensaver-import/xscreensaver-4.14/driver/passwd-pwent.c
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 12:07 PM
03-01-2006 12:07 PM
Re: bigcrypt
When I try an assortment of -L and -l options, for example
# cc myfl.c -L /usr/lib -l libc.2
/usr/ccs/bin/ld: Can't find library: "libc.2"
So I don't know if I need to setup environment variables...I have even tried
export LD_LIBRARY_PATH=/usr/lib
export SHLIB_PATH=/usr/lib
but that doesn't solve the "Can't find library" issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 12:11 PM
03-01-2006 12:11 PM
SolutionYour code is fine (although not ANSI C compliant). In order to use the bigcrypt API you need to link your source code with the shared version of the security library i.e. /usr/lib/libsec.sl. So your command for compilation should be:
# cc myfl.c -o myfl -lsec
Suggest changing...
>>printf("%s",encrypted);<<
TO
printf("%s\n",encrypted);
cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 12:32 PM
03-01-2006 12:32 PM
Re: bigcrypt
Before I saw your reply, I was doing strings on every file under /usr/lib/ and grepping for bigcrypt and found libsec.2 had it.
I tried -llibsec.2 and it didn't work, and I wouldn't have know to use -lsec.
Thanks so much for the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 12:34 PM
03-01-2006 12:34 PM