Skip to contentSkip to conversation

Pull request for branch for-2012.05/polarssl-hiawatha

GIT PULL New Thomas Petazzoni 2 participants 4 messages Apr 10, 2012 – Apr 15, 2012

lore
Share & tools
lore
#0 lore raw

Hello,

Here are two new packages, adding polarssl and hiawatha. The combination of both allows to have a SSL-capable Web server in 327 KB (212 KB for the polarssl shared library and 115 KB for the Hiawatha web server), which is much smaller than the 1.5+ MB needed for Lighttpd+OpenSSL. Those packages can therefore be an useful addition on devices where space matters, and that also require a SSL-capable web server.

Best regards,

Thomas

The following changes since commit 8876b6751e0bc19a3754290061808f0f8420708e:

Fix makedevs to allow longer path names (2012-04-08 19:46:52 +0200)

are available in the git repository at:
git://git.free-electrons.com/users/thomas-petazzoni/buildroot.git for-2012.05/polarssl-hiawatha

Thomas Petazzoni (2):
polarssl: new package
hiawatha: new package

 package/Config.in                                  |    4 +
 package/hiawatha/Config.in                         |   26 +++++++++
 .../hiawatha-support-for-external-polarssl.patch   |   60 ++++++++++++++++++++
 package/hiawatha/hiawatha.mk                       |   13 ++++
 package/polarssl/Config.in                         |   28 +++++++++
 package/polarssl/polarssl-no-programs.patch        |   26 +++++++++
 package/polarssl/polarssl-no-test-suite.patch      |   26 +++++++++
 .../polarssl-shared-and-static-library.patch       |   52 +++++++++++++++++
 package/polarssl/polarssl.mk                       |   13 ++++
 9 files changed, 248 insertions(+), 0 deletions(-)
 create mode 100644 package/hiawatha/Config.in
 create mode 100644 package/hiawatha/hiawatha-support-for-external-polarssl.patch
 create mode 100644 package/hiawatha/hiawatha.mk
 create mode 100644 package/polarssl/Config.in
 create mode 100644 package/polarssl/polarssl-no-programs.patch
 create mode 100644 package/polarssl/polarssl-no-test-suite.patch
 create mode 100644 package/polarssl/polarssl-shared-and-static-library.patch
 create mode 100644 package/polarssl/polarssl.mk

Thanks,

Signature · 1 line
Thomas Petazzoni
#1 lore raw

PATCH 1/2 polarssl: new package

---
 package/Config.in                                  |    1 +
 package/polarssl/Config.in                         |   28 +++++++++++
 package/polarssl/polarssl-no-programs.patch        |   26 ++++++++++
 package/polarssl/polarssl-no-test-suite.patch      |   26 ++++++++++
 .../polarssl-shared-and-static-library.patch       |   52 ++++++++++++++++++++
 package/polarssl/polarssl.mk                       |   13 +++++
 6 files changed, 146 insertions(+), 0 deletions(-)
 create mode 100644 package/polarssl/Config.in
 create mode 100644 package/polarssl/polarssl-no-programs.patch
 create mode 100644 package/polarssl/polarssl-no-test-suite.patch
 create mode 100644 package/polarssl/polarssl-shared-and-static-library.patch
 create mode 100644 package/polarssl/polarssl.mk
package/Config.in +1 -0
index 4c6d4d8..bcace09 100644
@@ -276,6 +276,7 @@ source "package/libgcrypt/Config.in"
 source "package/libgpg-error/Config.in"
 source "package/libnss/Config.in"
 source "package/openssl/Config.in"
+source "package/polarssl/Config.in"
 endmenu
 
 menu "Database"
