From owner-freebsd-audit Fri Jul 20 3:16:24 2001 Delivered-To: freebsd-audit@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.39]) by hub.freebsd.org (Postfix) with SMTP id 8C55F37B403 for ; Fri, 20 Jul 2001 03:16:20 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 3427 invoked by uid 1000); 20 Jul 2001 10:20:26 -0000 Date: Fri, 20 Jul 2001 13:20:26 +0300 From: Peter Pentchev To: Dima Dorfman Cc: audit@freebsd.org Subject: Re: libmp implementation in terms of libcrypto Message-ID: <20010720132026.B510@ringworld.oblivion.bg> Mail-Followup-To: Dima Dorfman , audit@freebsd.org References: <20010720124441.A510@ringworld.oblivion.bg> <20010720100558.4233B3E2F@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010720100558.4233B3E2F@bazooka.unixfreak.org>; from dima@unixfreak.org on Fri, Jul 20, 2001 at 03:05:58AM -0700 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jul 20, 2001 at 03:05:58AM -0700, Dima Dorfman wrote: > Peter Pentchev writes: > > On Fri, Jul 20, 2001 at 02:27:27AM -0700, Dima Dorfman wrote: > > > Attached is a sharball of a libmp implementation in terms of > > > libcrypto. This was discussed on -arch, and the consensus is that > > > although it'd be nice if the world used the BIGNUM API directly, it > > > can't hurt to be backwards compatible. > > > > > > I would appreciate it if somebody could review and/or test this. To > > > test it, just build it, install it, and link all programs that use it > > > using "-lmp -lcrypto". Once this is in the tree, the GPV'd libgmp > > > monster can be taken out and shot. I've tested all the in-tree > > > programs that use it except for the Kerberized telnets, and they seem > > > to work as well as they have before. > > > > > > Thanks in advance, > > > > > > Dima Dorfman > > > > > > P.S. The libmp installed in /usr/lib has major number 3; the sharball > > > below bumps it to 4. Is this actually necessary? > > > > Haven't really tested this, just to answer this question: the library > > version bump will only be needed if you decide to install this as libgmp, > > not libmp. In that case, all executables compiled earlier will contain > > a reference to libgmp.so.3, and no reference to libcrypto. Thus, they > > would fail with the (new) libgmp.so.3, so there needs to be a version bump. > > > > If this is installed as libmp, then you might as well start over again > > with mp.1, and keep gmp.3 in a compat4x distribution or something. > > This makes sense assuming that we have no libmp right now. That > assumption is false. Observe: > > dima@hornet% ll /usr/lib/libmp* > -r--r--r-- 1 root wheel 82274 Jul 13 01:51 /usr/lib/libmp.a > lrwxr-xr-x 1 root wheel 10 Jul 13 01:51 /usr/lib/libmp.so -> libmp.so.3 > -r--r--r-- 1 root wheel 39948 Jul 13 01:51 /usr/lib/libmp.so.3 > > All programs that need a libmp interface are linked as "-lmp -lgmp". > I'm guessing that /usr/lib/libmp.so that we have now is a libmp > interface in terms of libgmp. Erm. Of course. Don't know where I was looking; I *thought* I had checked that we had no libmp right now. In that case, yes, you need to bump the library version number, so precompiled binaries get the right one instead of getting unresolved references to libcrypto symbols. G'luck, Peter -- If wishes were fishes, the antecedent of this conditional would be true. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message