boot/optee-os: replace pycrypto by pycryptodomex
authorRomain Naour <romain.naour@gmail.com>
Sun, 26 Apr 2020 22:33:22 +0000 (00:33 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 21 May 2020 13:46:21 +0000 (15:46 +0200)
commit82b74001752beaee4f87b1c58b8accea6bd53a9d
treeeebc23c119d7051e5252a633280725ecb04ffb02
parent8d05237b6018d5389e4381b38d874f447137f987
boot/optee-os: replace pycrypto by pycryptodomex

>From [1] included in optee-os release 3.7.0:
"PyCryptodome is a fork of PyCrypto, which is not maintained any more
(the last release dates back to 2013 [2]). It exposes almost the same
API, but there are a few incompatibilities [3]."

pem_to_pub_c.py/sign.py scripts still use pycrypto that is replaced
by pycryptodomex. Add a patch to use pycryptodomex but don't use
upstream commit since it also switches from the algorithm
TEE_ALG_RSASSA_PKCS1_V1_5_SHA256 to TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256
when replacing pycrypto to pycryptodomex [4].

[1] https://github.com/OP-TEE/optee_os/commit/90ad2450436fdd9fc0d28a3f92f3fbcfd89a38f0
[2] https://pypi.org/project/pycrypto/#history
[3] https://pycryptodome.readthedocs.io/en/latest/src/vs_pycrypto.html
[4] https://github.com/OP-TEE/optee_os/commit/ababd72d2fd76cb2ded8e202b49db28d6545f6eb

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/526035730

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
boot/optee-os/0001-scripts-pem_to_pub_c.py-sign.py-use-pycryptodomex.patch [new file with mode: 0644]
boot/optee-os/optee-os.mk