codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
265 stars 42 forks source link

Bugfix: `AttributeError` exceptions when using `codemagic.models.certificate` #243

Closed priitlatt closed 2 years ago

priitlatt commented 2 years ago

The internals of codemagic.models.Certificate rely heavily on X.509 certificate implementation OpenSSL.crypto.X509 from pyOpenSSL module.

Lately there have been number of conflicts (and consequently bugs in this repo) due to incompatibilities between pyOpenSSL and cryptography (such as #217). It is also strongly encouraged to replace pyOpenSSL usages with cryptography where possible (see the note on PyPI description).

Considering the above, codemagic.models.Certificate was refactored to use cryptography.x509.Certificate internally instead of OpenSSL.crypto.X509.

Changes were tested with the following pyOpenSSL and cryptography version combinations:

Note that cryptography version 37.0.0 is still not supported and remains excluded from the allowed versions (also in setup.py).