--- openssl.c 2020-11-24 10:03:35 UTC +++ openssl.c @@ -6496,7 +6496,9 @@ static void php_openssl_load_cipher_mode(struct php_op 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 +/* Since OpenSSL 1.1, all AEAD ciphers use a common framework. We check for + * EVP_CIPH_OCB_MODE, because LibreSSL does not support it. */ +#ifdef EVP_CIPH_OCB_MODE case EVP_CIPH_GCM_MODE: case EVP_CIPH_OCB_MODE: case EVP_CIPH_CCM_MODE: