diff options
| author | tedu <> | 2014-05-25 17:29:51 +0000 | 
|---|---|---|
| committer | tedu <> | 2014-05-25 17:29:51 +0000 | 
| commit | 1a9fbbfaaf6f53dfe281955a91870e781ef7efb2 (patch) | |
| tree | 70f0f5e47adfc2bc36e7e8af3b45f5e7849d00da | |
| parent | 20aefbf0b86724bbf87cb9ceb36defa64e4691ab (diff) | |
| download | openbsd-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
| -rw-r--r-- | src/lib/libcrypto/crypto.h | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/crypto.h | 3 | ||||
| -rw-r--r-- | src/lib/libssl/ssl/Makefile | 3 | 
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 | ||
| 474 | void *CRYPTO_malloc_locked(int num, const char *file, int line); | 474 | void *CRYPTO_malloc_locked(int num, const char *file, int line); | 
| 475 | void CRYPTO_free_locked(void *ptr); | 475 | void CRYPTO_free_locked(void *ptr); | 
| 476 | void *CRYPTO_malloc(int num, const char *file, int line); | 476 | void *CRYPTO_malloc(int num, const char *file, int line); | 
| 477 | char *CRYPTO_strdup(const char *str, const char *file, int line); | 477 | char *CRYPTO_strdup(const char *str, const char *file, int line); | 
| 478 | void CRYPTO_free(void *ptr); | 478 | void CRYPTO_free(void *ptr); | 
| 479 | void *CRYPTO_realloc(void *addr, int num, const char *file, int line); | 479 | void *CRYPTO_realloc(void *addr, int num, const char *file, int line); | 
| 480 | #endif | ||
| 480 | void *CRYPTO_realloc_clean(void *addr, int old_num, int num, | 481 | void *CRYPTO_realloc_clean(void *addr, int old_num, int num, | 
| 481 | const char *file, int line); | 482 | const char *file, int line); | 
| 482 | void *CRYPTO_remalloc(void *addr, int num, const char *file, int line); | 483 | void *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 | ||
| 3 | LIB= crypto | 3 | LIB= crypto | 
| 4 | 4 | ||
| @@ -16,6 +16,7 @@ CFLAGS+= -DDSO_DLFCN -DHAVE_DLFCN_H | |||
| 16 | PICFLAG=-fPIC | 16 | PICFLAG=-fPIC | 
| 17 | .endif | 17 | .endif | 
| 18 | 18 | ||
| 19 | CFLAGS+= -DLIBRESSL_INTERNAL | ||
| 19 | CFLAGS+= -DTERMIOS | 20 | CFLAGS+= -DTERMIOS | 
| 20 | # Hardware engines | 21 | # Hardware engines | 
| 21 | CFLAGS+= -DOPENSSL_NO_HW_PADLOCK # XXX enable this? | 22 | CFLAGS+= -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 | ||
| 474 | void *CRYPTO_malloc_locked(int num, const char *file, int line); | 474 | void *CRYPTO_malloc_locked(int num, const char *file, int line); | 
| 475 | void CRYPTO_free_locked(void *ptr); | 475 | void CRYPTO_free_locked(void *ptr); | 
| 476 | void *CRYPTO_malloc(int num, const char *file, int line); | 476 | void *CRYPTO_malloc(int num, const char *file, int line); | 
| 477 | char *CRYPTO_strdup(const char *str, const char *file, int line); | 477 | char *CRYPTO_strdup(const char *str, const char *file, int line); | 
| 478 | void CRYPTO_free(void *ptr); | 478 | void CRYPTO_free(void *ptr); | 
| 479 | void *CRYPTO_realloc(void *addr, int num, const char *file, int line); | 479 | void *CRYPTO_realloc(void *addr, int num, const char *file, int line); | 
| 480 | #endif | ||
| 480 | void *CRYPTO_realloc_clean(void *addr, int old_num, int num, | 481 | void *CRYPTO_realloc_clean(void *addr, int old_num, int num, | 
| 481 | const char *file, int line); | 482 | const char *file, int line); | 
| 482 | void *CRYPTO_remalloc(void *addr, int num, const char *file, int line); | 483 | void *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 | ||
| 3 | LIB= ssl | 3 | LIB= ssl | 
| 4 | 4 | ||
| @@ -10,6 +10,7 @@ CFLAGS+= -Wall | |||
| 10 | .if ${COMPILER_VERSION:L} != "gcc3" | 10 | .if ${COMPILER_VERSION:L} != "gcc3" | 
| 11 | CFLAGS+= -Werror | 11 | CFLAGS+= -Werror | 
| 12 | .endif | 12 | .endif | 
| 13 | CFLAGS+= -DLIBRESSL_INTERNAL | ||
| 13 | CFLAGS+= -DTERMIOS -DANSI_SOURCE | 14 | CFLAGS+= -DTERMIOS -DANSI_SOURCE | 
| 14 | CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5 | 15 | CFLAGS+= -DOPENSSL_NO_RC5 -DOPENSSL_NO_KRB5 | 
| 15 | CFLAGS+= -I${SSL_SRC} | 16 | CFLAGS+= -I${SSL_SRC} | 
