Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gp: fix endianness of two RSA public exponents
GP tests 30125 (9d-21-98) and 30127 (9d-28-5d) use badly encoded constants: TEE_ATTR_RSA_PUBLIC_EXPONENT_VALUE_GEN_NOT_ODD (= 65538) TEE_ATTR_RSA_PUBLIC_EXPONENT_VALUE_NOT_GEN_DEFAULT (= 66001), respectively. The values are given in decimal in the test suite documentation and were erroneously encoded in little endian order in source file host/xtest/gp/include/xml_datastorage_api.h. Fix the values by using big endian encoding as expected by the GP API when big numbers are provided as input to crypto functions. Fixes the failure of "xtest gp_30125" after OP-TEE OS commit [1] (prior to that commit, both the code and the test were wrong). Link: [1] OP-TEE/optee_os@c9366c1 Signed-off-by: Jerome Forissier <[email protected]>
- Loading branch information