summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/strongswan
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2014-03-04 14:38:42 +0800
committerJoe MacDonald <joe@deserted.net>2014-03-14 08:51:45 -0400
commit238093bf8c37bff8fc92341d8dcd481a2b6a6a1f (patch)
treecbb9eb073fe949c1040526eff98ca48a975978dc /meta-networking/recipes-support/strongswan
parent60c49640554b62afc8c9e5ce54db93b76b03f6c3 (diff)
downloadmeta-openembedded-238093bf8c37bff8fc92341d8dcd481a2b6a6a1f.tar.gz
strongswan: update verion to 5.1.1
* Add a patch to fix the function parameter. * Add PACKAGECONFIG for optional packages instead of explicitly disable, and set sqlite and curl as default. * Remove the split package strongswan-plugins. * Add configure option --without-lib-prefix so it doesn't search for libraries in includedir and libdir to avoid QA error. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking/recipes-support/strongswan')
-rw-r--r--meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch98
-rw-r--r--meta-networking/recipes-support/strongswan/strongswan_5.0.0.bb36
-rw-r--r--meta-networking/recipes-support/strongswan/strongswan_5.1.1.bb45
3 files changed, 143 insertions, 36 deletions
diff --git a/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch b/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
new file mode 100644
index 000000000..da96983e6
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch
@@ -0,0 +1,98 @@
1fix the function parameter
2
3Upstream-Status: pending
4
5Original openssl_diffie_hellman_create has three parameters, but
6it is reassigned a function pointer which has one parameter, and
7is called with one parameter, which will lead to segment fault
8on PPC, Now we simply correct the number of parameters.
9
10 #0 0x484d4aa0 in __GI_raise (sig=6)
11 at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
12 #1 0x484d9930 in __GI_abort () at abort.c:91
13 #2 0x10002064 in segv_handler (signal=11) at charon.c:224
14 #3 <signal handler called>
15 #4 0x48d89630 in openssl_diffie_hellman_create (group=MODP_1024_BIT, g=...,
16 p=<error reading variable: Cannot access memory at address 0x0>)
17 at openssl_diffie_hellman.c:143
18 #5 0x482c54f8 in create_dh (this=0x11ac6e68, group=MODP_1024_BIT)
19 at crypto/crypto_factory.c:358
20 #6 0x48375884 in create_dh (this=<optimized out>, group=<optimized out>)
21 at sa/keymat.c:132
22 #7 0x483843b8 in process_payloads (this=0x51400a78, message=<optimized
23 out>)
24 at sa/tasks/ike_init.c:200
25 #8 0x483844d0 in process_r (this=0x51400a78, message=0x51500778)
26 at sa/tasks/ike_init.c:319
27 #9 0x48374c9c in process_request (message=0x51500778, this=0x51400d20)
28 at sa/task_manager.c:870
29 #10 process_message (this=0x51400d20, msg=0x51500778) at
30 sa/task_manager.c:925
31 #11 0x4836c378 in process_message (this=0x514005f0, message=0x51500778)
32 at sa/ike_sa.c:1317
33 #12 0x48362270 in execute (this=0x515008d0)
34 at processing/jobs/process_message_job.c:74
35
36Signed-off-by: Roy.Li <rongqing.li@windriver.com>
37---
38 src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | 8 +++++++-
39 src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h | 4 +++-
40 src/libstrongswan/plugins/openssl/openssl_plugin.c | 1 +
41 3 files changed, 11 insertions(+), 2 deletions(-)
42
43diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
44index ff33824..bd21446 100644
45--- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
46+++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
47@@ -142,7 +142,7 @@ METHOD(diffie_hellman_t, destroy, void,
48 /*
49 * Described in header.
50 */
51-openssl_diffie_hellman_t *openssl_diffie_hellman_create(
52+openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom(
53 diffie_hellman_group_t group, chunk_t g, chunk_t p)
54 {
55 private_openssl_diffie_hellman_t *this;
56@@ -197,5 +197,11 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create(
57
58 return &this->public;
59 }
60+openssl_diffie_hellman_t *openssl_diffie_hellman_create( diffie_hellman_group_t group)
61+{
62+ chunk_t g;
63+ chunk_t p;
64+ openssl_diffie_hellman_create_custom(group, g, p);
65+}
66
67 #endif /* OPENSSL_NO_DH */
68diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
69index 53dc59c..eb69eaa 100644
70--- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
71+++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h
72@@ -44,8 +44,10 @@ struct openssl_diffie_hellman_t {
73 * @param p custom prime, if MODP_CUSTOM
74 * @return openssl_diffie_hellman_t object, NULL if not supported
75 */
76-openssl_diffie_hellman_t *openssl_diffie_hellman_create(
77+openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom(
78 diffie_hellman_group_t group, chunk_t g, chunk_t p);
79+openssl_diffie_hellman_t *openssl_diffie_hellman_create(
80+ diffie_hellman_group_t group);
81
82 #endif /** OPENSSL_DIFFIE_HELLMAN_H_ @}*/
83
84diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c
85index ff25086..c76873d 100644
86--- a/src/libstrongswan/plugins/openssl/openssl_plugin.c
87+++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c
88@@ -388,6 +388,7 @@ METHOD(plugin_t, get_features, int,
89 PLUGIN_PROVIDE(DH, MODP_1024_BIT),
90 PLUGIN_PROVIDE(DH, MODP_1024_160),
91 PLUGIN_PROVIDE(DH, MODP_768_BIT),
92+ PLUGIN_REGISTER(DH, openssl_diffie_hellman_create_custom),
93 PLUGIN_PROVIDE(DH, MODP_CUSTOM),
94 #endif
95 #ifndef OPENSSL_NO_RSA
96--
971.8.3
98
diff --git a/meta-networking/recipes-support/strongswan/strongswan_5.0.0.bb b/meta-networking/recipes-support/strongswan/strongswan_5.0.0.bb
deleted file mode 100644
index eb49494ef..000000000
--- a/meta-networking/recipes-support/strongswan/strongswan_5.0.0.bb
+++ /dev/null
@@ -1,36 +0,0 @@
1DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
2Linux operating system."
3HOMEPAGE = "http://www.strongswan.org"
4SECTION = "console/network"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7DEPENDS = "gmp openssl flex-native flex bison-native"
8PR = "r5"
9
10SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2"
11SRC_URI[md5sum] = "c8b861305def7c0abae04f7bbefec212"
12SRC_URI[sha256sum] = "efc13c86e715b5e596d9d8535640c830f83e977fe521afd2c70d68926c4b573e"
13
14EXTRA_OECONF = "--disable-curl --disable-soup --disable-ldap \
15 --enable-gmp --disable-mysql --disable-sqlite \
16 --enable-openssl"
17
18EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
19
20inherit autotools systemd
21
22RRECOMMENDS_${PN} = "kernel-module-ipsec"
23
24PACKAGES += "${PN}-plugins"
25FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
26FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la"
27FILES_${PN}-staticdev += "${libdir}/ipsec/*.a"
28FILES_${PN}-dbg += "${libdir}/ipsec/.debug ${libdir}/ipsec/plugins/.debug ${libexecdir}/ipsec/.debug"
29FILES_${PN}-plugins += "${libdir}/ipsec/plugins/*"
30
31INSANE_SKIP_${PN}-plugins = "staticdev"
32
33RPROVIDES_${PN} += "${PN}-systemd"
34RREPLACES_${PN} += "${PN}-systemd"
35RCONFLICTS_${PN} += "${PN}-systemd"
36SYSTEMD_SERVICE_${PN} = "${PN}.service"
diff --git a/meta-networking/recipes-support/strongswan/strongswan_5.1.1.bb b/meta-networking/recipes-support/strongswan/strongswan_5.1.1.bb
new file mode 100644
index 000000000..a2a2333d6
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/strongswan_5.1.1.bb
@@ -0,0 +1,45 @@
1DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
2Linux operating system."
3SUMMARY = "strongSwan is an OpenSource IPsec implementation"
4HOMEPAGE = "http://www.strongswan.org"
5SECTION = "console/network"
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
8DEPENDS = "gmp openssl flex-native flex bison-native"
9
10SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
11 file://fix-funtion-parameter.patch \
12"
13
14SRC_URI[md5sum] = "e3af3d493d22286be3cd794533a8966a"
15SRC_URI[sha256sum] = "fbf2a668221fc4a36a34bdeac2dfeda25b96f572d551df022585177953622406"
16
17EXTRA_OECONF = "--enable-gmp \
18 --enable-openssl \
19 --without-lib-prefix \
20"
21
22EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
23
24PACKAGECONFIG ??= "sqlite3 curl \
25 ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \
26"
27PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,"
28PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,"
29PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,"
30PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,"
31PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,"
32
33inherit autotools systemd
34
35RRECOMMENDS_${PN} = "kernel-module-ipsec"
36
37FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS} ${libdir}/ipsec/plugins/*.so"
38FILES_${PN}-dbg += "${libdir}/ipsec/.debug ${libdir}/ipsec/plugins/.debug ${libexecdir}/ipsec/.debug"
39FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la ${libdir}/ipsec/plugins/*.la"
40FILES_${PN}-staticdev += "${libdir}/ipsec/*.a ${libdir}/ipsec/plugins/*.a"
41
42RPROVIDES_${PN} += "${PN}-systemd"
43RREPLACES_${PN} += "${PN}-systemd"
44RCONFLICTS_${PN} += "${PN}-systemd"
45SYSTEMD_SERVICE_${PN} = "${BPN}.service"