168651Skris/* dso_openssl.c */ 268651Skris/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 368651Skris * project 2000. 468651Skris */ 568651Skris/* ==================================================================== 668651Skris * Copyright (c) 2000 The OpenSSL Project. All rights reserved. 768651Skris * 868651Skris * Redistribution and use in source and binary forms, with or without 968651Skris * modification, are permitted provided that the following conditions 1068651Skris * are met: 1168651Skris * 1268651Skris * 1. Redistributions of source code must retain the above copyright 1368651Skris * notice, this list of conditions and the following disclaimer. 1468651Skris * 1568651Skris * 2. Redistributions in binary form must reproduce the above copyright 1668651Skris * notice, this list of conditions and the following disclaimer in 1768651Skris * the documentation and/or other materials provided with the 1868651Skris * distribution. 1968651Skris * 2068651Skris * 3. All advertising materials mentioning features or use of this 2168651Skris * software must display the following acknowledgment: 2268651Skris * "This product includes software developed by the OpenSSL Project 2368651Skris * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 2468651Skris * 2568651Skris * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 2668651Skris * endorse or promote products derived from this software without 2768651Skris * prior written permission. For written permission, please contact 2868651Skris * licensing@OpenSSL.org. 2968651Skris * 3068651Skris * 5. Products derived from this software may not be called "OpenSSL" 3168651Skris * nor may "OpenSSL" appear in their names without prior written 3268651Skris * permission of the OpenSSL Project. 3368651Skris * 3468651Skris * 6. Redistributions of any form whatsoever must retain the following 3568651Skris * acknowledgment: 3668651Skris * "This product includes software developed by the OpenSSL Project 3768651Skris * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 3868651Skris * 3968651Skris * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 4068651Skris * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 4168651Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 4268651Skris * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 4368651Skris * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 4468651Skris * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 4568651Skris * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 4668651Skris * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 4768651Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 4868651Skris * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 4968651Skris * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 5068651Skris * OF THE POSSIBILITY OF SUCH DAMAGE. 5168651Skris * ==================================================================== 5268651Skris * 5368651Skris * This product includes cryptographic software written by Eric Young 5468651Skris * (eay@cryptsoft.com). This product includes software written by Tim 5568651Skris * Hudson (tjh@cryptsoft.com). 5668651Skris * 5768651Skris */ 5868651Skris 5968651Skris#include <stdio.h> 6068651Skris#include "cryptlib.h" 6168651Skris#include <openssl/dso.h> 6268651Skris 6368651Skris/* We just pinch the method from an appropriate "default" method. */ 6468651Skris 6568651SkrisDSO_METHOD *DSO_METHOD_openssl(void) 6668651Skris { 6768651Skris#ifdef DEF_DSO_METHOD 6868651Skris return(DEF_DSO_METHOD()); 6968651Skris#elif defined(DSO_DLFCN) 7068651Skris return(DSO_METHOD_dlfcn()); 7168651Skris#elif defined(DSO_DL) 7268651Skris return(DSO_METHOD_dl()); 7368651Skris#elif defined(DSO_WIN32) 7468651Skris return(DSO_METHOD_win32()); 7568651Skris#elif defined(DSO_VMS) 7668651Skris return(DSO_METHOD_vms()); 77238405Sjkim#elif defined(DSO_BEOS) 78238405Sjkim return(DSO_METHOD_beos()); 7968651Skris#else 8068651Skris return(DSO_METHOD_null()); 8168651Skris#endif 8268651Skris } 8368651Skris 84