From owner-freebsd-hackers Mon Dec 10 1:39:56 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from diablo.ovinet.hu (diablo.ovinet.hu [217.13.33.205]) by hub.freebsd.org (Postfix) with ESMTP id 9540537B405 for ; Mon, 10 Dec 2001 01:39:52 -0800 (PST) Received: from diablo.ovinet.hu (titanic@localhost [127.0.0.1]) by localhost (MX V4.2 AXP/OpenVMS) with ESMTP id fBA9jUmF012069 for ; Mon, 10 Dec 2001 10:45:30 +0100 Received: (from titanic@localhost) by diablo.ovinet.hu (8.12.0.Beta19/8.12.0.Beta19/Debian 8.12.0.Beta19) id fBA9jUZp012067 for freebsd-hackers@FreeBSD.ORG; Mon, 10 Dec 2001 10:45:30 +0100 Date: Mon, 10 Dec 2001 10:45:30 +0100 From: KAISER Laszlo To: freebsd-hackers@FreeBSD.ORG Subject: Re: SSL_connect fails Message-ID: <20011210104529.A8829@ovinet.hu> References: <20011209184143.H12621@ovinet.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <20011209184143.H12621@ovinet.hu>; from titanic@ovinet.hu on Sun, Dec 09, 2001 at 06:41:43PM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Dec 09, 2001 at 06:41:43PM +0100, KAISER Laszlo wrote: > I'm doing a port of a little OpenSSL program to FreeBSD from linux, but the > code which works fine on linux fails on FreeBSD at SSL_connect(). > This function allways returns with -1 and SSL_errno is 1. To answer myself; The problem was trivial. OpenSSL couldn't seed random generator for correct entropy without /dev/urandom or without a specified file, therefore i had to create a temporary file which consists of enough random numbers (1024). This was problem on solaris port, too, but on BSD it caused by chroot environment. OpenSSL got the filename consists of entropy from an environment value named RANDFILE. Some notice: I think an API hasn't consists of exit() calls and if i send a NULL pointer to an API call, it couldn't SEGFAULT. OpenSSL does. I think it is not a feature, or if it is, i'like to turn off. :/ TiTaNiC -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message