mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:37:17 +03:00
src: simplify declaring curl_ca_embed
Also to avoid `-Wunused-macros` warnings.
Follow-up to 8a3740bc8e #14059
Cherry-picked from #20593
Closes #20601
This commit is contained in:
parent
298f73f95b
commit
a55f160b13
4 changed files with 6 additions and 18 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue