FTP: remove krb4 support

We've announced this pending removal for a long time and we've
repeatedly asked if anyone would care or if anyone objects. Nobody has
objected. It has probably not even been working for a good while since
nobody has tested/used this code recently.

The stuff in krb4.h that was generic enough to be used by other sources
is now present in security.h
This commit is contained in:
Daniel Stenberg
2013-08-23 16:16:42 +02:00
parent 817ceb09e0
commit bb55293313
13 changed files with 41 additions and 623 deletions

View File

@@ -165,7 +165,7 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp,
struct connectdata *conn = pp->conn;
struct SessionHandle *data = conn->data;
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
#ifdef HAVE_GSSAPI
enum protection_level data_sec = conn->data_prot;
#endif
@@ -194,12 +194,12 @@ CURLcode Curl_pp_vsendf(struct pingpong *pp,
return error;
}
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
#ifdef HAVE_GSSAPI
conn->data_prot = PROT_CMD;
#endif
error = Curl_write(conn, conn->sock[FIRSTSOCKET], s, write_len,
&bytes_written);
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
#ifdef HAVE_GSSAPI
DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST);
conn->data_prot = data_sec;
#endif
@@ -302,14 +302,14 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
}
else {
int res;
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
#ifdef HAVE_GSSAPI
enum protection_level prot = conn->data_prot;
conn->data_prot = PROT_CLEAR;
#endif
DEBUGASSERT((ptr+BUFSIZE-pp->nread_resp) <= (buf+BUFSIZE+1));
res = Curl_read(conn, sockfd, ptr, BUFSIZE-pp->nread_resp,
&gotbytes);
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
#ifdef HAVE_GSSAPI
DEBUGASSERT(prot > PROT_NONE && prot < PROT_LAST);
conn->data_prot = prot;
#endif
@@ -352,7 +352,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
the line isn't really terminated until the LF comes */
/* output debug output if that is requested */
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
#ifdef HAVE_GSSAPI
if(!conn->sec_complete)
#endif
if(data->set.verbose)
@@ -371,8 +371,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
if(pp->endofresp(conn, pp->linestart_resp, perline, code)) {
/* This is the end of the last line, copy the last line to the
start of the buffer and zero terminate, for old times sake (and
krb4)! */
start of the buffer and zero terminate, for old times sake */
char *meow;
int n;
for(meow=pp->linestart_resp, n=0; meow<ptr; meow++, n++)