| 1 | // Copyright (C) 2019 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QOCSP_P_H |
| 5 | #define QOCSP_P_H |
| 6 | |
| 7 | #include <QtNetwork/private/qtnetworkglobal_p.h> |
| 8 | |
| 9 | // |
| 10 | // W A R N I N G |
| 11 | // ------------- |
| 12 | // |
| 13 | // This file is not part of the Qt API. It exists purely as an |
| 14 | // implementation detail. This header file may change from version to |
| 15 | // version without notice, or even be removed. |
| 16 | // |
| 17 | // We mean it. |
| 18 | // |
| 19 | |
| 20 | // Note, this file is a workaround: on 64-bit Windows one of OpenSSL |
| 21 | // includes combined with openssl/ocsp.h results in macros from |
| 22 | // wincrypt.h exposed. OpenSSL's own very "unique" and "inventive" |
| 23 | // names like OCSP_RESPONSE or X509_NAME were asking to clash with |
| 24 | // other entities (presumably macros) with the same names. Normally, |
| 25 | // ossl_typ.h un-defines them, but due to a bug in OpenSSL, fails |
| 26 | // to do this on Win 64. Thus we have to do it here. We only undef |
| 27 | // 3 names, ossl_typ.h has more, but apparently we don't need them |
| 28 | // (no name clash so far). |
| 29 | |
| 30 | QT_REQUIRE_CONFIG(ocsp); |
| 31 | |
| 32 | #ifdef Q_OS_WIN |
| 33 | #undef X509_NAME |
| 34 | #undef OCSP_REQUEST |
| 35 | #undef OCSP_RESPONSE |
| 36 | #endif // Q_OS_WIN |
| 37 | |
| 38 | #include <openssl/ocsp.h> |
| 39 | |
| 40 | #endif // QOCSP_P_H |
| 41 | |