commit | 797c0d32d19e6ba66d88b10e2ebf408621365d66 | [log] [tgz] |
---|---|---|
author | Safae Ouajih <souajih@baylibre.com> | Wed Mar 15 08:58:18 2023 +0000 |
committer | Jerome Forissier <jerome.forissier@linaro.org> | Wed Apr 05 09:00:46 2023 +0200 |
tree | 8e23e0553244476bff46c7c88dffffed5005a31d | |
parent | dcd3fcf9ef66b4aefb07f921f685f2797763505c [diff] |
libtomcrypt: fix pkcs_1_v1_5_decode() when empty message In case of EME-PKCS1-v1_5 decoding, the encoded message format is as follow : EM = 0x00 || 0x02 || PS || 0x00 || M. When using an empty message, the 0x00 octet that separates the padding string and message is located at the end. Thus, update the condition to pass the check in case of empty message. This fixes the following AOSP cts test: Module: CtsKeystoreTestCases Test: testEmptyPlaintextEncryptsAndDecrypts Link: https://android.googlesource.com/platform/cts/+/refs/tags/android-cts-12.0_r6/tests/tests/keystore/src/android/keystore/cts/CipherTest.java Signed-off-by: Safae Ouajih <souajih@baylibre.com> [jf: upstream commit caf350028833] Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
This git contains source code for the secure side implementation of OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io.
// OP-TEE core maintainers