summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-05-25 17:29:51 +0000
committertedu <tedu@openbsd.org>2014-05-25 17:29:51 +0000
commit0b60a19ffe6e9e7df0121748b3737afc8234db29 (patch)
treea95bcad7ad857d97557454e29852433e5d515016
parentRemove TLS_DEBUG, SSL_DEBUG, CIPHER_DEBUG and OPENSSL_RI_DEBUG. Much of (diff)
downloadwireguard-openbsd-0b60a19ffe6e9e7df0121748b3737afc8234db29.tar.xz
wireguard-openbsd-0b60a19ffe6e9e7df0121748b3737afc8234db29.zip
define LIBRESSL_INTERNAL, and use it to hide the bad stuff from ourselves
ok beck
-rw-r--r--lib/libcrypto/crypto.h3
-rw-r--r--lib/libcrypto/crypto/Makefile3
-rw-r--r--lib/libssl/src/crypto/crypto.h3
-rw-r--r--lib/libssl/ssl/Makefile3
4 files changed, 8 insertions, 4 deletions
diff --git a/lib/libcrypto/crypto.h b/lib/libcrypto/crypto.h
index 67bb46c7e54..9307687b27e 100644
--- a/lib/libcrypto/crypto.h
+++ b/lib/libcrypto/crypto.h
@@ -316,7 +316,6 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
* via CRYPTO_ex_data_new_class). */
#define CRYPTO_EX_INDEX_USER 100
-
/* This is the default callbacks, but we can have others as well:
* this is needed in Win32 where the application malloc and the
* library malloc may not be the same.
@@ -471,12 +470,14 @@ void CRYPTO_get_mem_debug_functions(
void (**r)(void *, void *, int, const char *, int, int),
void (**f)(void *, int), void (**so)(long), long (**go)(void));
+#ifndef LIBRESSL_INTERNAL
void *CRYPTO_malloc_locked(int num, const char *file, int line);
void CRYPTO_free_locked(void *ptr);
void *CRYPTO_malloc(int num, const char *file, int line);
char *CRYPTO_strdup(const char *str, const char *file, int line);
void CRYPTO_free(void *ptr);
void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
+#endif
void *CRYPTO_realloc_clean(void *addr, int old_num, int num,
const char *file, int line);
void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
diff --git a/lib/libcrypto/crypto/Makefile b/lib/libcrypto/crypto/Makefile
index 258f998fbc3..9acf6701c53 100644
--- a/lib/libcrypto/crypto/Makefile
+++ b/lib/libcrypto/crypto/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.36 2014/05/16 14:24:36 jsing Exp $
+# $OpenBSD: Makefile,v 1.37 2014/05/25 17:29:51 tedu Exp $
LIB= crypto
@@ -16,6 +16,7 @@ CFLAGS+= -DDSO_DLFCN -DHAVE_DLFCN_H
PICFLAG=-fPIC
.endif
+CFLAGS+= -DLIBRESSL_INTERNAL
CFLAGS+= -DTERMIOS
# Hardware engines
CFLAGS+= -DOPENSSL_NO_HW_PADLOCK # XXX enable this?
diff --git a/lib/libssl/src/crypto/crypto.h b/lib/libssl/src/crypto/crypto.h
index 67bb46c7e54..9307687b27e 100644
--- a/lib/libssl/src/crypto/crypto.h
+++ b/lib/libssl/src/crypto/crypto.h
@@ -316,7 +316,6 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
* via CRYPTO_ex_data_new_class). */
#define CRYPTO_EX_INDEX_USER 100
-
/* This is the default callbacks, but we can have others as well:
* this is needed in Win32 where the application malloc and the
* library malloc may not be the same.
@@ -471,12 +470,14 @@ void CRYPTO_get_mem_debug_functions(
void (**r)(void *, void *, int, const char *, int, int),
void (**f)(void *, int), void (**so)(long), long (**go)(void));
+#ifndef LIBRESSL_INTERNAL
void *CRYPTO_malloc_locked(int num, const char *file, int line);
void CRYPTO_free_locked(void *ptr);
void *CRYPTO_malloc(int num, const char *file, int line);
char *CRYPTO_strdup(const char *str, const char *file, int line);
void CRYPTO_free(void *ptr);
void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
+#endif
void *CRYPTO_realloc_clean(void *addr, int old_num, int num,
const char *file, int line);
void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
diff --git a/lib/libssl/ssl/Makefile b/lib/libssl/ssl/Makefile
index 10f6a5eff04..2fa9507d6cb 100644
--- a/lib/libssl/ssl/Makefile
+++ b/lib/libssl/ssl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.44 2014/05/18 11:20:08 miod Exp $
+# $OpenBSD: Makefile,v 1.45 2014/05/25 17:29:51 tedu Exp $
LIB= ssl
@@ -10,6 +10,7 @@ CFLAGS+= -Wall
.if ${COMPILER_VERSION:L} != "gcc3"
CFLAGS+= -Werror
.endif
+CFLAGS+= -DLIBRESSL_INTERNAL
CFLAGS+= -DTERMIOS -DANSI_SOURCE
CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5
CFLAGS+= -I${SSL_SRC}