openssl_link.c revision 4f30395c97ad0586562a433fc6f1b9655fa6ba73
/*
* Portions Copyright (C) 1999-2001 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM AND
* NETWORK ASSOCIATES DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE CONSORTIUM OR NETWORK
* ASSOCIATES BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Principal Author: Brian Wellington
* $Id: openssl_link.c,v 1.48 2001/11/20 21:28:38 gson Exp $
*/
#ifdef OPENSSL
#include <config.h>
#include <isc/mutexblock.h>
#include "dst_internal.h"
#ifdef CRYPTO_LOCK_ENGINE
#endif
static int nlocks;
#ifdef CRYPTO_LOCK_ENGINE
static ENGINE *e;
#endif
static int
if (num < 0)
return (-1);
}
static int
if (num < 0)
return (-1);
}
static void
/*
* Do nothing. The only call to this provides no useful data anyway.
*/
}
static void
if ((mode & CRYPTO_LOCK) != 0)
else
}
static unsigned long
id_callback(void) {
return ((unsigned long)isc_thread_self());
}
static void *
}
static void
}
static void *
void *p;
p = NULL;
if (size > 0) {
}
return (p);
}
nlocks = CRYPTO_num_locks();
return (ISC_R_NOMEMORY);
if (result != ISC_R_SUCCESS)
goto cleanup_mutexalloc;
goto cleanup_mutexinit;
}
#ifdef CRYPTO_LOCK_ENGINE
e = ENGINE_new();
if (e == NULL) {
goto cleanup_rm;
}
ENGINE_set_RAND(e, rm);
#else
#endif
return (ISC_R_SUCCESS);
#ifdef CRYPTO_LOCK_ENGINE
#endif
return (result);
}
void
#ifdef CRYPTO_LOCK_ENGINE
if (e != NULL)
ENGINE_free(e);
#endif
}
}
#else /* OPENSSL */
#endif /* OPENSSL */