diff options
Diffstat (limited to 'libs/libcurl/src/krb5.c')
-rw-r--r-- | libs/libcurl/src/krb5.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libs/libcurl/src/krb5.c b/libs/libcurl/src/krb5.c index a635966d51..f7f6d2570c 100644 --- a/libs/libcurl/src/krb5.c +++ b/libs/libcurl/src/krb5.c @@ -25,7 +25,7 @@ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -169,7 +169,7 @@ krb5_encode(void *app_data, const void *from, int length, int level, void **to) * libraries modify the input buffer in gss_wrap()
*/
dec.value = (void *)from;
- dec.length = length;
+ dec.length = (size_t)length;
maj = gss_wrap(&min, *context,
level == PROT_PRIVATE,
GSS_C_QOP_DEFAULT,
@@ -178,7 +178,7 @@ krb5_encode(void *app_data, const void *from, int length, int level, void **to) if(maj != GSS_S_COMPLETE)
return -1;
- /* malloc a new buffer, in case gss_release_buffer doesn't work as
+ /* malloc a new buffer, in case gss_release_buffer does not work as
expected */
*to = malloc(enc.length);
if(!*to)
@@ -227,7 +227,7 @@ krb5_auth(void *app_data, struct Curl_easy *data, struct connectdata *conn) /* this loop will execute twice (once for service, once for host) */
for(;;) {
- /* this really shouldn't be repeated here, but can't help it */
+ /* this really should not be repeated here, but cannot help it */
if(service == srv_host) {
result = ftpsend(data, conn, "AUTH GSSAPI");
if(result)
@@ -329,7 +329,7 @@ krb5_auth(void *app_data, struct Curl_easy *data, struct connectdata *conn) size_t len = Curl_dyn_len(&pp->recvbuf);
p = Curl_dyn_ptr(&pp->recvbuf);
if((len < 4) || (p[0] != '2' && p[0] != '3')) {
- infof(data, "Server didn't accept auth data");
+ infof(data, "Server did not accept auth data");
ret = AUTH_ERROR;
break;
}
@@ -524,7 +524,7 @@ static CURLcode read_data(struct Curl_easy *data, int sockindex, return result;
if(len) {
- len = ntohl(len);
+ len = (int)ntohl((uint32_t)len);
if(len > CURL_MAX_INPUT_LENGTH)
return CURLE_TOO_LARGE;
@@ -536,7 +536,7 @@ static CURLcode read_data(struct Curl_easy *data, int sockindex, do {
char buffer[1024];
nread = CURLMIN(len, (int)sizeof(buffer));
- result = socket_read(data, sockindex, buffer, nread);
+ result = socket_read(data, sockindex, buffer, (size_t)nread);
if(result)
return result;
result = Curl_dyn_addn(&buf->buf, buffer, nread);
@@ -630,7 +630,7 @@ static void do_sec_send(struct Curl_easy *data, struct connectdata *conn, else
prot_level = conn->command_prot;
}
- bytes = conn->mech->encode(conn->app_data, from, length, prot_level,
+ bytes = conn->mech->encode(conn->app_data, from, length, (int)prot_level,
(void **)&buffer);
if(!buffer || bytes <= 0)
return; /* error */
@@ -658,7 +658,7 @@ static void do_sec_send(struct Curl_easy *data, struct connectdata *conn, }
}
else {
- htonl_bytes = htonl(bytes);
+ htonl_bytes = (int)htonl((OM_uint32)bytes);
socket_write(data, fd, &htonl_bytes, sizeof(htonl_bytes));
socket_write(data, fd, buffer, curlx_sitouz(bytes));
}
@@ -724,7 +724,7 @@ int Curl_sec_read_msg(struct Curl_easy *data, struct connectdata *conn, decoded_len = curlx_uztosi(decoded_sz);
decoded_len = conn->mech->decode(conn->app_data, buf, decoded_len,
- level, conn);
+ (int)level, conn);
if(decoded_len <= 0) {
free(buf);
return -1;
@@ -789,7 +789,7 @@ static int sec_set_protection_level(struct Curl_easy *data) if(pbsz) {
/* stick to default value if the check fails */
if(ISDIGIT(pbsz[5]))
- buffer_size = atoi(&pbsz[5]);
+ buffer_size = (unsigned int)atoi(&pbsz[5]);
if(buffer_size < conn->buffer_size)
conn->buffer_size = buffer_size;
}
@@ -878,7 +878,7 @@ static CURLcode choose_mech(struct Curl_easy *data, struct connectdata *conn) if(ret != AUTH_CONTINUE) {
if(ret != AUTH_OK) {
- /* Mechanism has dumped the error to stderr, don't error here. */
+ /* Mechanism has dumped the error to stderr, do not error here. */
return CURLE_USE_SSL_FAILED;
}
DEBUGASSERT(ret == AUTH_OK);
|