Cherry-picked from: https://gitcode.com/openHiTLS/openhitls/merge_requests/415 Signed-off-by: Dongjianwei001 <dongjianwei1@huawei.com>