mirror of
https://github.com/curl/curl.git
synced 2026-04-20 19:01:14 +03:00
- schannel: apply BoringSSL workaround to AWS-LC too. Affects Schannel + AWS-LC MultiSSL builds. (not tested in CI) Ref:274940d743#2643 #2634 - curl_ntlm_core: deduplicate macro defines. - curl_ntlm_core: document version thresholds for an AWS-LC-specific workaround. It was necessary between v1.2.0 2022-09-01 and v1.30.1 2024-06-21. No longer necessary since v1.31.0 2024-07-01:ba94617d99Follow-up to34ef4fab22#10320 - lib758: drop redundant OpenSSL version guards. `OPENSSL_VERSION_NUMBER > 3` automatically guards against LibreSSL, BoringSSL and AWS-LC. Ref: https://github.com/curl/curl/pull/18288/commits/6ddd8f2c0bbfcb0847b1ee7f257fb772fa47310c Follow-up toa5f0ab7995#18288 - dllmain, curl_sha512_256: formatting. Closes #18387
86 lines
2.7 KiB
C
86 lines
2.7 KiB
C
#ifndef HEADER_CURL_SCHANNEL_H
|
|
#define HEADER_CURL_SCHANNEL_H
|
|
/***************************************************************************
|
|
* _ _ ____ _
|
|
* Project ___| | | | _ \| |
|
|
* / __| | | | |_) | |
|
|
* | (__| |_| | _ <| |___
|
|
* \___|\___/|_| \_\_____|
|
|
*
|
|
* Copyright (C) Marc Hoersken, <info@marc-hoersken.de>, et al.
|
|
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
*
|
|
* This software is licensed as described in the file COPYING, which
|
|
* you should have received as part of this distribution. The terms
|
|
* are also available at https://curl.se/docs/copyright.html.
|
|
*
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
*
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
* KIND, either express or implied.
|
|
*
|
|
* SPDX-License-Identifier: curl
|
|
*
|
|
***************************************************************************/
|
|
#include "../curl_setup.h"
|
|
|
|
#ifdef USE_SCHANNEL
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma warning(push)
|
|
#pragma warning(disable:4201)
|
|
#endif
|
|
#include <subauth.h>
|
|
#ifdef _MSC_VER
|
|
#pragma warning(pop)
|
|
#endif
|
|
/* Wincrypt must be included before anything that could include OpenSSL. */
|
|
#ifdef USE_WIN32_CRYPTO
|
|
#include <wincrypt.h>
|
|
/* Undefine wincrypt conflicting symbols for BoringSSL. */
|
|
#undef X509_NAME
|
|
#undef X509_EXTENSIONS
|
|
#undef PKCS7_ISSUER_AND_SERIAL
|
|
#undef PKCS7_SIGNER_INFO
|
|
#undef OCSP_REQUEST
|
|
#undef OCSP_RESPONSE
|
|
#endif
|
|
|
|
#include <schnlsp.h>
|
|
#include <schannel.h>
|
|
#include "../curl_sspi.h"
|
|
|
|
#include "../cfilters.h"
|
|
#include "../urldata.h"
|
|
|
|
/* <wincrypt.h> has been included via the above <schnlsp.h>.
|
|
* Or in case of ldap.c, it was included via <winldap.h>.
|
|
* And since <wincrypt.h> has this:
|
|
* #define X509_NAME ((LPCSTR) 7)
|
|
*
|
|
* And in BoringSSL's <openssl/base.h> there is:
|
|
* typedef struct X509_name_st X509_NAME;
|
|
* etc.
|
|
*
|
|
* this will cause all kinds of C-preprocessing paste errors in
|
|
* BoringSSL's <openssl/x509.h>: So just undefine those defines here
|
|
* (and only here).
|
|
*/
|
|
#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC)
|
|
# undef X509_NAME
|
|
# undef X509_CERT_PAIR
|
|
# undef X509_EXTENSIONS
|
|
#endif
|
|
|
|
extern const struct Curl_ssl Curl_ssl_schannel;
|
|
|
|
CURLcode Curl_verify_host(struct Curl_cfilter *cf,
|
|
struct Curl_easy *data);
|
|
|
|
CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
|
|
struct Curl_easy *data);
|
|
|
|
#endif /* USE_SCHANNEL */
|
|
#endif /* HEADER_CURL_SCHANNEL_H */
|