/* crypto/bio/bss_bio.c -*- Mode: C; c-file-style: "eay" -*- */
+/* ====================================================================
+ * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
/* Special method for a BIO where the other endpoint is also a BIO
* of this kind, handled by the same thread (i.e. the "peer" is actually
break;
case BIO_C_DESTROY_BIO_PAIR:
- /* Effects both BIOs in the pair -- call just once!
+ /* Affects both BIOs in the pair -- call just once!
* Or let BIO_free(bio1); BIO_free(bio2); do the job. */
bio_destroy_pair(bio);
ret = 1;
typedef DWORD (WINAPI *GETQUEUESTATUS)(UINT);
typedef HANDLE (WINAPI *CREATETOOLHELP32SNAPSHOT)(DWORD, DWORD);
+typedef BOOL (WINAPI *CLOSETOOLHELP32SNAPSHOT)(HANDLE);
typedef BOOL (WINAPI *HEAP32FIRST)(LPHEAPENTRY32, DWORD, DWORD);
typedef BOOL (WINAPI *HEAP32NEXT)(LPHEAPENTRY32);
typedef BOOL (WINAPI *HEAP32LIST)(HANDLE, LPHEAPLIST32);
* This seeding method was proposed in Peter Gutmann, Software
* Generation of Practically Strong Random Numbers,
* http://www.usenix.org/publications/library/proceedings/sec98/gutmann.html
- * revised version at http://www.cryptoengines.com/~peter/06_random.pdf
+ * revised version at http://www.cryptoengines.com/~peter/06_random.pdf
* (The assignment of entropy estimates below is arbitrary, but based
* on Peter's analysis the full poll appears to be safe. Additional
* interactive seeding is encouraged.)
if (kernel)
{
CREATETOOLHELP32SNAPSHOT snap;
+ CLOSETOOLHELP32SNAPSHOT close_snap;
HANDLE handle;
HEAP32FIRST heap_first;
snap = (CREATETOOLHELP32SNAPSHOT)
GetProcAddress(kernel, "CreateToolhelp32Snapshot");
+ close_snap = (CLOSETOOLHELP32SNAPSHOT)
+ GetProcAddress(kernel, "CloseToolhelp32Snapshot");
heap_first = (HEAP32FIRST) GetProcAddress(kernel, "Heap32First");
heap_next = (HEAP32NEXT) GetProcAddress(kernel, "Heap32Next");
heaplist_first = (HEAP32LIST) GetProcAddress(kernel, "Heap32ListFirst");
heaplist_next && process_first && process_next &&
thread_first && thread_next && module_first &&
module_next && (handle = snap(TH32CS_SNAPALL,0))
- != NULL)
+ != INVALID_HANDLE_VALUE)
{
/* heap list and heap walking */
/* HEAPLIST32 contains 3 fields that will change with
do
RAND_add(&m, m.dwSize, 9);
while (module_next(handle, &m));
-
- CloseHandle(handle);
+ if (close_snap)
+ close_snap(handle);
+ else
+ CloseHandle(handle);
}
FreeLibrary(kernel);
(cd ..; $(MAKE) DIRS=crypto all)
$(RSATEST): $(RSATEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(BNTEST): $(BNTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(SHATEST): $(SHATEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(BFTEST): $(BFTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(DESTEST): $(DESTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(DHTEST): $(DHTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(DSATEST): $(DSATEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(METHTEST): $(METHTEST).o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
$(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO)
LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
$(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
dummytest: dummytest.o $(DLIBCRYPTO)
- LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
- $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
+ if [ "$(SHLIB_TARGET)" = "" ]; then \
+ $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ else \
+ LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+ $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
+ fi
# DO NOT DELETE THIS LINE -- make depend depends on it.