From patchwork Sat Dec 23 16:32:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Prado X-Patchwork-Id: 852669 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=e-labworks-com.20150623.gappssmtp.com header.i=@e-labworks-com.20150623.gappssmtp.com header.b="pWg1qfzt"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z3rWk4v7yz9s7B for ; Sun, 24 Dec 2017 03:32:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 599D32D7F9; Sat, 23 Dec 2017 16:32:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TLtW-d7vP3b7; Sat, 23 Dec 2017 16:32:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E58792D3C8; Sat, 23 Dec 2017 16:32:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E82CD1C0B10 for ; Sat, 23 Dec 2017 16:32:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E4B1289E92 for ; Sat, 23 Dec 2017 16:32:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 448ysAnj5zyW for ; Sat, 23 Dec 2017 16:32:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id E98EA89E14 for ; Sat, 23 Dec 2017 16:32:27 +0000 (UTC) Received: by mail-qt0-f195.google.com with SMTP id g9so39509615qth.9 for ; Sat, 23 Dec 2017 08:32:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=e-labworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=2SkQAAPeNZXB3qcI549b2b3EJBkVvJdvC/z3tOUd0ps=; b=pWg1qfztEeP+w0afaYz7xzNqUSlylX0OYad3NXakr/EiHSarqmtE75b1ILc2u62qc7 DRFF5SVDqaaMiefi3OrjoxmlGnPJwdkxX0DvBcnCgf6npNxw/Od7KNs8x6zLd9Yf+wz4 ebFgQDK3EbgLcD3KS7XcxlwCRfzkSun5tFFn/ghyrcPy0LLPemSRzZ3MNe1EBchfbh4f UougcHDThYaDhRYREMvNgurRjg1gZV7Nv3I7vVobxcR8WEtiqCjO1XazxdP14Q/e+I5u kdxxIQnHv11HOKuyw3sq+P99HnWQUNFgOliPIm0bVnwJefuzFoBGnpMu9PcKUomjNmhK dRJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2SkQAAPeNZXB3qcI549b2b3EJBkVvJdvC/z3tOUd0ps=; b=OCodDY2Hk+BTUeEmnkElIXqoNQ4TME79k4SY+lQnWJKmJM7DNlUu9XRE97mu4Go+Ph 10zOFV5opG8P2BIkBx0cMj3OpDwDvxj5n8JRe5j/GVwE8fKqxorzyrh6Szt3VSDN6lX1 k3we0gJ+KwKDljXB8wZT+KcAOf2cQDQ0x40yGliwTbzlO9xAPfZQRCSvWH2XVGIBX8nF HVBCg9O9D8KKuX4U5v71C/vKFpD8ThJFQ5afE4nw1ZwqiaRiePTy2qNXI5zVUczupXFJ +mo5teQ4G1YB++7HgoNwCwJf+XNZdfehW09gClM/2v9Gw35gA3L4SLWWA5Uq+gaDfvOb dvdA== X-Gm-Message-State: AKGB3mIQqAPqZMD/Y8OO/eKlZqKtzAGAMHcQzzk5bOSm3aJYfJ1UIoJm x6kScmGS/yEEqt+3LqxQ8kO7JFj8 X-Google-Smtp-Source: ACJfBot0izEsns+ca+AICVB6yeUNm3Vpl/0dbyLA/b6ZEa2WWS7lI8SoZVU1lhGCtyqMYx/QUZ9bYA== X-Received: by 10.200.50.176 with SMTP id z45mr24209351qta.167.1514046746607; Sat, 23 Dec 2017 08:32:26 -0800 (PST) Received: from localhost.localdomain ([189.100.34.201]) by smtp.gmail.com with ESMTPSA id p65sm15594882qkb.29.2017.12.23.08.32.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 23 Dec 2017 08:32:25 -0800 (PST) From: Sergio Prado To: buildroot@buildroot.org Date: Sat, 23 Dec 2017 14:32:15 -0200 Message-Id: <1514046735-14732-1-git-send-email-sergio.prado@e-labworks.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH v2] wolfssl: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sergio Prado MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The wolfSSL embedded SSL library is a lightweight and portable SSL/TLS library. Tested on Beaglebone Black using a tool called testsuite that comes with wolfssl source code inside the testsuite/ directory. To build it, we have to pass --enable-examples in the configure, and then manually copy the binary to the rootfs. Also, to use this tool, you will we need to copy the certs/* directory to the rootfs. Build-tested with test-pkg script. Signed-off-by: Sergio Prado --- Changes v1 -> v2: - bump to version 3.13.0 - new version needs a toolchain with threads support - added two new menu options to enable all wolfssl features and SSv3 support - added an explanation on why we need autoreconf - removed options related to nginx, wpa_supplicant and lighttpd --- DEVELOPERS | 1 + package/Config.in | 1 + package/wolfssl/Config.in | 27 +++++++++++++++++++++++++++ package/wolfssl/wolfssl.hash | 6 ++++++ package/wolfssl/wolfssl.mk | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+) create mode 100644 package/wolfssl/Config.in create mode 100644 package/wolfssl/wolfssl.hash create mode 100644 package/wolfssl/wolfssl.mk diff --git a/DEVELOPERS b/DEVELOPERS index 77e3344fa4dc..54ba8ceb2a64 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1541,6 +1541,7 @@ F: package/mongodb/ F: package/stella/ F: package/tunctl/ F: package/ubus/ +F: package/wolfssl/ N: Simon Dawson F: boot/at91bootstrap3/ diff --git a/package/Config.in b/package/Config.in index cb2141b8f3c8..1455ca6ddc1a 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1046,6 +1046,7 @@ menu "Crypto" source "package/tinydtls/Config.in" source "package/trousers/Config.in" source "package/ustream-ssl/Config.in" + source "package/wolfssl/Config.in" endmenu menu "Database" diff --git a/package/wolfssl/Config.in b/package/wolfssl/Config.in new file mode 100644 index 000000000000..3c6d68f592fc --- /dev/null +++ b/package/wolfssl/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_WOLFSSL + bool "wolfssl" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The wolfSSL embedded SSL library (formerly CyaSSL) is a + lightweight, portable, C-language-based SSL/TLS library + targeted at IoT, embedded, and RTOS environments primarily + because of its size, speed, and feature set. + + https://www.wolfssl.com/ + +if BR2_PACKAGE_WOLFSSL + +config BR2_PACKAGE_WOLFSSL_ALL + bool "enable all features, except SSLv3" + help + Enable all wolfSSL features, except SSL version 3.0 support. + +config BR2_PACKAGE_WOLFSSL_SSLV3 + bool "enable SSLv3" + help + Enable SSL version 3.0 support. + +endif + +comment "wolfssl needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wolfssl/wolfssl.hash b/package/wolfssl/wolfssl.hash new file mode 100644 index 000000000000..204f2f09571d --- /dev/null +++ b/package/wolfssl/wolfssl.hash @@ -0,0 +1,6 @@ +# Locally computed: +sha256 3bafeb0cb7eaff80002ba3f7cbb70023757bcc35fc4d82181945b143f1f927c6 v3.13.0-stable.tar.gz + +# Hash for license files: +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING +sha256 74adaaef40b96c71378b6daa3feb8ccd4a1bfd9b76debf3f3f29cf3a0e86c9a0 LICENSING diff --git a/package/wolfssl/wolfssl.mk b/package/wolfssl/wolfssl.mk new file mode 100644 index 000000000000..c8ef50a9bc6e --- /dev/null +++ b/package/wolfssl/wolfssl.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# wolfssl +# +################################################################################ + +WOLFSSL_VERSION = 3.13.0 +WOLFSSL_SITE = https://github.com/wolfSSL/wolfssl/archive +WOLFSSL_SOURCE = v$(WOLFSSL_VERSION)-stable.tar.gz + +WOLFSSL_LICENSE = GPL-2.0 +WOLFSSL_LICENSE_FILES = COPYING LICENSING + +WOLFSSL_DEPENDENCIES = host-pkgconf + +# wolfssl's source code is released without a configure +# script, so we need autoreconf +WOLFSSL_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_WOLFSSL_ALL),y) +WOLFSSL_CONF_OPTS += --enable-all +else +WOLFSSL_CONF_OPTS += --disable-all +endif + +ifeq ($(BR2_PACKAGE_WOLFSSL_SSLV3),y) +WOLFSSL_CONF_OPTS += --enable-sslv3 +else +WOLFSSL_CONF_OPTS += --disable-sslv3 +endif + +ifeq ($(BR2_ARM_CPU_ARMV8A),y) +WOLFSSL_CONF_OPTS += --enable-armasm +else +WOLFSSL_CONF_OPTS += --disable-armasm +endif + +$(eval $(autotools-package))