diff options
author | Brian Gix <brian.gix@intel.com> | 2019-08-30 12:15:27 -0700 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-09-01 08:34:00 -0700 |
commit | f62350b70231096a623435b857961738c2a86b17 (patch) | |
tree | ace9d3806622dee001822d53d55253465ed76b11 /mesh/main.c | |
parent | 354d75d0ea68448cec05339811d9c5eb5057eac7 (diff) | |
download | bluez-f62350b70231096a623435b857961738c2a86b17.tar.gz |
mesh: test AEAD at startup to check kernel support
One time test at startup to ensure either kernel version v4.9 or later,
*or* that required AES-CCM support has been back-ported. If support not
there, daemon will run without providing D-Bus service or attaching to
controllers (prevents systemd thrashing).
Diffstat (limited to 'mesh/main.c')
-rw-r--r-- | mesh/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesh/main.c b/mesh/main.c index 262e3da48..273651f97 100644 --- a/mesh/main.c +++ b/mesh/main.c @@ -34,6 +34,7 @@ #include "lib/mgmt.h" #include "mesh/mesh.h" +#include "mesh/crypto.h" #include "mesh/dbus.h" #include "mesh/mesh-io.h" @@ -121,6 +122,12 @@ int main(int argc, char *argv[]) l_log_set_stderr(); + if (!mesh_crypto_check_avail()) { + l_error("Mesh Crypto functions unavailable"); + status = l_main_run_with_signal(signal_handler, NULL); + goto done; + } + for (;;) { int opt; const char *str; |