diff options
author | Anton Gerasimov <anton@advancedtelematic.com> | 2017-09-08 17:11:33 +0200 |
---|---|---|
committer | Anton Gerasimov <anton@advancedtelematic.com> | 2017-09-13 11:53:33 +0200 |
commit | 4a7366c4f161a98611a292394a9662a0c507f904 (patch) | |
tree | 2b71f99717dec2b17c23684bc20311c926489d32 /recipes-support/softhsm | |
parent | 6db91a2e484ab026dd50817147beed31c49abc2b (diff) | |
download | meta-updater-4a7366c4f161a98611a292394a9662a0c507f904.tar.gz |
Add recipes to test pkcs11 functionality in Aktualizr
Diffstat (limited to 'recipes-support/softhsm')
-rw-r--r-- | recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch | 86 | ||||
-rw-r--r-- | recipes-support/softhsm/softhsm_git.bb | 27 |
2 files changed, 113 insertions, 0 deletions
diff --git a/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch b/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch new file mode 100644 index 0000000..b3a7622 --- /dev/null +++ b/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From b6add28acb884b6006216e8422cc18504483c72e Mon Sep 17 00:00:00 2001 | ||
2 | From: Anton Gerasimov <anton@advancedtelematic.com> | ||
3 | Date: Fri, 8 Sep 2017 15:08:40 +0200 | ||
4 | Subject: [PATCH] Cross-compilation tweaks | ||
5 | |||
6 | --- | ||
7 | m4/acx_openssl.m4 | 2 ++ | ||
8 | m4/acx_openssl_ecc.m4 | 3 +++ | ||
9 | m4/acx_openssl_fips.m4 | 2 ++ | ||
10 | m4/acx_openssl_gost.m4 | 2 ++ | ||
11 | 4 files changed, 9 insertions(+) | ||
12 | |||
13 | diff --git a/m4/acx_openssl.m4 b/m4/acx_openssl.m4 | ||
14 | index e90c78f..9de6055 100644 | ||
15 | --- a/m4/acx_openssl.m4 | ||
16 | +++ b/m4/acx_openssl.m4 | ||
17 | @@ -25,6 +25,7 @@ AC_DEFUN([ACX_OPENSSL],[ | ||
18 | AC_CHECK_HEADERS([openssl/ssl.h],,[AC_MSG_ERROR([Can't find OpenSSL headers])]) | ||
19 | AC_CHECK_LIB(crypto, BN_new,,[AC_MSG_ERROR([Can't find OpenSSL library])]) | ||
20 | |||
21 | + if test "$cross_compiling" != yes; then | ||
22 | AC_MSG_CHECKING([for OpenSSL version]) | ||
23 | CHECK_OPENSSL_VERSION=m4_format(0x%02x%02x%02x000L, $1, $2, $3) | ||
24 | AC_LANG_PUSH([C]) | ||
25 | @@ -51,6 +52,7 @@ AC_DEFUN([ACX_OPENSSL],[ | ||
26 | AC_MSG_ERROR([OpenSSL library too old ($1.$2.$3 or later required)]) | ||
27 | ],[]) | ||
28 | AC_LANG_POP([C]) | ||
29 | + fi | ||
30 | |||
31 | CPPFLAGS=$tmp_CPPFLAGS | ||
32 | LIBS=$tmp_LIBS | ||
33 | diff --git a/m4/acx_openssl_ecc.m4 b/m4/acx_openssl_ecc.m4 | ||
34 | index 612c505..ba2389d 100644 | ||
35 | --- a/m4/acx_openssl_ecc.m4 | ||
36 | +++ b/m4/acx_openssl_ecc.m4 | ||
37 | @@ -1,4 +1,5 @@ | ||
38 | AC_DEFUN([ACX_OPENSSL_ECC],[ | ||
39 | + if test "$cross_compiling" != yes; then | ||
40 | AC_MSG_CHECKING(for OpenSSL ECC support) | ||
41 | |||
42 | tmp_CPPFLAGS=$CPPFLAGS | ||
43 | @@ -32,6 +33,8 @@ AC_DEFUN([ACX_OPENSSL_ECC],[ | ||
44 | ],[]) | ||
45 | AC_LANG_POP([C]) | ||
46 | |||
47 | + fi | ||
48 | + | ||
49 | CPPFLAGS=$tmp_CPPFLAGS | ||
50 | LIBS=$tmp_LIBS | ||
51 | ]) | ||
52 | diff --git a/m4/acx_openssl_fips.m4 b/m4/acx_openssl_fips.m4 | ||
53 | index 0491397..896cdbf 100644 | ||
54 | --- a/m4/acx_openssl_fips.m4 | ||
55 | +++ b/m4/acx_openssl_fips.m4 | ||
56 | @@ -1,4 +1,5 @@ | ||
57 | AC_DEFUN([ACX_OPENSSL_FIPS],[ | ||
58 | + if test "$cross_compiling" != yes; then | ||
59 | AC_MSG_CHECKING(for OpenSSL FIPS capable library) | ||
60 | |||
61 | tmp_CPPFLAGS=$CPPFLAGS | ||
62 | @@ -47,4 +48,5 @@ AC_DEFUN([ACX_OPENSSL_FIPS],[ | ||
63 | |||
64 | CPPFLAGS=$tmp_CPPFLAGS | ||
65 | LIBS=$tmp_LIBS | ||
66 | + fi | ||
67 | ]) | ||
68 | diff --git a/m4/acx_openssl_gost.m4 b/m4/acx_openssl_gost.m4 | ||
69 | index dca489b..34c39d8 100644 | ||
70 | --- a/m4/acx_openssl_gost.m4 | ||
71 | +++ b/m4/acx_openssl_gost.m4 | ||
72 | @@ -1,4 +1,5 @@ | ||
73 | AC_DEFUN([ACX_OPENSSL_GOST],[ | ||
74 | + if test "$cross_compiling" != yes; then | ||
75 | AC_MSG_CHECKING(for OpenSSL GOST support) | ||
76 | |||
77 | tmp_CPPFLAGS=$CPPFLAGS | ||
78 | @@ -62,4 +63,5 @@ AC_DEFUN([ACX_OPENSSL_GOST],[ | ||
79 | |||
80 | CPPFLAGS=$tmp_CPPFLAGS | ||
81 | LIBS=$tmp_LIBS | ||
82 | + fi | ||
83 | ]) | ||
84 | -- | ||
85 | 2.7.4 | ||
86 | |||
diff --git a/recipes-support/softhsm/softhsm_git.bb b/recipes-support/softhsm/softhsm_git.bb new file mode 100644 index 0000000..c26903d --- /dev/null +++ b/recipes-support/softhsm/softhsm_git.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "HSM emulator" | ||
2 | LICENSE = "BSD" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ef3f77a3507c3d91e75b9f2bdaee4210" | ||
4 | |||
5 | inherit autotools-brokensep | ||
6 | |||
7 | |||
8 | SRC_URI = "git://github.com/opendnssec/SoftHSMv2.git;branch=master \ | ||
9 | file://0001-Cross-compilation-tweaks.patch" | ||
10 | SRCREV="1f7498c0c65b1b1ad5e1bdbd87e9d4b100705745" | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | DEPENDS += " openssl" | ||
15 | |||
16 | EXTRA_OECONF = "--disable-gost --with-openssl=${STAGING_LIBDIR}/.." | ||
17 | |||
18 | do_configure() { | ||
19 | unset docdir | ||
20 | sh ./autogen.sh | ||
21 | oe_runconf | ||
22 | } | ||
23 | |||
24 | FILES_${PN} = "${bindir} \ | ||
25 | ${libdir}/softhsm \ | ||
26 | ${sysconfdir} \ | ||
27 | ${localstatedir}/lib/softhsm " | ||