package/polarssl/Config.in new file +28 -0
new file mode 100644
index 0000000..3414a7f
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_POLARSSL
+	bool "polarssl"
+	help
+	  PolarSSL is an SSL library written in ANSI C. PolarSSL makes
+	  it easy for developers to include cryptographic and SSL/TLS
+	  capabilities in their (embedded) products with as little
+	  hassle as possible. It is designed to be readable,
+	  documented, tested, loosely coupled and portable.
+
+	  Warning: PolarSSL is licensed under the GPL. If you want to
+	  use it in your own proprietary applications, you have to
+	  purchase a commercial license.
+
+	  http://polarssl.org/
+
+config BR2_PACKAGE_POLARSSL_PROGRAMS
+	bool "polarssl programs"
+	depends on BR2_PACKAGE_POLARSSL
+	help
+	  This option enables the installation and the build of
+	  PolarSSL companion programs: aescrypt2, benchmark, cert_app,
+	  crl_app, crypt_and_hash, dh_client, dh_genprime, dh_server,
+	  gen_entropy, generic_sum, gen_random_ctr_drbg,
+	  gen_random_havege, hello, key_app, md5sum, mpi_demo,
+	  rsa_decrypt, rsa_encrypt, rsa_genkey, rsa_sign, rsa_verify,
+	  selftest, sha1sum, sha2sum, ssi-cgi, ssl_cert_test,
+	  ssl_client1, ssl_client2, ssl_fork_server, ssl_mail_client,
+	  ssl_server, ssl_test
package/polarssl/polarssl-no-programs.patch new file +26 -0
new file mode 100644
index 0000000..f118871
@@ -0,0 +1,26 @@
+Add the BUILD_PROGRAMS option to disable programs build
+
+By default, PolarSSL builds and installs a large set of companions
+programs, which in some cases are not useful. This patch adds the
+BUILD_PROGRAMS option which allows to disable the build and
+installation of such programs when not needed.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+
+Index: polarssl-1.1.1/CMakeLists.txt
+===================================================================
+--- polarssl-1.1.1.orig/CMakeLists.txt
++++ polarssl-1.1.1/CMakeLists.txt
+@@ -33,7 +33,11 @@
+   add_subdirectory(tests)
+ endif(CMAKE_COMPILER_IS_GNUCC AND BUILD_TESTS)
+ 
+-add_subdirectory(programs)
++option(BUILD_PROGRAMS "Build programs." ON)
++
++if(BUILD_PROGRAMS)
++  add_subdirectory(programs)
++endif(BUILD_PROGRAMS)
+ 
+ ADD_CUSTOM_TARGET(apidoc
+                   COMMAND doxygen doxygen/polarssl.doxyfile
package/polarssl/polarssl-no-test-suite.patch new file +26 -0
new file mode 100644
index 0000000..7e07441
@@ -0,0 +1,26 @@
+Add BUILD_TESTS option to disable test suite
+
+By default, PolarSSL builds a fairly extensive test suite to validate
+the library. In the context of Buildroot, building this test suite is
+not really useful, so we add a BUILD_TESTS to disable its build.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+
+Index: polarssl-1.1.1/CMakeLists.txt
+===================================================================
+--- polarssl-1.1.1.orig/CMakeLists.txt
++++ polarssl-1.1.1/CMakeLists.txt
+@@ -27,9 +27,11 @@
+ add_subdirectory(library)
+ add_subdirectory(include)
+ 
+-if(CMAKE_COMPILER_IS_GNUCC)
++option(BUILD_TESTS "Build tests." ON)
++
++if(CMAKE_COMPILER_IS_GNUCC AND BUILD_TESTS)
+   add_subdirectory(tests)
+-endif(CMAKE_COMPILER_IS_GNUCC)
++endif(CMAKE_COMPILER_IS_GNUCC AND BUILD_TESTS)
+ 
+ add_subdirectory(programs)
+ 
package/polarssl/polarssl-shared-and-static-library.patch new file +52 -0

52 lines not on this page · raw message

package/polarssl/polarssl.mk new file +13 -0
new file mode 100644
index 0000000..0d8574c
@@ -0,0 +1,13 @@
+POLARSSL_SITE = http://polarssl.org/code/releases/
+POLARSSL_VERSION = 1.1.1
+POLARSSL_SOURCE = polarssl-$(POLARSSL_VERSION)-gpl.tgz
+POLARSSL_CONF_OPT = \
+	-DUSE_SHARED_POLARSSL_LIBRARY=ON \
+	-DUSE_STATIC_POLARSSL_LIBRARY=ON \
+	-DBUILD_TESTS=OFF \
+	-DBUILD_PROGRAMS=$(if $(BR2_PACKAGE_POLARSSL_PROGRAMS),ON,OFF)
+
+POLARSSL_INSTALL_STAGING = YES
+
+$(eval $(call CMAKETARGETS))
+
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/2 hiawatha: new package

In reply to Thomas Petazzoni
---
 package/Config.in                                  |    3 +
 package/hiawatha/Config.in                         |   26 +++++++++
 .../hiawatha-support-for-external-polarssl.patch   |   60 ++++++++++++++++++++
 package/hiawatha/hiawatha.mk                       |   13 ++++
 4 files changed, 102 insertions(+), 0 deletions(-)
 create mode 100644 package/hiawatha/Config.in
 create mode 100644 package/hiawatha/hiawatha-support-for-external-polarssl.patch
 create mode 100644 package/hiawatha/hiawatha.mk
package/Config.in +3 -0
index bcace09..d703b8c 100644
@@ -455,6 +455,9 @@ source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
 source "package/ebtables/Config.in"
 source "package/ethtool/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+source "package/hiawatha/Config.in"
+endif
 source "package/hostapd/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/ifplugd/Config.in"
package/hiawatha/Config.in new file +26 -0
new file mode 100644
index 0000000..431a9fa
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_HIAWATHA
+	bool "hiawatha"
+	help
+	  Hiawatha is a webserver for Unix and has been built with
+	  security in mind. This resulted in a highly secure
+	  webserver, in both code and features.
+
+	  This webserver runs on Linux, BSD, MacOS X and
+	  Windows. Although it can run any kind of CGI / FastCGI
+	  application, it has been optimized for usage with PHP. Most
+	  well known PHP frameworks and CMS applications have been
+	  tested with Hiawatha and ran without a problem. Hiawatha
+	  supports many web and HTTP features such as CGI/FastCGI,
+	  HTTP authentication, virtual host support, request
+	  pipelining, keep alive connections, URL rewriting and many
+	  more.
+
+	  http://www.hiawatha-webserver.org/
+
+if BR2_PACKAGE_HIAWATHA
+
+config BR2_PACKAGE_HIAWATHA_SSL
+	bool "hiawatha SSL support"
+	select BR2_PACKAGE_POLARSSL
+
+endif
package/hiawatha/hiawatha-support-for-external-polarssl.patch new file +60 -0

60 lines not on this page · raw message

package/hiawatha/hiawatha.mk new file +13 -0
new file mode 100644
index 0000000..aa245f3
@@ -0,0 +1,13 @@
+HIAWATHA_VERSION = 8.1
+HIAWATHA_SITE = http://www.hiawatha-webserver.org/files/
+
+ifeq ($(BR2_PACKAGE_HIAWATHA_SSL),y)
+HIAWATHA_CONF_OPT += -DENABLE_SSL_EXTERNAL=ON -DENABLE_SSL=ON
+HIAWATHA_DEPENDENCIES += polarssl
+endif
+
+HIAWATHA_CONF_OPT += \
+	-DENABLE_TOOLKIT=OFF \
+	-DENABLE_XSLT=OFF
+
+$(eval $(call CMAKETARGETS))
Signature · 1 line
1.7.4.1
#3 lore raw
In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Hello,
Thomas> Here are two new packages, adding polarssl and hiawatha. The Thomas> combination of both allows to have a SSL-capable Web server in 327 KB Thomas> (212 KB for the polarssl shared library and 115 KB for the Hiawatha Thomas> web server), which is much smaller than the 1.5+ MB needed for Thomas> Lighttpd+OpenSSL. Those packages can therefore be an useful addition Thomas> on devices where space matters, and that also require a SSL-capable Thomas> web server.

Committed both, thanks.

Signature · 1 line
Bye, Peter Korsgaard