commit | 885bbf1c82ea9f9cbfbe0065ee46adc8e398c868 | [log] [tgz] |
---|---|---|
author | Willy Tu <wltu@google.com> | Mon Aug 09 10:24:42 2021 -0700 |
committer | Willy Tu <wltu@google.com> | Mon Aug 09 17:54:33 2021 +0000 |
tree | afd74bc17af220ee67554401f479686ca43ee89c | |
parent | e6a716506447d2d03b99f1cd2007e207a6dfcae0 [diff] |
ssl: remove BMCWEB_ENABLE_SSL since openssl is not optional anymore With `BMCWEB_ENABLE_SSL`, it will cause issues with functions that depends on `ensuressl`. Since openssl is required, that flag can be removed for the ssl_key_handler. prepareMutualTls() is dependent on `ensuressl` which is only available `insecure-disable-ssl` is disable so the CI didn't catch this error. If `insecure-disable-ssl` is enable, then `ensuressl` will be missing and fail the bmcweb build due to prepareMutualTls(). Error example, ``` Step #1: In file included from ../git/http/http_server.hpp:3, Step #1: from ../git/http/app.hpp:5, Step #1: from ../git/src/webserver_main.cpp:4: Step #1: ../git/http/http_connection.hpp: In member function 'void crow::Connection<Adaptor, Handler>::prepareMutualTls()': Step #1: ../git/http/http_connection.hpp:99:38: error: 'ensuressl' has not been declared Step #1: 99 | std::filesystem::path caPath(ensuressl::trustStorePath); Step #1: | ^~~~~~~~~ Step #1: ninja: build stopped: subcommand failed. ``` Change-Id: I3c010d5042b4615623b1c043a368ba5c9cbc6b4c Signed-off-by: Willy Tu <wltu@google.com>
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 coverage -C builddir test
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.