mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
It would be much easier to use the --rma command line option if it allowed to pass the authentication code in a separate invocation. This patch changes the behavior of the --rma command line option and improves the help message to match actual features of gsctool. When passed without an extra parameter it requests the Cr50 to generate the RMA authentication challenge, prints the challenge on the console as before, and then exits instead of waiting for the user to enter the authentication code. When the extra parameter is given, it is considered the authentication code received from the server, the code is passed to the Cr50 and the response is reported to the user. BRANCH=none BUG=b:37952913 TEST=verified the expected behavior: localhost tmp # ./gsctool -r -t Challenge: CCYAQ 5ZUDP 9Q8NY S7TQR 7PVUR ETX7P T5YQK NGV9S 7TY8Z QY7H5 5DEH3 5EEWY UBJPA WN7YX SE35G TPS76 localhost tmp # ./gsctool -t -r EYE3E Processing response... rma unlock failed, code 1 localhost tmp # echo $? 3 localhost tmp # ./gsctool -t -r EYE3EWQG Processing response...RMA unlock succeeded. localhost tmp # echo $? 0 localhost tmp # Change-Id: I2c61ff3a3ef1718eb4f192321bebd8caba388aeb Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/722115
This directory is for experiments only. It is not built automatically, required, supported, guaranteed to work, or necessarily well-documented. The contents may change without warning at any time.