summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortedu <>2014-05-25 17:29:51 +0000
committertedu <>2014-05-25 17:29:51 +0000
commit1a9fbbfaaf6f53dfe281955a91870e781ef7efb2 (patch)
tree70f0f5e47adfc2bc36e7e8af3b45f5e7849d00da /src
parent20aefbf0b86724bbf87cb9ceb36defa64e4691ab (diff)
downloadopenbsd-1a9fbbfaaf6f53dfe281955a91870e781ef7efb2.tar.gz
openbsd-1a9fbbfaaf6f53dfe281955a91870e781ef7efb2.tar.bz2
openbsd-1a9fbbfaaf6f53dfe281955a91870e781ef7efb2.zip
define LIBRESSL_INTERNAL, and use it to hide the bad stuff from ourselves
ok beck
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/crypto.h3
-rw-r--r--src/lib/libcrypto/crypto/Makefile3
-rw-r--r--src/lib/libssl/src/crypto/crypto.h3
-rw-r--r--src/lib/libssl/ssl/Makefile3
4 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index 67bb46c7e5..9307687b27 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -316,7 +316,6 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
316 * via CRYPTO_ex_data_new_class). */ 316 * via CRYPTO_ex_data_new_class). */
317#define CRYPTO_EX_INDEX_USER 100 317#define CRYPTO_EX_INDEX_USER 100
318 318
319
320/* This is the default callbacks, but we can have others as well: 319/* This is the default callbacks, but we can have others as well:
321 * this is needed in Win32 where the application malloc and the 320 * this is needed in Win32 where the application malloc and the
322 * library malloc may not be the same. 321 * library malloc may not be the same.
@@ -471,12 +470,14 @@ void CRYPTO_get_mem_debug_functions(
471 void (**r)(void *, void *, int, const char *, int, int), 470 void (**r)(void *, void *, int, const char *, int, int),
472 void (**f)(void *, int), void (**so)(long), long (**go)(void)); 471 void (**f)(void *, int), void (**so)(long), long (**go)(void));
473 472
473#ifndef LIBRESSL_INTERNAL
474void *CRYPTO_malloc_locked(int num, const char *file, int line); 474void *CRYPTO_malloc_locked(int num, const char *file, int line);
475void CRYPTO_free_locked(void *ptr); 475void CRYPTO_free_locked(void *ptr);
476void *CRYPTO_malloc(int num, const char *file, int line); 476void *CRYPTO_malloc(int num, const char *file, int line);
477char *CRYPTO_strdup(const char *str, const char *file, int line); 477char *CRYPTO_strdup(const char *str, const char *file, int line);
478void CRYPTO_free(void *ptr); 478void CRYPTO_free(void *ptr);
479void *CRYPTO_realloc(void *addr, int num, const char *file, int line); 479void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
480#endif
480void *CRYPTO_realloc_clean(void *addr, int old_num, int num, 481void *CRYPTO_realloc_clean(void *addr, int old_num, int num,
481 const char *file, int line); 482 const char *file, int line);
482void *CRYPTO_remalloc(void *addr, int num, const char *file, int line); 483void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
diff --git a/src/lib/libcrypto/crypto/Makefile b/src/lib/libcrypto/crypto/Makefile
index 258f998fbc..9acf6701c5 100644
--- a/src/lib/libcrypto/crypto/Makefile
+++ b/src/lib/libcrypto/crypto/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.36 2014/05/16 14:24:36 jsing Exp $ 1# $OpenBSD: Makefile,v 1.37 2014/05/25 17:29:51 tedu Exp $
2 2
3LIB= crypto 3LIB= crypto
4 4
@@ -16,6 +16,7 @@ CFLAGS+= -DDSO_DLFCN -DHAVE_DLFCN_H
16PICFLAG=-fPIC 16PICFLAG=-fPIC
17.endif 17.endif
18 18
19CFLAGS+= -DLIBRESSL_INTERNAL
19CFLAGS+= -DTERMIOS 20CFLAGS+= -DTERMIOS
20# Hardware engines 21# Hardware engines
21CFLAGS+= -DOPENSSL_NO_HW_PADLOCK # XXX enable this? 22CFLAGS+= -DOPENSSL_NO_HW_PADLOCK # XXX enable this?
diff --git a/src/lib/libssl/src/crypto/crypto.h b/src/lib/libssl/src/crypto/crypto.h
index 67bb46c7e5..9307687b27 100644
--- a/src/lib/libssl/src/crypto/crypto.h
+++ b/src/lib/libssl/src/crypto/crypto.h
@@ -316,7 +316,6 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
316 * via CRYPTO_ex_data_new_class). */ 316 * via CRYPTO_ex_data_new_class). */
317#define CRYPTO_EX_INDEX_USER 100 317#define CRYPTO_EX_INDEX_USER 100
318 318
319
320/* This is the default callbacks, but we can have others as well: 319/* This is the default callbacks, but we can have others as well:
321 * this is needed in Win32 where the application malloc and the 320 * this is needed in Win32 where the application malloc and the
322 * library malloc may not be the same. 321 * library malloc may not be the same.
@@ -471,12 +470,14 @@ void CRYPTO_get_mem_debug_functions(
471 void (**r)(void *, void *, int, const char *, int, int), 470 void (**r)(void *, void *, int, const char *, int, int),
472 void (**f)(void *, int), void (**so)(long), long (**go)(void)); 471 void (**f)(void *, int), void (**so)(long), long (**go)(void));
473 472
473#ifndef LIBRESSL_INTERNAL
474void *CRYPTO_malloc_locked(int num, const char *file, int line); 474void *CRYPTO_malloc_locked(int num, const char *file, int line);
475void CRYPTO_free_locked(void *ptr); 475void CRYPTO_free_locked(void *ptr);
476void *CRYPTO_malloc(int num, const char *file, int line); 476void *CRYPTO_malloc(int num, const char *file, int line);
477char *CRYPTO_strdup(const char *str, const char *file, int line); 477char *CRYPTO_strdup(const char *str, const char *file, int line);
478void CRYPTO_free(void *ptr); 478void CRYPTO_free(void *ptr);
479void *CRYPTO_realloc(void *addr, int num, const char *file, int line); 479void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
480#endif
480void *CRYPTO_realloc_clean(void *addr, int old_num, int num, 481void *CRYPTO_realloc_clean(void *addr, int old_num, int num,
481 const char *file, int line); 482 const char *file, int line);
482void *CRYPTO_remalloc(void *addr, int num, const char *file, int line); 483void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
diff --git a/src/lib/libssl/ssl/Makefile b/src/lib/libssl/ssl/Makefile
index 10f6a5eff0..2fa9507d6c 100644
--- a/src/lib/libssl/ssl/Makefile
+++ b/src/lib/libssl/ssl/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.44 2014/05/18 11:20:08 miod Exp $ 1# $OpenBSD: Makefile,v 1.45 2014/05/25 17:29:51 tedu Exp $
2 2
3LIB= ssl 3LIB= ssl
4 4
@@ -10,6 +10,7 @@ CFLAGS+= -Wall
10.if ${COMPILER_VERSION:L} != "gcc3" 10.if ${COMPILER_VERSION:L} != "gcc3"
11CFLAGS+= -Werror 11CFLAGS+= -Werror
12.endif 12.endif
13CFLAGS+= -DLIBRESSL_INTERNAL
13CFLAGS+= -DTERMIOS -DANSI_SOURCE 14CFLAGS+= -DTERMIOS -DANSI_SOURCE
14CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5 15CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5
15CFLAGS+= -I${SSL_SRC} 16CFLAGS+= -I${SSL_SRC}