scripts: support both pycryptodome and pycryptodomex

Current actual Python library for cryptography is being distributed in
two flavors: pycroptodome and pycroptodomex. They are basically the same
library, but with different import names:

 - pycryptodome provides 'Crypto' module and indented to directly replace
   old pycrypto library

 - pycryptodomex provides 'Cryptodome' module and is intended for old
   distributions, where pycrypto is still present

Most of the modern Linux distributions provide both of the libraries, so
there is no difference which one is to use. But some of them (like
Yocto/Poky) provide only one.

This patches makes scripts agnostic to a crypto library flavor being used
by trying to import Cryptodome first and then Crypto if first import fails.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
2 files changed
tree: 2f077f56c53cc2ee8665250b24bfa852e4ea912d
  1. .github/
  2. core/
  3. keys/
  4. ldelf/
  5. lib/
  6. mk/
  7. scripts/
  8. ta/
  9. .checkpatch.conf
  10. .gitattributes
  11. .gitignore
  12. .shippable.yml
  13. .travis.yml
  14. CHANGELOG.md
  15. LICENSE
  16. MAINTAINERS
  17. Makefile
  18. README.md
  19. typedefs.checkpatch
README.md

OP-TEE Trusted OS

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