summaryrefslogtreecommitdiff
path: root/packages/security
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-07-13 14:50:52 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-07-13 14:50:52 +0200
commita054610cbc13cdbafa3f9cb7336313562b699383 (patch)
treee67abf1b34e954ad46c123808e2b0ef010b42aa9 /packages/security
parentbef80ddfe51143bc56f451fc2c23a7b3236ca4fc (diff)
downloadembtoolkit-a054610cbc13cdbafa3f9cb7336313562b699383.tar.gz
embtoolkit-a054610cbc13cdbafa3f9cb7336313562b699383.tar.bz2
embtoolkit-a054610cbc13cdbafa3f9cb7336313562b699383.tar.xz
Packages: remove OpenSSL in favor of LibreSSL
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages/security')
-rw-r--r--packages/security/libressl/libressl.kconfig50
-rw-r--r--packages/security/libressl/libressl.mk50
-rw-r--r--packages/security/openssl/openssl.kconfig67
-rw-r--r--packages/security/openssl/openssl.mk77
-rw-r--r--packages/security/security.kconfig6
-rw-r--r--packages/security/security.mk9
6 files changed, 108 insertions, 151 deletions
diff --git a/packages/security/libressl/libressl.kconfig b/packages/security/libressl/libressl.kconfig
new file mode 100644
index 0000000..3b40dec
--- /dev/null
+++ b/packages/security/libressl/libressl.kconfig
@@ -0,0 +1,50 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2014 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file libressl.kconfig
+# \brief libressl.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date July 2014
+################################################################################
+
+config EMBTK_HAVE_LIBRESSL
+ bool "Have LibreSSL"
+ help
+ LibreSSL is a FREE version of the SSL/TLS protocol forked from OpenSSL
+ and developped by the OpenBSD project.
+
+choice
+ prompt "libressl version you wish"
+ depends on EMBTK_HAVE_LIBRESSL
+ help
+ Here you can choose which version of libressl you want to use.
+
+ config EMBTK_LIBRESSL_VERSION_2_0_0
+ bool "LibreSSL-2.0.0"
+ select EMBTK_LIBRESSL_NEED_AUTORECONF
+endchoice
+
+config EMBTK_LIBRESSL_VERSION_STRING
+ string
+ default "2.0.0" if EMBTK_LIBRESSL_VERSION_2_0_0
+
+config EMBTK_LIBRESSL_NEED_PATCH
+ bool
+config EMBTK_LIBRESSL_NEED_AUTORECONF
+ bool
diff --git a/packages/security/libressl/libressl.mk b/packages/security/libressl/libressl.mk
new file mode 100644
index 0000000..840d242
--- /dev/null
+++ b/packages/security/libressl/libressl.mk
@@ -0,0 +1,50 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2012 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file libressl.mk
+# \brief libressl.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date December 2009
+################################################################################
+
+LIBRESSL_NAME := libressl
+LIBRESSL_VERSION := $(call embtk_get_pkgversion,libressl)
+LIBRESSL_SITE := http://ftp.openbsd.org/pub/OpenBSD/LibreSSL
+LIBRESSL_PACKAGE := libressl-$(LIBRESSL_VERSION).tar.gz
+LIBRESSL_SRC_DIR := $(embtk_pkgb)/libressl-$(LIBRESSL_VERSION)
+LIBRESSL_BUILD_DIR := $(embtk_pkgb)/libressl-$(LIBRESSL_VERSION)-build
+
+LIBRESSL_BINS := openssl
+LIBRESSL_INCLUDES := openssl
+LIBRESSL_LIBS := libcrypto.* libssl.*
+
+LIBRESSL_CONFIGURE_OPTS := --program-transform-name='s;$(STRICT_GNU_TARGET)-;;'
+
+#
+# remove -Werror and -O2 compiler switches
+#
+define embtk_beforeinstall_libressl
+ find $(LIBRESSL_SRC_DIR) -type f -name '*.m4' -exec chmod 0664 {} +
+ for f in $$(grep -Rl '\-Werror' $(LIBRESSL_SRC_DIR)/*); do \
+ sed -e 's/-Werror//g' < $$f > $$f.tmp; mv $$f.tmp $$f; \
+ done
+ for f in $$(grep -Rl '\-O2' $(LIBRESSL_SRC_DIR)/*); do \
+ sed -e 's/-O2//g' < $$f > $$f.tmp; mv $$f.tmp $$f; \
+ done
+endef
diff --git a/packages/security/openssl/openssl.kconfig b/packages/security/openssl/openssl.kconfig
deleted file mode 100644
index 33da3f6..0000000
--- a/packages/security/openssl/openssl.kconfig
+++ /dev/null
@@ -1,67 +0,0 @@
-################################################################################
-# Embtoolkit
-# Copyright(C) 2010-2011 GAYE Abdoulaye Walsimou.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-################################################################################
-#
-# \file openssl.kconfig
-# \brief openssl.kconfig of Embtoolkit
-# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
-# \date February 2010
-################################################################################
-
-config EMBTK_HAVE_OPENSSL
- bool "Have OpenSSL"
- help
- The OpenSSL Project is a collaborative effort to develop a
- robust, commercial-grade, full-featured, and Open Source toolkit
- implementing the Secure Sockets Layer (SSL v2/v3) and Transport
- Layer Security (TLS v1) protocols as well as a full-strength
- general purpose cryptography library.
-choice
- prompt "OpenSSL version you wish"
- depends on EMBTK_HAVE_OPENSSL
- help
- Here you can choose which version of openssl you want to use.
-
- config EMBTK_OPENSSL_VERSION_0_9_8Q
- bool "openssl-0.9.8q"
- config EMBTK_OPENSSL_VERSION_0_9_8O
- bool "openssl-0.9.8o"
- select EMBTK_OPENSSL_NEED_PATCH
- config EMBTK_OPENSSL_VERSION_0_9_8N
- bool "openssl-0.9.8n"
- select EMBTK_OPENSSL_NEED_PATCH
- config EMBTK_OPENSSL_VERSION_0_9_8L
- bool "openssl-0.9.8l"
- select EMBTK_OPENSSL_NEED_PATCH
-endchoice
-
-config EMBTK_OPENSSL_VERSION_STRING
- string
- default "0.9.8q" if EMBTK_OPENSSL_VERSION_0_9_8Q
- default "0.9.8o" if EMBTK_OPENSSL_VERSION_0_9_8O
- default "0.9.8n" if EMBTK_OPENSSL_VERSION_0_9_8N
- default "0.9.8l" if EMBTK_OPENSSL_VERSION_0_9_8L
-
-config EMBTK_OPENSSL_NEED_PATCH
- bool
-config EMBTK_OPENSSL_NEED_AUTORECONF
- bool
-config EMBTK_OPENSSL_PKG_IS_TARGZ
- bool
-config EMBTK_OPENSSL_PKG_IS_TARBZ2
- bool
diff --git a/packages/security/openssl/openssl.mk b/packages/security/openssl/openssl.mk
deleted file mode 100644
index f916ac7..0000000
--- a/packages/security/openssl/openssl.mk
+++ /dev/null
@@ -1,77 +0,0 @@
-################################################################################
-# Embtoolkit
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-################################################################################
-#
-# \file openssl.mk
-# \brief openssl.mk of Embtoolkit
-# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
-# \date February 2010
-################################################################################
-
-OPENSSL_NAME := openssl
-OPENSSL_VERSION := $(call embtk_get_pkgversion,openssl)
-OPENSSL_SITE := ftp://ftp.openssl.org/source
-OPENSSL_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
-OPENSSL_PACKAGE := openssl-$(OPENSSL_VERSION).tar.gz
-OPENSSL_SRC_DIR := $(embtk_pkgb)/openssl-$(OPENSSL_VERSION)
-OPENSSL_BUILD_DIR := $(embtk_pkgb)/openssl-$(OPENSSL_VERSION)
-
-OPENSSL_NODESTDIR := y
-OPENSSL_MAKE_OPTS := CC=$(TARGETCC_CACHED) INSTALL_PREFIX=$(embtk_sysroot)
-OPENSSL_MAKE_OPTS += LIBDIR=$(LIBDIR) MANDIR=/usr/share/man -j1
-
-OPENSSL_ETC = ssl
-OPENSSL_BINS = c_rehash openssl
-OPENSSL_SBINS =
-OPENSSL_INCLUDES = openssl
-OPENSSL_PKGCONFIGS = libcrypto.pc libssl.pc openssl.pc
-OPENSSL_LIBS = engines/lib4758cca.so engines/libaep.so \
- engines/libatalla.so engines/libcapi.so \
- engines/libchil.so engines/libcswift.so \
- engines/libgmp.so engines/libnuron.so \
- engines/libsureware.so engines/libubsec.so libcrypto.* \
- libssl.*
-
-ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y)
-OPENSSL_LINUX_TARGET := linux-generic32
-else ifeq ($(CONFIG_EMBTK_64BITS_FS),y)
-OPENSSL_LINUX_TARGET := linux-generic64
-else
-OPENSSL_LINUX_TARGET := linux-generic32
-endif
-
-define embtk_install_openssl
- $(call embtk_makeinstall_pkg,openssl)
-endef
-
-define embtk_beforeinstall_openssl
- $(Q)rm -rf $(OPENSSL_BUILD_DIR)/.postinstalled
- $(Q)cd $(OPENSSL_BUILD_DIR); \
- $(CONFIG_EMBTK_SHELL) $(OPENSSL_SRC_DIR)/Configure $(OPENSSL_LINUX_TARGET) \
- --openssldir=/etc/ssl --prefix=/usr shared
-endef
-
-define embtk_postinstallonce_openssl
- $(MAKE) libtool_files_adapt
-endef
-
-define embtk_postinstall_openssl
- $(Q)mkdir -p $(embtk_rootfs)
- $(Q)mkdir -p $(embtk_rootfs)/etc
- $(Q)-cp -R $(embtk_sysroot)/etc/ssl $(embtk_rootfs)/etc/
-endef
diff --git a/packages/security/security.kconfig b/packages/security/security.kconfig
index 4643af0..c2675d0 100644
--- a/packages/security/security.kconfig
+++ b/packages/security/security.kconfig
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2010-2012 GAYE Abdoulaye Walsimou.
+# Copyright(C) 2010-2014 GAYE Abdoulaye Walsimou.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,5 +23,5 @@
# \date February 2010
################################################################################
-# OpenSSL
-source packages/security/openssl/openssl.kconfig
+# LibreSSL
+source packages/security/libressl/libressl.kconfig
diff --git a/packages/security/security.mk b/packages/security/security.mk
index df14be0..0ee4660 100644
--- a/packages/security/security.mk
+++ b/packages/security/security.mk
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2010-2012 Abdoulaye Walsimou GAYE.
+# Copyright(C) 2010-2014 Abdoulaye Walsimou GAYE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
# \date February 2010
################################################################################
-# OpenSSL
-include packages/security/openssl/openssl.mk
-ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_OPENSSL) += openssl_install
+embtk_pkgincdir := packages/security
+
+# LibreSSL
+$(call embtk_include_pkg,libressl)