* might have been changed and this 'new' address will actually be used
* here to connect.
*/
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
*sockfd = data->set.fopensocket(data->set.opensocket_client,
CURLSOCKTYPE_IPCXN,
(struct curl_sockaddr *)addr);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
else {
/* opensocket callback not set, so simply create the socket now */
if(use_callback && conn && conn->fclosesocket) {
int rc;
Curl_multi_closed(data, sock);
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
rc = conn->fclosesocket(conn->closesocket_client, sock);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
return rc;
}
if(data->set.fsockopt) {
/* activate callback for setting socket options */
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
error = data->set.fsockopt(data->set.sockopt_client,
ctx->sock,
CURLSOCKTYPE_IPCXN);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
isconnected = TRUE;
struct Curl_easy *data)
{
CURLcode result;
- int pending = FALSE;
+ int pending = 0;
result = cf ? cf->cft->query(cf, data, CF_QUERY_NEED_FLUSH,
&pending, NULL) : CURLE_UNKNOWN_OPTION;
- return (result || pending == FALSE) ? FALSE : TRUE;
+ return (result || !pending) ? FALSE : TRUE;
}
bool Curl_conn_needs_flush(struct Curl_easy *data, int sockindex)
cpool->idata = curl_easy_init();
if(!cpool->idata)
return 1; /* bad */
- cpool->idata->state.internal = true;
+ cpool->idata->state.internal = TRUE;
/* TODO: this is quirky. We need an internal handle for certain
* operations, but we do not add it to the multi (if there is one).
* But we give it the multi so that socket event operations can work.
cpool->idata->multi = multi;
#ifdef DEBUGBUILD
if(getenv("CURL_DEBUG"))
- cpool->idata->set.verbose = true;
+ cpool->idata->set.verbose = TRUE;
#endif
cpool->disconnect_cb = disconnect_cb;
}
}
-/* returns 1 (true) if pattern is OK, 0 if is bad ("p" is pattern pointer) */
+/* returns 1 (TRUE) if pattern is OK, 0 if is bad ("p" is pattern pointer) */
static int setcharset(unsigned char **p, unsigned char *charset)
{
setcharset_state state = CURLFNM_SCHS_DEFAULT;
case '[':
pp = p + 1; /* Copy in case of syntax error in set. */
if(setcharset(&pp, charset)) {
- int found = FALSE;
+ bool found = FALSE;
if(!*s)
return CURL_FNMATCH_NOMATCH;
if(charset[(unsigned int)*s])
return CURLE_FAILED_INIT;
/* Clients must send a periodic BytesReceived report to the server */
- r->m_bSendCounter = true;
+ r->m_bSendCounter = TRUE;
*done = TRUE;
conn->recv[FIRSTSOCKET] = rtmp_recv;
"* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
if(data->set.fdebug) {
bool inCallback = Curl_is_in_callback(data);
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
(void)(*data->set.fdebug)(data, type, ptr, size, data->set.debugdata);
Curl_set_in_callback(data, inCallback);
}
{
unsigned char hexstr[LOCAL_PB_HEXMAX];
size_t hlen = LOCAL_PB_HEXMAX;
- bool truncated = false;
+ bool truncated = FALSE;
if(len > (LOCAL_PB_HEXMAX / 2))
- truncated = true;
+ truncated = TRUE;
Curl_hexencode(buf, len, hexstr, hlen);
if(!truncated)
infof(data, "%s: len=%d, val=%s", prefix, (int)len, hexstr);
/* pass in the struct pointer via a local variable to please coverity and
the gcc typecheck helpers */
- doh->state.internal = true;
+ doh->state.internal = TRUE;
#ifndef CURL_DISABLE_VERBOSE_STRINGS
doh->state.feat = &Curl_doh_trc;
#endif
int error = 0;
/* activate callback for setting socket options */
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
error = data->set.fsockopt(data->set.sockopt_client,
s,
CURLSOCKTYPE_ACCEPT);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(error) {
close_secondarysocket(data);
/* Let's read off the proper amount of bytes from the input. */
if(data->set.seek_func) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
seekerr = data->set.seek_func(data->set.seek_client,
data->state.resume_from, SEEK_SET);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
if(seekerr != CURL_SEEKFUNC_OK) {
if(data->state.wildcardmatch) {
if(data->set.chunk_end && ftpc->file) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
data->set.chunk_end(data->set.wildcardptr);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
ftpc->known_filesize = -1;
}
infof(data, "Wildcard - START of \"%s\"", finfo->filename);
if(data->set.chunk_bgn) {
long userresponse;
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
userresponse = data->set.chunk_bgn(
finfo, data->set.wildcardptr,
(int)Curl_llist_count(&wildcard->filelist));
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
switch(userresponse) {
case CURL_CHUNK_BGN_FUNC_SKIP:
infof(data, "Wildcard - \"%s\" skipped by user",
case CURLWC_SKIP: {
if(data->set.chunk_end) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
data->set.chunk_end(data->set.wildcardptr);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
Curl_node_remove(Curl_llist_head(&wildcard->filelist));
wildcard->state = (Curl_llist_count(&wildcard->filelist) == 0) ?
compare = Curl_fnmatch;
/* filter pattern-corresponding filenames */
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
if(compare(data->set.fnmatch_data, wc->pattern,
finfo->filename) == 0) {
/* discard symlink which is containing multiple " -> " */
else {
add = FALSE;
}
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(add) {
Curl_llist_append(llist, finfo, &infop->list);
pro->t_starttransfer = 0;
pro->timespent = 0;
pro->t_redirect = 0;
- pro->is_t_startransfer_set = false;
+ pro->is_t_startransfer_set = FALSE;
info->httpcode = 0;
info->httpproxycode = 0;
/* See if the returned entry matches the required resolve mode */
if(dns && data->conn->ip_version != CURL_IPRESOLVE_WHATEVER) {
int pf = PF_INET;
- bool found = false;
+ bool found = FALSE;
struct Curl_addrinfo *addr = dns->addr;
#ifdef PF_INET6
while(addr) {
if(addr->ai_family == pf) {
- found = true;
+ found = TRUE;
break;
}
addr = addr->ai_next;
/* notify the resolver start callback */
if(data->set.resolver_start) {
int st;
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
st = data->set.resolver_start(
#ifdef USE_CURL_ASYNC
data->state.async.resolver,
#endif
NULL,
data->set.resolver_start_client);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(st)
return CURLRESOLV_ERROR;
}
char *host_end;
/* Default is no wildcard found */
- data->state.wildcard_resolve = false;
+ data->state.wildcard_resolve = FALSE;
for(hostp = data->state.resolve; hostp; hostp = hostp->next) {
char entry_id[MAX_HOSTCACHE_LEN];
char *end_ptr;
bool permanent = TRUE;
unsigned long tmp_port;
- bool error = true;
+ bool error = TRUE;
char *host_begin = hostp->data;
size_t hlen = 0;
if(!head)
goto err;
- error = false;
+ error = FALSE;
err:
if(error) {
failf(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'",
/* Wildcard hostname */
if((hlen == 1) && (host_begin[0] == '*')) {
infof(data, "RESOLVE *:%d using wildcard", port);
- data->state.wildcard_resolve = true;
+ data->state.wildcard_resolve = TRUE;
}
}
}
}
DEBUGASSERT(stream);
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
rv = data->multi->push_cb(data, newhandle,
stream->push_headers_used, &heads,
data->multi->push_userp);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
/* free the headers again */
free_push_headers(stream);
struct curl_slist *tmp_head = NULL;
CURLcode ret = CURLE_OUT_OF_MEMORY;
struct curl_slist *l;
- int again = 1;
+ bool again = TRUE;
/* provider1 mid */
Curl_strntolower(provider1, provider1, strlen(provider1));
/* alpha-sort by header name in a case sensitive manner */
do {
- again = 0;
+ again = FALSE;
for(l = head; l; l = l->next) {
struct curl_slist *next = l->next;
l->data = next->data;
next->data = tmp;
- again = 1;
+ again = TRUE;
}
}
} while(again);
/* allowed as-is */
if(*q == '=') {
result = Curl_dyn_addn(dq, q, 1);
- *found_equals = true;
+ *found_equals = TRUE;
break;
}
}
ap = &array[0];
for(i = 0; !result && (i < entry); i++, ap++) {
const char *q = ap->p;
- bool found_equals = false;
+ bool found_equals = FALSE;
if(!ap->len)
continue;
result = canon_string(q, ap->len, dq, &found_equals);
char provider1[MAX_SIGV4_LEN + 1]="";
char region[MAX_SIGV4_LEN + 1]="";
char service[MAX_SIGV4_LEN + 1]="";
- bool sign_as_s3 = false;
+ bool sign_as_s3 = FALSE;
const char *hostname = conn->host.name;
time_t clock;
struct tm tm;
if(result)
goto out;
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
rc = data->set.trailer_callback(&trailers, data->set.trailer_data);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(rc != CURL_TRAILERFUNC_OK) {
failf(data, "operation aborted by trailing headers callback");
}
/* Make sure the username and password are in the correct atom format */
- user = imap_atom(conn->user, false);
- passwd = imap_atom(conn->passwd, false);
+ user = imap_atom(conn->user, FALSE);
+ passwd = imap_atom(conn->passwd, FALSE);
/* Send the LOGIN command */
result = imap_sendf(data, "LOGIN %s %s", user ? user : "",
imap->custom_params ? imap->custom_params : "");
else {
/* Make sure the mailbox is in the correct atom format if necessary */
- char *mailbox = imap->mailbox ? imap_atom(imap->mailbox, true)
+ char *mailbox = imap->mailbox ? imap_atom(imap->mailbox, TRUE)
: strdup("");
if(!mailbox)
return CURLE_OUT_OF_MEMORY;
}
/* Make sure the mailbox is in the correct atom format */
- mailbox = imap_atom(imap->mailbox, false);
+ mailbox = imap_atom(imap->mailbox, FALSE);
if(!mailbox)
return CURLE_OUT_OF_MEMORY;
}
/* Make sure the mailbox is in the correct atom format */
- mailbox = imap_atom(imap->mailbox, false);
+ mailbox = imap_atom(imap->mailbox, FALSE);
if(!mailbox)
return CURLE_OUT_OF_MEMORY;
/* Performing the alnum check with this macro is faster because of ASCII
arithmetic */
if(ISALNUM(ch))
- return true;
+ return TRUE;
switch(ch) {
/* bchar */
case '+': case ',':
/* bchar -> achar -> uchar -> pct-encoded */
case '%': /* HEXDIG chars are already included above */
- return true;
+ return TRUE;
default:
- return false;
+ return FALSE;
}
}
CURLcode result = CURLE_OK;
struct imap_conn *imapc = &conn->proto.imapc;
const char *ptr = conn->options;
- bool prefer_login = false;
+ bool prefer_login = FALSE;
while(!result && ptr && *ptr) {
const char *key = ptr;
if(strncasecompare(key, "AUTH=+LOGIN", 11)) {
/* User prefers plaintext LOGIN over any SASL, including SASL LOGIN */
- prefer_login = true;
+ prefer_login = TRUE;
imapc->sasl.prefmech = SASL_AUTH_NONE;
}
else if(strncasecompare(key, "AUTH=", 5)) {
- prefer_login = false;
+ prefer_login = FALSE;
result = Curl_sasl_parse_url_auth_option(&imapc->sasl,
value, ptr - value);
}
else {
- prefer_login = false;
+ prefer_login = FALSE;
result = CURLE_URL_MALFORMAT;
}
char work[BUFFSIZE];
/* 'workend' points to the final buffer byte position, but with an extra
- byte as margin to avoid the (false?) warning Coverity gives us
+ byte as margin to avoid the (FALSE?) warning Coverity gives us
otherwise */
char *workend = &work[sizeof(work) - 2];
infof(data, "!!! WARNING !!!");
infof(data, "This is a debug build of libcurl, "
"do not use in production.");
- multi->warned = true;
+ multi->warned = TRUE;
}
}
#else
int prereq_rc;
/* call the prerequest callback function */
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
prereq_rc = data->set.fprereq(data->set.prereq_userp,
data->info.primary.remote_ip,
data->info.primary.local_ip,
data->info.primary.remote_port,
data->info.primary.local_port);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(prereq_rc != CURL_PREREQFUNC_OK) {
failf(data, "operation aborted by pre-request callback");
/* failure in pre-request callback - do not do any other
if(data->mstate >= MSTATE_CONNECT &&
data->mstate < MSTATE_DO &&
rc != CURLM_CALL_MULTI_PERFORM &&
- !multi_ischanged(multi, false)) {
+ !multi_ischanged(multi, FALSE)) {
/* We now handle stream timeouts if and only if this will be the last
* loop iteration. We only check this on the last iteration to ensure
* that if we know we have additional work to do immediately
char state_login = 0; /* Found a login keyword */
char state_password = 0; /* Found a password keyword */
- int state_our_login = TRUE; /* With specific_login, found *our* login
- name (or login-less line) */
+ bool state_our_login = TRUE; /* With specific_login, found *our* login
+ name (or login-less line) */
DEBUGASSERT(netrcfile);
{
struct connectdata *conn = data->conn;
struct ldapconninfo *li = conn->proto.ldapc;
- bool ssldone = 0;
- CURLcode result =
- Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
+ bool ssldone = FALSE;
+ CURLcode result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
if(!result) {
oldap_state(data, newstate);
BerElement *ber = NULL;
struct timeval tv = {0, 0};
struct berval bv, *bvals;
- int binary = 0;
+ bool binary = FALSE;
CURLcode result = CURLE_AGAIN;
int code;
char *info = NULL;
}
binary = bv.bv_len > 7 &&
- !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7);
+ !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7);
for(i = 0; bvals[i].bv_val != NULL; i++) {
- int binval = 0;
+ bool binval = FALSE;
result = client_write(data, STRCONST("\t"), bv.bv_val, bv.bv_len,
STRCONST(":"));
/* check for leading or trailing whitespace */
if(ISBLANK(bvals[i].bv_val[0]) ||
ISBLANK(bvals[i].bv_val[bvals[i].bv_len - 1]))
- binval = 1;
+ binval = TRUE;
else {
/* check for unprintable characters */
unsigned int j;
for(j = 0; j < bvals[i].bv_len; j++)
if(!ISPRINT(bvals[i].bv_val[j])) {
- binval = 1;
+ binval = TRUE;
break;
}
}
case TIMER_STARTSINGLE:
/* This is set at the start of each single transfer */
data->progress.t_startsingle = timestamp;
- data->progress.is_t_startransfer_set = false;
+ data->progress.is_t_startransfer_set = FALSE;
break;
case TIMER_POSTQUEUE:
/* Set when the transfer starts (after potentially having been brought
return;
}
else {
- data->progress.is_t_startransfer_set = true;
+ data->progress.is_t_startransfer_set = TRUE;
break;
}
case TIMER_POSTRANSFER:
{
data->progress.speeder_c = 0; /* reset the progress meter display */
data->progress.start = Curl_now();
- data->progress.is_t_startransfer_set = false;
+ data->progress.is_t_startransfer_set = FALSE;
data->progress.ul.limit.start = data->progress.start;
data->progress.dl.limit.start = data->progress.start;
data->progress.ul.limit.start_size = 0;
if(data->set.fxferinfo) {
int result;
/* There is a callback set, call that */
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
result = data->set.fxferinfo(data->set.progress_client,
data->progress.dl.total_size,
data->progress.dl.cur_size,
data->progress.ul.total_size,
data->progress.ul.cur_size);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(result != CURL_PROGRESSFUNC_CONTINUE) {
if(result)
failf(data, "Callback aborted");
else if(data->set.fprogress) {
int result;
/* The older deprecated callback is set, call that */
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
result = data->set.fprogress(data->set.progress_client,
(double)data->progress.dl.total_size,
(double)data->progress.dl.cur_size,
(double)data->progress.ul.total_size,
(double)data->progress.ul.cur_size);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(result != CURL_PROGRESSFUNC_CONTINUE) {
if(result)
failf(data, "Callback aborted");
user_ptr = data->set.out;
}
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
wrote = writeit((char *)ptr, 1, len, user_ptr);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(CURL_WRITEFUNC_PAUSE == wrote) {
failf(data, "Cannot pause RTP");
}
nread = 0;
if(ctx->read_cb && blen) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
nread = ctx->read_cb(buf, 1, blen, ctx->cb_user_data);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
ctx->has_used_cb = TRUE;
}
return CURLE_READ_ERROR;
if(data->set.seek_func) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
seekerr = data->set.seek_func(data->set.seek_client, offset, SEEK_SET);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
if(seekerr != CURL_SEEKFUNC_OK) {
curlx_sotouz(offset - passed);
size_t actuallyread;
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
actuallyread = ctx->read_cb(scratch, 1, readthisamountnow,
ctx->cb_user_data);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
passed += actuallyread;
if((actuallyread == 0) || (actuallyread > readthisamountnow)) {
if(data->set.seek_func) {
int err;
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
err = (data->set.seek_func)(data->set.seek_client, 0, SEEK_SET);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
CURL_TRC_READ(data, "cr_in, rewind via set.seek_func -> %d", err);
if(err) {
failf(data, "seek callback returned error %d", (int)err);
else if(data->set.ioctl_func) {
curlioerr err;
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
err = (data->set.ioctl_func)(data, CURLIOCMD_RESTARTREAD,
data->set.ioctl_client);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
CURL_TRC_READ(data, "cr_in, rewind via set.ioctl_func -> %d", (int)err);
if(err) {
failf(data, "ioctl callback returned error %d", (int)err);
ctx->prev_cr = (buf[i] == '\r');
continue;
}
- ctx->prev_cr = false;
+ ctx->prev_cr = FALSE;
/* on a soft limit bufq, we do not need to check length */
result = Curl_bufq_cwrite(&ctx->buf, buf + start, i - start, &n);
if(!result)
}
smbc->uid = smb_swap16(h->uid);
conn_state(data, SMB_CONNECTED);
- *done = true;
+ *done = TRUE;
break;
default:
case SMB_DONE:
result = req->result;
- *done = true;
+ *done = TRUE;
break;
default:
{
CURLcode result = CURLE_OK;
const char *ptr = conn_to_host;
- int host_match = FALSE;
- int port_match = FALSE;
+ bool host_match = FALSE;
+ bool port_match = FALSE;
*host_result = NULL;
*port_result = -1;
/* We had an input token before so if there is another one now that means we
provided bad credentials in the previous request or it is stale. */
if(digest->input_token) {
- bool stale = false;
+ bool stale = FALSE;
const char *p = chlg;
/* Check for the 'stale' directive */
if(strcasecompare(value, "stale") &&
strcasecompare(content, "true")) {
- stale = true;
+ stale = TRUE;
break;
}
return FALSE;
}
- return true;
+ return TRUE;
}
CURLcode Curl_auth_gsasl_start(struct Curl_easy *data,
typedef LONG (APIENTRY *RTLVERIFYVERSIONINFO_FN)
(struct OUR_OSVERSIONINFOEXW *, ULONG, ULONGLONG);
static RTLVERIFYVERSIONINFO_FN pRtlVerifyVersionInfo;
- static bool onetime = true; /* safe because first call is during init */
+ static bool onetime = TRUE; /* safe because first call is during init */
if(onetime) {
pRtlVerifyVersionInfo = CURLX_FUNCTION_CAST(RTLVERIFYVERSIONINFO_FN,
(GetProcAddress(GetModuleHandleA("ntdll"), "RtlVerifyVersionInfo")));
- onetime = false;
+ onetime = FALSE;
}
switch(condition) {
(void)Connection;
CURL_TRC_CF(data, cf, "[MSH3] connected");
- ctx->handshake_succeeded = true;
- ctx->connected = true;
- ctx->handshake_complete = true;
+ ctx->handshake_succeeded = TRUE;
+ ctx->connected = TRUE;
+ ctx->handshake_complete = TRUE;
}
static void MSH3_CALL msh3_conn_shutdown_complete(MSH3_CONNECTION *Connection,
(void)Connection;
CURL_TRC_CF(data, cf, "[MSH3] shutdown complete");
- ctx->connected = false;
- ctx->handshake_complete = true;
+ ctx->connected = FALSE;
+ ctx->handshake_complete = TRUE;
}
static void MSH3_CALL msh3_conn_new_request(MSH3_CONNECTION *Connection,
stream->recv_error = result;
goto out;
}
- stream->recv_header_complete = true;
+ stream->recv_header_complete = TRUE;
}
result = write_resp_raw(data, buf, *buflen);
return;
msh3_lock_acquire(&stream->recv_lock);
stream->closed = TRUE;
- stream->recv_header_complete = true;
+ stream->recv_header_complete = TRUE;
if(error)
stream->error3 = error;
if(aborted)
CURLcode result = CURLE_OK;
ssize_t nread;
struct h3_quic_recv_ctx x;
- int rv, eagain = FALSE;
+ bool eagain = FALSE;
size_t total_recv_len = 0;
DEBUGASSERT(s);
/* When we forwarded everything, handle RESET/EOS */
if(Curl_bufq_is_empty(&s->recvbuf) && !s->closed) {
+ int rv;
result = CURLE_OK;
if(s->reset) {
uint64_t app_error;
CURLcode result = CURLE_OK;
struct timeval tv;
timediff_t timeoutms;
- int is_infinite = TRUE;
+ int is_infinite = 1;
if(ctx->tls.ossl.ssl &&
- SSL_get_event_timeout(ctx->tls.ossl.ssl, &tv, &is_infinite) &&
- !is_infinite) {
+ SSL_get_event_timeout(ctx->tls.ossl.ssl, &tv, &is_infinite) &&
+ !is_infinite) {
timeoutms = curlx_tvtoms(&tv);
/* QUIC want to be called again latest at the returned timeout */
if(timeoutms <= 0) {
failf(data, "cannot create quiche config");
return CURLE_FAILED_INIT;
}
- quiche_config_enable_pacing(ctx->cfg, false);
+ quiche_config_enable_pacing(ctx->cfg, FALSE);
quiche_config_set_max_idle_timeout(ctx->cfg, CURL_QUIC_MAX_IDLE_MS);
quiche_config_set_initial_max_data(ctx->cfg, (1 * 1024 * 1024)
/* (QUIC_MAX_STREAMS/2) * H3_STREAM_WINDOW_SIZE */);
ctx->q.local_addrlen,
&sockaddr->curl_sa_addr,
sockaddr->addrlen,
- ctx->cfg, ctx->tls.ossl.ssl, false);
+ ctx->cfg, ctx->tls.ossl.ssl, FALSE);
if(!ctx->qconn) {
failf(data, "cannot create quiche connection");
return CURLE_OUT_OF_MEMORY;
/* give application a chance to interfere with SSL set up. */
if(data->set.ssl.fsslctx) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
result = (*data->set.ssl.fsslctx)(data, ctx->wssl.ctx,
data->set.ssl.fsslctxp);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(result) {
failf(data, "error signaled by ssl ctx callback");
goto out;
goto cleanup;
}
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
rc = func(data, knownkeyp, /* from the knownhosts file */
&foundkey, /* from the remote host */
keymatch, data->set.ssh_keyfunc_userp);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
switch(rc) {
case CURLKHSTAT_FINE_ADD_TO_FILE:
if(data->state.resume_from > 0) {
/* Let's read off the proper amount of bytes from the input. */
if(data->set.seek_func) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
seekerr = data->set.seek_func(data->set.seek_client,
data->state.resume_from, SEEK_SET);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
if(seekerr != CURL_SEEKFUNC_OK) {
static CURLcode myssh_do_it(struct Curl_easy *data, bool *done)
{
CURLcode result;
- bool connected = 0;
+ bool connected = FALSE;
struct connectdata *conn = data->conn;
struct ssh_conn *sshc = &conn->proto.sshc;
keymatch = (enum curl_khmatch)keycheck;
/* Ask the callback how to behave */
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
rc = func(data, knownkeyp, /* from the knownhosts file */
&foundkey, /* from the remote host */
keymatch, data->set.ssh_keyfunc_userp);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
}
else
&keylen, &sshkeytype);
if(remotekey) {
enum curl_khtype keytype = convert_ssh2_keytype(sshkeytype);
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
rc = data->set.ssh_hostkeyfunc(data->set.ssh_hostkeyfunc_userp,
(int)keytype, remotekey, keylen);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(rc!= CURLKHMATCH_OK) {
state(data, SSH_SESSION_FREE);
sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
const char *kh_name_end = NULL;
size_t kh_name_size = 0;
int port = 0;
- bool found = false;
+ bool found = FALSE;
if(sshc->kh && !data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]) {
/* lets try to find our host in the known hosts file */
kh_name_size = strlen(store->name) - 1 - strlen(kh_name_end);
if(strncmp(store->name + 1,
conn->host.name, kh_name_size) == 0) {
- found = true;
+ found = TRUE;
break;
}
}
}
else if(strcmp(store->name, conn->host.name) == 0) {
- found = true;
+ found = TRUE;
break;
}
}
else {
- found = true;
+ found = TRUE;
break;
}
}
if(data->state.resume_from > 0) {
/* Let's read off the proper amount of bytes from the input. */
if(data->set.seek_func) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
seekerr = data->set.seek_func(data->set.seek_client,
data->state.resume_from, SEEK_SET);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
if(seekerr != CURL_SEEKFUNC_OK) {
sizeof(scratch) : curlx_sotouz(data->state.resume_from - passed);
size_t actuallyread;
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
actuallyread = data->state.fread_func(scratch, 1,
readthisamountnow,
data->state.in);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
passed += actuallyread;
if((actuallyread == 0) || (actuallyread > readthisamountnow)) {
static CURLcode ssh_do(struct Curl_easy *data, bool *done)
{
CURLcode result;
- bool connected = 0;
+ bool connected = FALSE;
struct connectdata *conn = data->conn;
struct ssh_conn *sshc = &conn->proto.sshc;
/* Let's read off the proper amount of bytes from the input. */
int seekerr = CURL_SEEKFUNC_OK;
if(data->set.seek_func) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
seekerr = data->set.seek_func(data->set.seek_client,
data->state.resume_from, SEEK_SET);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
}
if(seekerr != CURL_SEEKFUNC_OK) {
sizeof(scratch) : curlx_sotouz(data->state.resume_from - passed);
size_t actuallyread;
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
actuallyread = data->state.fread_func(scratch, 1,
readthisamountnow,
data->state.in);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
passed += actuallyread;
if((actuallyread == 0) || (actuallyread > readthisamountnow)) {
static CURLcode wssh_do(struct Curl_easy *data, bool *done)
{
CURLcode result;
- bool connected = 0;
+ bool connected = FALSE;
struct connectdata *conn = data->conn;
struct ssh_conn *sshc = &conn->proto.sshc;
/* give application a chance to interfere with SSL set up. */
if(data->set.ssl.fsslctx) {
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
ret = (*data->set.ssl.fsslctx)(data, &backend->ctx,
data->set.ssl.fsslctxp);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(ret) {
failf(data, "BearSSL: error signaled by ssl ctx callback");
return ret;
}
br_ssl_engine_get_session_parameters(&backend->ctx.eng, &session);
Curl_cipher_suite_get_str(session.cipher_suite, cipher_str,
- sizeof(cipher_str), true);
+ sizeof(cipher_str), TRUE);
infof(data, "BearSSL: %s connection using %s", ver_str, cipher_str);
}
return ret;
case ':':
case ',':
case ';':
- return true;
+ return TRUE;
default:;
}
- return false;
+ return FALSE;
}
uint16_t Curl_cipher_suite_walk_str(const char **str, const char **end)
int rc;
if(config->verifypeer) {
- bool imported_native_ca = false;
+ bool imported_native_ca = FALSE;
if(ssl_config->native_ca_store) {
rc = gnutls_certificate_set_x509_system_trust(creds);
else {
infof(data, "found %d certificates in native ca store", rc);
if(rc > 0)
- imported_native_ca = true;
+ imported_native_ca = TRUE;
}
}
timediff_t timeout_ms = cfg->ca_cache_timeout * (timediff_t)1000;
if(timeout_ms < 0)
- return false;
+ return FALSE;
return elapsed_ms >= timeout_ms;
}
char buf[256];
if(!keylog_file_fp || !line) {
- return false;
+ return FALSE;
}
linelen = strlen(line);
if(linelen == 0 || linelen > sizeof(buf) - 2) {
/* Empty line or too big to fit in a LF and NUL. */
- return false;
+ return FALSE;
}
memcpy(buf, line, linelen);
/* Using fputs here instead of fprintf since libcurl's fprintf replacement
may not be thread-safe. */
fputs(buf, keylog_file_fp);
- return true;
+ return TRUE;
}
bool
2 * SECRET_MAXLEN + 1 + 1];
if(!keylog_file_fp) {
- return false;
+ return FALSE;
}
pos = strlen(label);
if(pos > KEYLOG_LABEL_MAXLEN || !secretlen || secretlen > SECRET_MAXLEN) {
/* Should never happen - sanity check anyway. */
- return false;
+ return FALSE;
}
memcpy(line, label, pos);
/* Using fputs here instead of fprintf since libcurl's fprintf replacement
may not be thread-safe. */
fputs(line, keylog_file_fp);
- return true;
+ return TRUE;
}
#endif /* TLS or QUIC backend */
uint16_t cipher_id;
cipher_id = (uint16_t)
mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl);
- mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true);
+ mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), TRUE);
infof(data, "mbedTLS: %s Handshake complete, cipher is %s",
mbedtls_ssl_get_version(&backend->ssl), cipher_str);
}
if(master_key_length <= 0)
return;
- *keylog_done = true;
+ *keylog_done = TRUE;
Curl_tls_keylog_write("CLIENT_RANDOM", client_random,
master_key, master_key_length);
}
CURLcode result = CURLE_OK;
HCERTSTORE hStore;
- *imported = false;
+ *imported = FALSE;
hStore = CertOpenSystemStoreA(0, name);
if(hStore) {
}
else {
DWORD i;
- bool found = false;
+ bool found = FALSE;
for(i = 0; i < enhkey_usage->cUsageIdentifier; ++i) {
if(!strcmp("1.3.6.1.5.5.7.3.1" /* OID server auth */,
enhkey_usage->rgpszUsageIdentifier[i])) {
- found = true;
+ found = TRUE;
break;
}
}
#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
infof(data, "SSL: Imported cert");
#endif
- *imported = true;
+ *imported = TRUE;
}
X509_free(x509);
}
const char * const ssl_capath = conn_config->CApath;
const char * const ssl_crlfile = ssl_config->primary.CRLfile;
const bool verifypeer = conn_config->verifypeer;
- bool imported_native_ca = false;
- bool imported_ca_info_blob = false;
+ bool imported_native_ca = FALSE;
+ bool imported_ca_info_blob = FALSE;
CURL_TRC_CF(data, cf, "populate_x509_store, path=%s, blob=%d",
ssl_cafile ? ssl_cafile : "none", !!ca_info_blob);
};
size_t i;
for(i = 0; i < ARRAYSIZE(storeNames); ++i) {
- bool imported = false;
+ bool imported = FALSE;
result = import_windows_cert_store(data, storeNames[i], store,
&imported);
if(result)
return result;
if(imported) {
infof(data, "successfully imported Windows %s store", storeNames[i]);
- imported_native_ca = true;
+ imported_native_ca = TRUE;
}
else
infof(data, "error importing Windows %s store, continuing anyway",
return result;
}
else {
- imported_ca_info_blob = true;
+ imported_ca_info_blob = TRUE;
infof(data, "successfully imported CA certificate blob");
}
}
return result;
octx->x509_store_setup = TRUE;
}
- Curl_set_in_callback(data, true);
+ Curl_set_in_callback(data, TRUE);
result = (*data->set.ssl.fsslctx)(data, octx->ssl_ctx,
data->set.ssl.fsslctxp);
- Curl_set_in_callback(data, false);
+ Curl_set_in_callback(data, FALSE);
if(result) {
failf(data, "error signaled by ssl ctx callback");
return result;
ver = "TLSv1.3";
if(proto == RUSTLS_TLS_VERSION_TLSV1_2)
ver = "TLSv1.2";
- Curl_cipher_suite_get_str(cipher, buf, sizeof(buf), true);
+ Curl_cipher_suite_get_str(cipher, buf, sizeof(buf), TRUE);
infof(data, "rustls: handshake complete, %s, cipher: %s",
ver, buf);
}
/* We should never fall through the loop. We should return either because
the handshake is done or because we cannot read/write without blocking. */
- DEBUGASSERT(false);
+ DEBUGASSERT(FALSE);
}
static CURLcode
curlx_verify_windows_version(6, 3, 0, PLATFORM_WINNT,
VERSION_GREATER_THAN_EQUAL);
#else
- backend->use_alpn = false;
+ backend->use_alpn = FALSE;
#endif
#ifdef _WIN32_WCE
#ifdef HAS_MANUAL_VERIFY_API
/* certificate validation on CE does not seem to work right; we will
* do it following a more manual process. */
- backend->use_manual_cred_validation = true;
+ backend->use_manual_cred_validation = TRUE;
#else
#error "compiler too old to support Windows CE requisite manual cert verify"
#endif
if(conn_config->CAfile || conn_config->ca_info_blob) {
if(curlx_verify_windows_version(6, 1, 0, PLATFORM_WINNT,
VERSION_GREATER_THAN_EQUAL)) {
- backend->use_manual_cred_validation = true;
+ backend->use_manual_cred_validation = TRUE;
}
else {
failf(data, "schannel: this version of Windows is too old to support "
}
}
else
- backend->use_manual_cred_validation = false;
+ backend->use_manual_cred_validation = FALSE;
#else
if(conn_config->CAfile || conn_config->ca_info_blob) {
failf(data, "schannel: CA cert support not built in");
"sent %zd bytes", written));
backend->recv_unrecoverable_err = CURLE_OK;
- backend->recv_sspi_close_notify = false;
- backend->recv_connection_closed = false;
- backend->recv_renegotiating = false;
- backend->encdata_is_incomplete = false;
+ backend->recv_sspi_close_notify = FALSE;
+ backend->recv_connection_closed = FALSE;
+ backend->recv_renegotiating = FALSE;
+ backend->encdata_is_incomplete = FALSE;
/* continue to second handshake step */
connssl->connecting_state = ssl_connect_2;
/* buffer to store previously received and encrypted data */
if(!backend->encdata_buffer) {
- backend->encdata_is_incomplete = false;
+ backend->encdata_is_incomplete = FALSE;
backend->encdata_offset = 0;
backend->encdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE;
backend->encdata_buffer = malloc(backend->encdata_length);
/* increase encrypted data buffer offset */
backend->encdata_offset += nread;
- backend->encdata_is_incomplete = false;
+ backend->encdata_is_incomplete = FALSE;
DEBUGF(infof(data, "schannel: encrypted data got %zd", nread));
}
/* check if the handshake was incomplete */
if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) {
- backend->encdata_is_incomplete = true;
+ backend->encdata_is_incomplete = TRUE;
connssl->io_need = CURL_SSL_IO_NEED_RECV;
DEBUGF(infof(data,
"schannel: received incomplete message, need more data"));
void *arg)
{
const CERT_CONTEXT *current_context = NULL;
- bool should_continue = true;
- bool first = true;
- bool reverse_order = false;
+ bool should_continue = TRUE;
+ bool first = TRUE;
+ bool reverse_order = FALSE;
while(should_continue &&
(current_context = CertEnumCertificatesInStore(
context->hCertStore,
by comparing SECPKG_ATTR_REMOTE_CERT_CONTEXT's pbCertContext with the
first certificate's pbCertContext. */
if(first && context->pbCertEncoded != current_context->pbCertEncoded)
- reverse_order = true;
+ reverse_order = TRUE;
should_continue = func(current_context, reverse_order, arg);
- first = false;
+ first = FALSE;
}
if(current_context)
(void)reverse_order; /* unused */
if(valid_cert_encoding(ccert_context))
(*(int *)certs_count)++;
- return true;
+ return TRUE;
}
struct Adder_args
infof(data, "schannel: recv returned error %d", *err);
}
else if(nread == 0) {
- backend->recv_connection_closed = true;
+ backend->recv_connection_closed = TRUE;
DEBUGF(infof(data, "schannel: server closed the connection"));
}
else if(nread > 0) {
backend->encdata_offset += (size_t)nread;
- backend->encdata_is_incomplete = false;
+ backend->encdata_is_incomplete = FALSE;
DEBUGF(infof(data, "schannel: encrypted data got %zd", nread));
}
}
connssl->state = ssl_connection_negotiating;
connssl->connecting_state = ssl_connect_2;
connssl->io_need = CURL_SSL_IO_NEED_SEND;
- backend->recv_renegotiating = true;
+ backend->recv_renegotiating = TRUE;
*err = schannel_connect_common(cf, data, FALSE, &done);
- backend->recv_renegotiating = false;
+ backend->recv_renegotiating = FALSE;
if(*err) {
infof(data, "schannel: renegotiation failed");
goto cleanup;
else if(sspi_status == SEC_I_CONTEXT_EXPIRED) {
/* In Windows 2000 SEC_I_CONTEXT_EXPIRED (close_notify) is not
returned so we have to work around that in cleanup. */
- backend->recv_sspi_close_notify = true;
+ backend->recv_sspi_close_notify = TRUE;
if(!backend->recv_connection_closed)
- backend->recv_connection_closed = true;
+ backend->recv_connection_closed = TRUE;
infof(data,
"schannel: server close notification received (close_notify)");
goto cleanup;
}
}
else if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) {
- backend->encdata_is_incomplete = true;
+ backend->encdata_is_incomplete = TRUE;
if(!*err)
*err = CURLE_AGAIN;
infof(data, "schannel: failed to decrypt data, need more data");
VERSION_EQUAL);
if(isWin2k && sspi_status == SEC_E_OK)
- backend->recv_sspi_close_notify = true;
+ backend->recv_sspi_close_notify = TRUE;
else {
*err = CURLE_RECV_ERROR;
infof(data, "schannel: server closed abruptly (missing close_notify)");
Curl_safefree(backend->encdata_buffer);
backend->encdata_length = 0;
backend->encdata_offset = 0;
- backend->encdata_is_incomplete = false;
+ backend->encdata_is_incomplete = FALSE;
}
/* free internal buffer for received decrypted data */
DEBUGASSERT(multi);
if(!multi) {
- return false;
+ return FALSE;
}
share = Curl_hash_pick(&multi->proto_hash,
if(!share) {
share = calloc(1, sizeof(*share));
if(!share) {
- return false;
+ return FALSE;
}
if(!Curl_hash_add2(&multi->proto_hash,
(void *)MPROTO_SCHANNEL_CERT_SHARE_KEY,
sizeof(MPROTO_SCHANNEL_CERT_SHARE_KEY)-1,
share, schannel_cert_share_free)) {
free(share);
- return false;
+ return FALSE;
}
}
if(conn_config->CAfile) {
CAfile = strdup(conn_config->CAfile);
if(!CAfile) {
- return false;
+ return FALSE;
}
}
}
share->cert_store = cert_store;
share->CAinfo_blob_size = CAinfo_blob_size;
share->CAfile = CAfile;
- return true;
+ return TRUE;
}
const struct Curl_ssl Curl_ssl_schannel = {
case CURLE_OK:
case CURLE_AGAIN:
rtn = errSSLWouldBlock;
- backend->ssl_direction = false;
+ backend->ssl_direction = FALSE;
break;
default:
rtn = ioErr;
if(nwritten <= 0) {
if(result == CURLE_AGAIN) {
rtn = errSSLWouldBlock;
- backend->ssl_direction = true;
+ backend->ssl_direction = TRUE;
}
else {
rtn = ioErr;
* label matching below worked correctly */
keys[2] = kSecMatchLimit;
/* identity searches need a SecPolicyRef in order to work */
- values[3] = SecPolicyCreateSSL(false, NULL);
+ values[3] = SecPolicyCreateSSL(FALSE, NULL);
keys[3] = kSecMatchPolicy;
/* match the name of the certificate (does not work in macOS 10.12.1) */
values[4] = label_cf;
pkcs_url =
CFURLCreateFromFileSystemRepresentation(NULL,
(const UInt8 *)cPath,
- (CFIndex)strlen(cPath), false);
+ (CFIndex)strlen(cPath), FALSE);
resource_imported =
CFURLCreateDataAndPropertiesFromResource(NULL,
pkcs_url, &pkcs_data,
struct_stat st;
if(!filename)
- return false;
+ return FALSE;
if(stat(filename, &st) == 0)
return S_ISREG(st.st_mode);
- return false;
+ return FALSE;
}
static CURLcode
}
/* only TLS 1.0 is supported, disable SSL 3.0 and SSL 2.0 */
- SSLSetProtocolVersionEnabled(backend->ssl_ctx, kSSLProtocolAll, false);
- SSLSetProtocolVersionEnabled(backend->ssl_ctx, kTLSProtocol1, true);
+ SSLSetProtocolVersionEnabled(backend->ssl_ctx, kSSLProtocolAll, FALSE);
+ SSLSetProtocolVersionEnabled(backend->ssl_ctx, kTLSProtocol1, TRUE);
return CURLE_OK;
#endif
#if CURL_SUPPORT_MAC_10_8
if(backend->ssl_ctx)
(void)SSLDisposeContext(backend->ssl_ctx);
- err = SSLNewContext(false, &(backend->ssl_ctx));
+ err = SSLNewContext(FALSE, &(backend->ssl_ctx));
if(err != noErr) {
failf(data, "SSL: could not create a context: OSStatus %d", err);
return CURLE_OUT_OF_MEMORY;
#else
if(backend->ssl_ctx)
(void)SSLDisposeContext(backend->ssl_ctx);
- err = SSLNewContext(false, &(backend->ssl_ctx));
+ err = SSLNewContext(FALSE, &(backend->ssl_ctx));
if(err != noErr) {
failf(data, "SSL: could not create a context: OSStatus %d", err);
return CURLE_OUT_OF_MEMORY;
else {
#if CURL_SUPPORT_MAC_10_8
err = SSLSetEnableCertVerify(backend->ssl_ctx,
- conn_config->verifypeer ? true : false);
+ conn_config->verifypeer ? true : FALSE);
if(err != noErr) {
failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err);
return CURLE_SSL_CONNECT_ERROR;
}
#else
err = SSLSetEnableCertVerify(backend->ssl_ctx,
- conn_config->verifypeer ? true : false);
+ conn_config->verifypeer ? true : FALSE);
if(err != noErr) {
failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err);
return CURLE_SSL_CONNECT_ERROR;
failf(data, "SecTrustSetAnchorCertificates() returned error %d", ret);
goto out;
}
- ret = SecTrustSetAnchorCertificatesOnly(trust, true);
+ ret = SecTrustSetAnchorCertificatesOnly(trust, TRUE);
if(ret != noErr) {
failf(data, "SecTrustSetAnchorCertificatesOnly() returned error %d", ret);
goto out;
(void)SSLGetNegotiatedProtocolVersion(backend->ssl_ctx, &protocol);
sectransp_cipher_suite_get_str((uint16_t) cipher, cipher_str,
- sizeof(cipher_str), true);
+ sizeof(cipher_str), TRUE);
switch(protocol) {
case kSSLProtocol2:
infof(data, "SSL 2.0 connection using %s", cipher_str);
#ifndef CURL_DISABLE_VERBOSE_STRINGS
const bool show_verbose_server_cert = data->set.verbose;
#else
- const bool show_verbose_server_cert = false;
+ const bool show_verbose_server_cert = FALSE;
#endif
struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
CURLcode result = ssl_config->certinfo ?
err = SSLGetBufferedReadSize(backend->ssl_ctx, &buffer);
if(err == noErr)
return buffer > 0UL;
- return false;
+ return FALSE;
}
else
- return false;
+ return FALSE;
}
static CURLcode sectransp_random(struct Curl_easy *data UNUSED_PARAM,
(ca_info_blob ? NULL : conn_config->CAfile);
const char * const ssl_capath = conn_config->CApath;
struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
- bool imported_native_ca = false;
+ bool imported_native_ca = FALSE;
#if !defined(NO_FILESYSTEM) && defined(WOLFSSL_SYS_CA_CERTS)
/* load native CA certificates */
infof(data, "error importing native CA store, continuing anyway");
}
else {
- imported_native_ca = true;
+ imported_native_ca = TRUE;
infof(data, "successfully imported native CA store");
wssl->x509_store_setup = TRUE;
}
timediff_t timeout_ms = cfg->ca_cache_timeout * (timediff_t)1000;
if(timeout_ms < 0)
- return false;
+ return FALSE;
return elapsed_ms >= timeout_ms;
}