commit | c867a83ed580d0594824816b0518d3de2fc1155d | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Thu Mar 10 14:17:00 2022 -0800 |
committer | Ed Tanous <ed@tanous.net> | Thu Apr 28 21:37:10 2022 +0000 |
tree | 9131fc1d4bb6220459fdae61f5d5c081267d2946 | |
parent | c937d2bfefa3ff91b7175d9684f99712ec9b88e5 [diff] |
Delete forked function_traits The function_traits class was very clearly "borrowed" from boost::function traits, then added to to support lambdas. boost::function_traits has been superceeded by boost::callable_traits, which fixes the same shortcomings that we have fixed here. This commit replaces almost the entirety of the uses of function_traits with callable traits, with one exception: arg<i>. In the callable traits model, arg_t is a std::tuple, which, while better, doesn't unpack easily into a variadic pack that our router code expects. Ideally, at some point, we would rewrite the router core to not rely on std::make_integer_sequence, but that's a much more invasive change. Tested: Called curl --insecure --user root:0penBmc https://192.168.7.2/redfish/v1/Managers/bmc/LogServices/Journal/Entries/1646953359619803 and verified callback return the correct result (not 404). That API has several flexible router parameters, which is the only thing this commit could break. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Icf3299b2d5c1a5ff111f68858bb46139735aaabe
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D
flags that correspond to options in bmcweb/meson_options.txt
and then compiling. For example, meson <builddir> -Dkvm=disabled ...
followed by ninja
in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1
algorithm. The certificate
C=US, O=OpenBMC, CN=testhost
,SHA-256
algorithm.