--- /ext/openssl/openssl.c_orig 2020-12-01 13:06:42.165146159 +0100 +++ /ext/openssl/openssl.c 2020-12-01 13:07:11.164560626 +0100 @@ -6901,7 +6901,9 @@ int cipher_mode = EVP_CIPHER_mode(cipher_type); memset(mode, 0, sizeof(struct php_openssl_cipher_mode)); switch (cipher_mode) { -#if PHP_OPENSSL_API_VERSION >= 0x10100 +#ifdef EVP_CIPH_OCB_MODE + /* Since OpenSSL 1.1, all AEAD ciphers use a common framework. We check for + * EVP_CIPH_OCB_MODE, because LibreSSL does not support it. */ case EVP_CIPH_GCM_MODE: case EVP_CIPH_OCB_MODE: case EVP_CIPH_CCM_MODE: