openssl/pem.h references undefined?
Richard P. Williamson
richard.williamson at u4eatech.com
Thu Jul 29 06:21:34 PDT 2004
Hello!
I'm trying to port some linux code to FreeBSD (4.10). One of the
files makes use of PEM_[read|write]_RSAPublicKey(...).
The linux version used a seven-param list for both read and
write, but the FreeBSD one seems to only require a two param
list for the write version:
#ifdef _FREEBSD
PEM_write_RSAPublicKey(f, rsa);
#else
PEM_write_RSAPublicKey(f, rsa, NULL, NULL, 0, 0, "Zapf");
#endif
I know this, because the precompiler complained about differing
param counts during macro expansion.
When I compile with the above change now, however, I get:
...
/tmp/cc75DK8C.o: In function `MakeKey':
/usr/jail/cvswork/dev/firmware/cli/include/authfunctions.h:96: undefined reference to `PEM_write_RSAPrivateKey'
/usr/jail/cvswork/dev/firmware/cli/include/authfunctions.h:103: undefined reference to `PEM_write_RSAPublicKey'
...
What am I missing? I tried reinstalling openssl just in case,
but that didn't change the behavior during the build, and the
handbook says it's part of the base install anyway.
man pem states <openssl/pem.h> should be included, and I'm doing that.
rip
More information about the freebsd-questions
mailing list