openssl_link.c revision 1f1d36a87b65186d9f89aac7f456ab1fd2a39ef6
63af1a646a006867dbd99dc0aa74559d832a420fMark Andrews * Portions Copyright (C) 1999-2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Portions Copyright (C) 1995-2000 by Network Associates, Inc.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
60988462e5d6db53205851d056e3482a29239be9Evan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM AND
60988462e5d6db53205851d056e3482a29239be9Evan Hunt * NETWORK ASSOCIATES DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
60988462e5d6db53205851d056e3482a29239be9Evan Hunt * SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
d58e33bfabfee19a035031dac633d36659738d56Evan Hunt * FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE CONSORTIUM OR NETWORK
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt * ASSOCIATES BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
60988462e5d6db53205851d056e3482a29239be9Evan Hunt * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
60988462e5d6db53205851d056e3482a29239be9Evan Hunt * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt * PERFORMANCE OF THIS SOFTWARE.
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt * Principal Author: Brian Wellington
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt * $Id: openssl_link.c,v 1.49 2001/11/30 01:59:31 gson Exp $
#include "dst_internal.h"
#ifdef CRYPTO_LOCK_ENGINE
static int nlocks;
#ifdef CRYPTO_LOCK_ENGINE
static ENGINE *e;
if (num < 0)
if (num < 0)
id_callback(void) {
return ((unsigned long)isc_thread_self());
p = NULL;
if (size > 0) {
return (ISC_R_NOMEMORY);
goto cleanup_mutexalloc;
goto cleanup_mutexinit;
#ifdef CRYPTO_LOCK_ENGINE
e = ENGINE_new();
if (e == NULL) {
goto cleanup_rm;
return (ISC_R_SUCCESS);
#ifdef CRYPTO_LOCK_ENGINE
return (result);
#ifdef CRYPTO_LOCK_ENGINE
if (e != NULL)
ENGINE_free(e);