commit | 471a5eb867c6a3e625bc5745edac8e56ad2e549c | [log] [tgz] |
---|---|---|
author | AppaRao Puli <apparao.puli@linux.intel.com> | Wed May 20 00:13:22 2020 +0530 |
committer | AppaRao Puli <apparao.puli@linux.intel.com> | Fri May 29 18:26:14 2020 +0000 |
tree | eded03aaa8f070b4d73d35da210418b0e554dd11 | |
parent | 2056b6d167a3ecb3c1615d906624a91259dc6c1f [diff] |
Update json helper function - readJson The json helper functions are currently coupled with response(crow::response) and limiting it to use only while sending response. There are some use cases where we don't send crow::response instead we extract json data from files and load configuration. Decoupled the business logic for validating json key existence, json value type checking and range validation with top level use cases. So this json helper functions can be used for validating json and extracting value from json object during init cases also(Ex: Used in EventService config initialization) Added new API in helper function which checks key existence, value is of desired Type and value is in acceptable range and assign value in output parameter. Tested: Verified post and patch methods with different kinds of value types( int, bool, string, vector array, json etc..) and it works. Change-Id: I21a6f9a12aef09f6ca79a02bc01d96efeeb3a20a Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.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/CMakeLists.txt
and then compiling. For example, cmake -DBMCWEB_ENABLE_KVM=NO ...
followed by make
. The option names become C++ preprocessor symbols that control which code is compiled into the program.
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.