catch !ssl + ssls_export combination in source, convert error to warning in builds

To make it build-system agnostic.

-DCURL_ENABLE_SSL=OFF -DUSE_SSLS_EXPORT=ON
This commit is contained in:
Viktor Szakats 2025-07-18 20:05:31 +02:00
parent 208f5642aa
commit ad5e7e2e0e
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
5 changed files with 8 additions and 8 deletions

View file

@ -1328,7 +1328,7 @@ CURLcode curl_easy_ssls_import(CURL *d, const char *session_key,
const unsigned char *shmac, size_t shmac_len,
const unsigned char *sdata, size_t sdata_len)
{
#ifdef USE_SSLS_EXPORT
#if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
struct Curl_easy *data = d;
if(!GOOD_EASY_HANDLE(data))
return CURLE_BAD_FUNCTION_ARGUMENT;
@ -1349,7 +1349,7 @@ CURLcode curl_easy_ssls_export(CURL *d,
curl_ssls_export_cb *export_fn,
void *userptr)
{
#ifdef USE_SSLS_EXPORT
#if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
struct Curl_easy *data = d;
if(!GOOD_EASY_HANDLE(data))
return CURLE_BAD_FUNCTION_ARGUMENT;

View file

@ -24,7 +24,7 @@
#include "../curl_setup.h"
#ifdef USE_SSLS_EXPORT
#if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
#include "../urldata.h"
#include "../curl_trc.h"
@ -343,4 +343,4 @@ out:
return r;
}
#endif /* USE_SSLS_EXPORT */
#endif /* USE_SSL && USE_SSLS_EXPORT */

View file

@ -25,7 +25,7 @@
***************************************************************************/
#include "../curl_setup.h"
#ifdef USE_SSLS_EXPORT
#if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
struct dynbuf;
struct Curl_ssl_session;
@ -38,6 +38,6 @@ CURLcode Curl_ssl_session_unpack(struct Curl_easy *data,
const void *bufv, size_t buflen,
struct Curl_ssl_session **ps);
#endif /* USE_SSLS_EXPORT */
#endif /* USE_SSL && USE_SSLS_EXPORT */
#endif /* HEADER_CURL_VTLS_SPACK_H */