Check if the cryptography backend is compatible
()
| 775 | |
| 776 | |
| 777 | def isCryptographyBackendCompatible() -> bool: |
| 778 | """ |
| 779 | Check if the cryptography backend is compatible |
| 780 | """ |
| 781 | # Check for LibreSSL |
| 782 | try: |
| 783 | from cryptography.hazmat.backends import default_backend |
| 784 | if "LibreSSL" in default_backend().openssl_version_text(): |
| 785 | # BUG: LibreSSL - https://marc.info/?l=libressl&m=173846028619304&w=2 |
| 786 | # It takes 5 whole minutes to import RFC3526's modp parameters. This is |
| 787 | # not okay. |
| 788 | return False |
| 789 | return True |
| 790 | except Exception: |
| 791 | return True |
| 792 | |
| 793 | |
| 794 | def isPyPy(): |