From owner-freebsd-questions@FreeBSD.ORG Thu Jul 29 13:21:34 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D89416A4CE for ; Thu, 29 Jul 2004 13:21:34 +0000 (GMT) Received: from mail.u4eatech.com (blackhole.u4eatech.com [195.188.241.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB23743D5D for ; Thu, 29 Jul 2004 13:21:33 +0000 (GMT) (envelope-from richard.williamson@u4eatech.com) Received: by mail.u4eatech.com (Postfix, from userid 503) id 5E9F6360054; Thu, 29 Jul 2004 14:21:23 +0100 (BST) Received: from apus.u4eatech.com (apus.degree2.com [172.30.40.129]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by mail.u4eatech.com (Postfix) with ESMTP id 01E4636002B for ; Thu, 29 Jul 2004 14:21:20 +0100 (BST) Message-Id: <6.1.1.1.2.20040729134558.027c36d8@cygnus> X-Sender: richard@cygnus X-Mailer: QUALCOMM Windows Eudora Version 6.1.1.1 Date: Thu, 29 Jul 2004 14:24:42 +0100 To: freebsd-questions@freebsd.org From: "Richard P. Williamson" Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on mail X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 Subject: openssl/pem.h references undefined? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2004 13:21:34 -0000 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 should be included, and I'm doing that. rip