diff options
author | Tony Theodore <tonyt@logyst.com> | 2015-12-02 07:57:00 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2015-12-02 07:57:00 (GMT) |
commit | a59294b1d1b8e3b8cb870a1ac1112afa83baa288 (patch) | |
tree | eb36e00e68a592c522145fa7bb9e75e7bea10aa9 /src | |
parent | 199f9635585583e1bb1de0e4f11ed1203dd89688 (diff) | |
download | mxe-a59294b1d1b8e3b8cb870a1ac1112afa83baa288.zip mxe-a59294b1d1b8e3b8cb870a1ac1112afa83baa288.tar.gz mxe-a59294b1d1b8e3b8cb870a1ac1112afa83baa288.tar.bz2 |
polarssl: enable zlib and really build .dll
Diffstat (limited to 'src')
-rw-r--r-- | src/polarssl-1-CVE20151182.patch | 20 | ||||
-rw-r--r-- | src/polarssl-1-fixes.patch | 52 | ||||
-rw-r--r-- | src/polarssl.mk | 9 |
3 files changed, 59 insertions, 22 deletions
diff --git a/src/polarssl-1-CVE20151182.patch b/src/polarssl-1-CVE20151182.patch deleted file mode 100644 index a5db454..0000000 --- a/src/polarssl-1-CVE20151182.patch +++ /dev/null @@ -1,20 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Security fix for CVE-2015-1182 from: -https://polarssl.org/tech-updates/security-advisories/polarssl-security-advisory-2014-04 - - -diff --git a/library/asn1parse.c b/library/asn1parse.c -index a3a2b56..e2117bf 100644 ---- a/library/asn1parse.c -+++ b/library/asn1parse.c -@@ -278,6 +278,8 @@ int asn1_get_sequence_of( unsigned char **p, - if( cur->next == NULL ) - return( POLARSSL_ERR_ASN1_MALLOC_FAILED ); - -+ memset( cur->next, 0, sizeof( asn1_sequence ) ); -+ - cur = cur->next; - } - } diff --git a/src/polarssl-1-fixes.patch b/src/polarssl-1-fixes.patch new file mode 100644 index 0000000..1e2d42b --- /dev/null +++ b/src/polarssl-1-fixes.patch @@ -0,0 +1,52 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From 0516b3ebc54e3acdf3882b218e0f30133a23fa61 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Wed, 2 Dec 2015 18:47:45 +1100 +Subject: [PATCH 1/2] Security fix for CVE-2015-1182 from: + +https://polarssl.org/tech-updates/security-advisories/polarssl-security-advisory-2014-04 + +diff --git a/library/asn1parse.c b/library/asn1parse.c +index a3a2b56..e2117bf 100644 +--- a/library/asn1parse.c ++++ b/library/asn1parse.c +@@ -278,6 +278,8 @@ int asn1_get_sequence_of( unsigned char **p, + if( cur->next == NULL ) + return( POLARSSL_ERR_ASN1_MALLOC_FAILED ); + ++ memset( cur->next, 0, sizeof( asn1_sequence ) ); ++ + cur = cur->next; + } + } +-- +2.4.9 (Apple Git-60) + + +From e13da28ce07af59a1ee9736d41fc80e7a2861e7b Mon Sep 17 00:00:00 2001 +From: MXE +Date: Wed, 2 Dec 2015 18:50:21 +1100 +Subject: [PATCH 2/2] fix shared lib install locations + + +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 33d96b4..262b463 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -131,6 +131,8 @@ if(USE_SHARED_POLARSSL_LIBRARY) + endif() + + install(TARGETS polarssl +- DESTINATION ${LIB_INSTALL_DIR} ++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ++ LIBRARY DESTINATION ${LIB_INSTALL_DIR} ++ RUNTIME DESTINATION bin + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + endif(USE_SHARED_POLARSSL_LIBRARY) +-- +2.4.9 (Apple Git-60) + diff --git a/src/polarssl.mk b/src/polarssl.mk index 0c5107a..630e53c 100644 --- a/src/polarssl.mk +++ b/src/polarssl.mk @@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := d3605afc28ed4b7d1d9e3142d72e42855e4a23c07c951bbb0299556b02d36 $(PKG)_SUBDIR := polarssl-$($(PKG)_VERSION) $(PKG)_FILE := polarssl-$($(PKG)_VERSION)-gpl.tgz $(PKG)_URL := https://polarssl.org/download/$($(PKG)_FILE) -$(PKG)_DEPS := gcc +$(PKG)_DEPS := gcc zlib # Match lines like: # <a href="/tech-updates/releases/polarssl-1.3.4-released">PolarSSL 1.3.4 released</a></br> @@ -23,7 +23,12 @@ endef define $(PKG)_BUILD mkdir '$(1)/build' cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DUSE_STATIC_POLARSSL_LIBRARY=$(CMAKE_STATIC_BOOL) \ + -DUSE_SHARED_POLARSSL_LIBRARY=$(CMAKE_SHARED_BOOL) \ + -DENABLE_TESTING=OFF \ + -DENABLE_PROGRAMS=OFF \ + -DENABLE_ZLIB_SUPPORT=ON $(MAKE) -C '$(1)/build/library' -j '$(JOBS)' install $(MAKE) -C '$(1)/build/include' -j '$(JOBS)' install endef |