Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hooks: cryptography: rework the OpenSSL version check
Instead of trying to infer OpenSSL version by looking at `CRYPTOGRAPHY_OPENSSL_300_OR_GREATER` attribute of `cryptography.hazmat.backends.openssl.backend._lib`, use `cryptography.hazmat.backends.openssl.backend.openssl_version_number()` to obtain full OpenSSL version number. Fixes compatibility with `cryptography` 43.0.0, where the afore-mentioned attribute does not seem to be available anymore. `openssl_version_number()`, on the other hand, seems to be available in all versions going back to 2.8 (which is the first version that supports python 3.8).
- Loading branch information