aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/freeradius/files/check-openssl-cmds-in-script-bootstrap.patch
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2021-04-21 17:40:24 +0800
committerKhem Raj <raj.khem@gmail.com>2021-04-21 08:27:01 -0700
commitc8ceefc5c3fa5ce87f0e1b0a8f5bb06b259d1e76 (patch)
tree2ea80bb7cdd5a68be0ca93e73d4375490d48fa6a /meta-networking/recipes-connectivity/freeradius/files/check-openssl-cmds-in-script-bootstrap.patch
parente418ee4657e084c8b4d42aabf76ff6df99253e91 (diff)
downloadmeta-openembedded-c8ceefc5c3fa5ce87f0e1b0a8f5bb06b259d1e76.tar.gz
meta-openembedded-c8ceefc5c3fa5ce87f0e1b0a8f5bb06b259d1e76.tar.bz2
meta-openembedded-c8ceefc5c3fa5ce87f0e1b0a8f5bb06b259d1e76.zip
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/files/check-openssl-cmds-in-script-bootstrap.patch')
-rw-r--r--meta-networking/recipes-connectivity/freeradius/files/check-openssl-cmds-in-script-bootstrap.patch38
1 files changed, 38 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 @@
+bootstrap: check commands of openssl exist
+
+It calls openssl 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
+
+Upstream-Status: Denied [https://github.com/FreeRADIUS/freeradius-server/pull/4059]
+ The maintainer commented in the pull that the script could
+ be run on a host which provides these openssl commands.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ raddb/certs/bootstrap | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/raddb/certs/bootstrap b/raddb/certs/bootstrap
+index 0f719aafd4..17feddbeeb 100755
+--- a/raddb/certs/bootstrap
++++ b/raddb/certs/bootstrap
+@@ -13,6 +13,14 @@
+ umask 027
+ cd `dirname $0`
+
++# check commands of openssl exist
++for cmd in dhparam pkcs12; do
++ if ! openssl ${cmd} -help >/dev/null 2>&1; then
++ echo "Error: command ${cmd} is not supported by openssl."
++ exit 1
++ fi
++done
++
+ make -h > /dev/null 2>&1
+
+ #