diff options
author | Kai Kang <kai.kang@windriver.com> | 2021-04-21 17:40:24 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-04-21 08:27:01 -0700 |
commit | c8ceefc5c3fa5ce87f0e1b0a8f5bb06b259d1e76 (patch) | |
tree | 2ea80bb7cdd5a68be0ca93e73d4375490d48fa6a /meta-networking/recipes-connectivity/freeradius | |
parent | e418ee4657e084c8b4d42aabf76ff6df99253e91 (diff) | |
download | meta-openembedded-c8ceefc5c3fa5ce87f0e1b0a8f5bb06b259d1e76.tar.gz |
freeradius: check existence of openssl's commands in bootstrap
It calls openssl's commands 'dhparam' and 'pkcs12' in script bootstrap.
These commands are configurable based on configure options 'no-dh' and
'no-des', and may not be provided by openssl. So check existence of
these commands. If not, abort running of script bootstrap.
1. https://github.com/openssl/openssl/blob/master/apps/build.info#L37
2. https://github.com/openssl/openssl/blob/master/apps/build.info#L22
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/freeradius')
-rw-r--r-- | meta-networking/recipes-connectivity/freeradius/files/check-openssl-cmds-in-script-bootstrap.patch | 38 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/freeradius/files/check-openssl-cmds-in-script-bootstrap.patch b/meta-networking/recipes-connectivity/freeradius/files/check-openssl-cmds-in-script-bootstrap.patch new file mode 100644 index 000000000..fcadae93a --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/check-openssl-cmds-in-script-bootstrap.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | bootstrap: check commands of openssl exist | ||
2 | |||
3 | It calls openssl commands dhparam and pkcs12 in script bootstrap. These | ||
4 | commands are configurable based on configure options 'no-dh' and | ||
5 | 'no-des', and may not be provided by openssl. So check existence of | ||
6 | these commands. If not, abort running of script bootstrap. | ||
7 | |||
8 | 1. https://github.com/openssl/openssl/blob/master/apps/build.info#L37 | ||
9 | 2. https://github.com/openssl/openssl/blob/master/apps/build.info#L22 | ||
10 | |||
11 | Upstream-Status: Denied [https://github.com/FreeRADIUS/freeradius-server/pull/4059] | ||
12 | The maintainer commented in the pull that the script could | ||
13 | be run on a host which provides these openssl commands. | ||
14 | |||
15 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
16 | --- | ||
17 | raddb/certs/bootstrap | 8 ++++++++ | ||
18 | 1 file changed, 8 insertions(+) | ||
19 | |||
20 | diff --git a/raddb/certs/bootstrap b/raddb/certs/bootstrap | ||
21 | index 0f719aafd4..17feddbeeb 100755 | ||
22 | --- a/raddb/certs/bootstrap | ||
23 | +++ b/raddb/certs/bootstrap | ||
24 | @@ -13,6 +13,14 @@ | ||
25 | umask 027 | ||
26 | cd `dirname $0` | ||
27 | |||
28 | +# check commands of openssl exist | ||
29 | +for cmd in dhparam pkcs12; do | ||
30 | + if ! openssl ${cmd} -help >/dev/null 2>&1; then | ||
31 | + echo "Error: command ${cmd} is not supported by openssl." | ||
32 | + exit 1 | ||
33 | + fi | ||
34 | +done | ||
35 | + | ||
36 | make -h > /dev/null 2>&1 | ||
37 | |||
38 | # | ||
diff --git a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb index 864a4e944..a6df2aeb0 100644 --- a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb +++ b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb | |||
@@ -31,6 +31,7 @@ SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.0.x;lfs=0 | |||
31 | file://0001-workaround-error-with-autoconf-2.7.patch \ | 31 | file://0001-workaround-error-with-autoconf-2.7.patch \ |
32 | file://radiusd.service \ | 32 | file://radiusd.service \ |
33 | file://radiusd-volatiles.conf \ | 33 | file://radiusd-volatiles.conf \ |
34 | file://check-openssl-cmds-in-script-bootstrap.patch \ | ||
34 | " | 35 | " |
35 | 36 | ||
36 | SRCREV = "af428abda249b2279ba0582180985a9f6f4a144a" | 37 | SRCREV = "af428abda249b2279ba0582180985a9f6f4a144a" |