Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2004 14:24:42 +0100
From:      "Richard P. Williamson" <richard.williamson@u4eatech.com>
To:        freebsd-questions@freebsd.org
Subject:   openssl/pem.h references undefined?
Message-ID:  <6.1.1.1.2.20040729134558.027c36d8@cygnus>

next in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.1.1.1.2.20040729134558.027c36d8>