diff --git a/src/aioquic/_crypto.c b/src/aioquic/_crypto.c index b03c38db3..768ff9292 100644 --- a/src/aioquic/_crypto.c +++ b/src/aioquic/_crypto.c @@ -407,10 +407,13 @@ PyInit__crypto(void) PyModule_AddObject(m, "HeaderProtection", HeaderProtectionType); // ensure required ciphers are initialised + // LibreSSL loads all cipher by default, and doesn't support add_cipher +#ifndef LIBRESSL_VERSION_NUMBER EVP_add_cipher(EVP_aes_128_ecb()); EVP_add_cipher(EVP_aes_128_gcm()); EVP_add_cipher(EVP_aes_256_ecb()); EVP_add_cipher(EVP_aes_256_gcm()); +#endif return m; } diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py index 989b16455..3a52b1dfd 100644 --- a/tests/test_asyncio.py +++ b/tests/test_asyncio.py @@ -196,6 +196,7 @@ async def test_connect_and_serve_with_ed25519_certificate(self): ) ) + @skipIf("ed448" in SKIP_TESTS, "Skipping ed448 tests") @asynctest async def test_connect_and_serve_with_ed448_certificate(self): await self._test_connect_and_serve_with_certificate( diff --git a/tests/test_tls.py b/tests/test_tls.py index 0ed911ba7..af0f9052f 100644 --- a/tests/test_tls.py +++ b/tests/test_tls.py @@ -2,7 +2,7 @@ import datetime import ssl from functools import partial -from unittest import TestCase +from unittest import TestCase, skipIf from unittest.mock import patch from aioquic import tls @@ -49,6 +49,7 @@ SERVER_CACERTFILE, SERVER_CERTFILE, SERVER_KEYFILE, + SKIP_TESTS, generate_ec_certificate, generate_ed448_certificate, generate_ed25519_certificate, @@ -583,6 +584,7 @@ def test_handshake_with_ed25519_certificate(self): *generate_ed25519_certificate(common_name="example.com") ) + @skipIf("ed448" in SKIP_TESTS, "Skipping ed448 tests") def test_handshake_with_ed448_certificate(self): self._test_handshake_with_certificate( *generate_ed448_certificate(common_name="example.com")