Add OpenBMC https interface.
See related changes in https://gerrit.openbmc.org/q/topic:%22ipmi-https%22
Add OpenBMC https interface.
See related changes in https://gerrit.openbmc.org/q/topic:%22ipmi-https%22
LeiYu_bd/ipmitool:dev-support-https-interface-on-upstream into master
Add OpenBMC https interface.
See related changes in https://gerrit.openbmc.org/q/topic:%22ipmi-https%22
OpenBMC runs bmcweb as https service and it has APIs to handle ipmi requests. The detailed protocol is decribed at: https://gerrit.openbmc.org/c/openbmc/docs/+/80188 This commit add initial configure options to support the https interface. Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Use libcurl to connect the BMC with websocket, and implement the ipmi's
request/response functions by invoking websocket's send/recv.
The `-H` argument supports below URIs:
* IPv4 address
* IPv6 address with square brackets, like `[xx:xx::xx]`
* Domain
* Websocket with IPv4 address or domain like `wss://xxx`
* Websocket with IPv6 address like `wss://[xxx]`
Tested:
```
# IPMI with https interface
export ipmi_bmc="xxx" # The above supported URIs
export token="xxx"
ipmitool -I https -H ${ipmi_bmc} -P ${token} mc info
# If failure to connect to the BMC
ipmitool: https: failed to connect to wss://xxx/ipmi: Couldn't connect to server
# If token expires
ipmitool: https: failed to connect to wss://xxx/ipmi: HTTP response code said error
HTTP Response Code: 401
Please check if your token expires.
```
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Add bridge command support.
Tested: On a machine with ME to handle the bridge command:
```
Use https interface:
ipmitool -I https -H ${ipmi_bmc} -P ${token} -b 0x06 -t 0x2c raw 0x06 0x01
50 01 06 03 02 21 57 01 00 18 0b 06 14 00 01
```
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Implementing ipmi https SOL using `/console/default` URI, which is
implemented by OpenBMC by default.
Only `sol activate` is supported, and user shall enter `Enter ~ .` to
quite the session.
Tested:
```
ipmitool -I https -H ${ipmi_bmc} -P ${token} sol activate
[Type '~.' to exit ipmi https sol]
... # Use the SOL session
~. [terminated ipmitool]
```
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Be noted that this MR shall NOT be merged until the OpenBMC-related changes are merged.
Closing as the linked change in OpenBMC has been rejected/abandoned
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?