From 9a3791c53b5c48516af5825302a5145397cb65e5 Mon Sep 17 00:00:00 2001 From: Dean Scarff Date: Thu, 2 Jul 2020 19:42:36 +1000 Subject: Properly detect OPENSSL_IS_BORINGSSL OPENSSL_IS_BORINGSSL is not actually set by configure, so it will be undefined until a BoringSSL header is included. Hence the #ifdef logic in QPDFCrypto_openssl.h would usually never apply. This still worked because evp.h transitively included BoringSSL's cipher.h and digest.h, but the latter are the correct (documented) headers. By re-ordering the includes, we can ensure the macro is defined when we use it. Also: fix case in the header guards. --- libqpdf/qpdf/QPDFCrypto_openssl.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libqpdf/qpdf/QPDFCrypto_openssl.hh b/libqpdf/qpdf/QPDFCrypto_openssl.hh index a56e490f..58f54c3f 100644 --- a/libqpdf/qpdf/QPDFCrypto_openssl.hh +++ b/libqpdf/qpdf/QPDFCrypto_openssl.hh @@ -1,15 +1,15 @@ -#ifndef QPDFCRYPTO_openssl_HH -#define QPDFCRYPTO_openssl_HH +#ifndef QPDFCRYPTO_OPENSSL_HH +#define QPDFCRYPTO_OPENSSL_HH #include #include +#include #ifdef OPENSSL_IS_BORINGSSL #include #include #else #include #endif -#include class QPDFCrypto_openssl: public QPDFCryptoImpl { @@ -50,4 +50,4 @@ class QPDFCrypto_openssl: public QPDFCryptoImpl size_t sha2_bits; }; -#endif // QPDFCRYPTO_openssl_HH +#endif // QPDFCRYPTO_OPENSSL_HH -- cgit v1.2.3-54-g00ecf