patch-Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. $OpenBSD: patch-Makefile,v 1.6 2017/01/27 11:01:14 sthen Exp $
  2. --- Makefile.orig Sun Nov 6 13:27:11 2016
  3. +++ Makefile Fri Jan 27 10:45:15 2017
  4. @@ -24,9 +24,6 @@ DEFINES = -DVERSION=\"$(GIT_VERSION)\"
  5. # for dynamic linking
  6. LIBS = -lssl -lcrypto
  7. -ifneq ($(OS), FreeBSD)
  8. - LIBS += -ldl
  9. -endif
  10. # for static linking
  11. ifeq ($(STATIC_BUILD), TRUE)
  12. @@ -34,9 +31,6 @@ PWD = $(shell pwd)/openssl
  13. LDFLAGS += -L${PWD}/
  14. CFLAGS += -I${PWD}/include/ -I${PWD}/
  15. LIBS = -lssl -lcrypto -lz
  16. -ifneq ($(OS), FreeBSD)
  17. - LIBS += -ldl
  18. -endif
  19. GIT_VERSION := $(GIT_VERSION)-static
  20. else
  21. # for dynamic linking
  22. @@ -82,16 +76,12 @@ uninstall:
  23. .openssl.is.fresh: opensslpull
  24. true
  25. opensslpull:
  26. - if [ -d openssl -a -d openssl/.git ]; then \
  27. - cd ./openssl && git checkout OpenSSL_1_0_2-stable && git pull | grep -q "Already up-to-date." && [ -e ../.openssl.is.fresh ] || touch ../.openssl.is.fresh ; \
  28. - else \
  29. - git clone --depth 1 -b OpenSSL_1_0_2-stable https://github.com/openssl/openssl ./openssl && cd ./openssl && touch ../.openssl.is.fresh ; \
  30. - fi
  31. + touch .openssl.is.fresh
  32. # Re-enable SSLv2 EXPORT ciphers
  33. sed -i.bak 's/# if 0/# if 1/g' openssl/ssl/s2_lib.c
  34. rm openssl/ssl/s2_lib.c.bak
  35. # Re-enable weak (<1024 bit) DH keys
  36. - sed -i.bak 's/dh_size < [0-9]\+/dh_size < 512/g' openssl/ssl/s3_clnt.c
  37. + sed -i.bak -E 's/dh_size < [0-9]\+/dh_size < 512/g' openssl/ssl/s3_clnt.c
  38. rm openssl/ssl/s3_clnt.c.bak
  39. # Break the weak DH key test so OpenSSL compiles
  40. sed -i.bak 's/dhe512/zzz/g' openssl/test/testssl