src: simplify declaring `curl_ca_embed`
No binary (build failed)
—
(log yok)
| @@ -222,13 +222,6 @@ static CURLcode ssh_setopts(struct OperationConfig *config, CURL *curl) | |
| return CURLE_OK; /* ignore if SHA256 did not work */ | |
| } | |
| - | #ifdef CURL_CA_EMBED |
| - | #ifndef CURL_DECLARED_CURL_CA_EMBED |
| - | #define CURL_DECLARED_CURL_CA_EMBED |
| - | extern const unsigned char curl_ca_embed[]; |
| - | #endif |
| - | #endif |
| - | |
| static long tlsversion(unsigned char mintls, | |
| unsigned char maxtls) | |
| { | |
| @@ -39,10 +39,8 @@ print <<HEAD | |
| * NEVER EVER edit this manually, fix the mk-file-embed.pl script instead! | |
| */ | |
| /* !checksrc! disable COPYRIGHT all */ | |
| - | #ifndef CURL_DECLARED_${varname_upper} |
| - | #define CURL_DECLARED_${varname_upper} |
| - | extern const unsigned char ${varname}[]; |
| - | #endif |
| + | #include "tool_setup.h" |
| + | |
| const unsigned char ${varname}[] = { | |
| HEAD | |
| ; | |
| @@ -86,13 +86,6 @@ | |
| CURL_EXTERN CURLcode curl_easy_perform_ev(CURL *easy); | |
| #endif | |
| - | #ifdef CURL_CA_EMBED |
| - | #ifndef CURL_DECLARED_CURL_CA_EMBED |
| - | #define CURL_DECLARED_CURL_CA_EMBED |
| - | extern const unsigned char curl_ca_embed[]; |
| - | #endif |
| - | #endif |
| - | |
| #define CURL_CA_CERT_ERRORMSG \ | |
| "More details here: https://curl.se/docs/sslcerts.html\n\n" \ | |
| "curl failed to verify the legitimacy of the server and therefore " \ | |
| @@ -98,4 +98,8 @@ int tool_ftruncate64(int fd, curl_off_t where); | |
| #endif /* !HAVE_FTRUNCATE */ | |
| #endif /* _WIN32 */ | |
| + | #ifdef CURL_CA_EMBED |
| + | extern const unsigned char curl_ca_embed[]; |
| + | #endif |
| + | |
| #endif /* HEADER_CURL_TOOL_SETUP_H */ | |