aboutsummaryrefslogtreecommitdiffstats
path: root/gssapi.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-12 01:14:30 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-12 01:14:30 +0000
commit20dfee53954fb557cf867a053d4d5d29e9bedb89 (patch)
tree9bf6c2a6a3524c8b8a5779162c36e431c9d73569 /gssapi.c
parentd6c728ad218f79305ad759eba6d787d125c67ec3 (diff)
downloadfetchmail-20dfee53954fb557cf867a053d4d5d29e9bedb89.tar.gz
fetchmail-20dfee53954fb557cf867a053d4d5d29e9bedb89.tar.bz2
fetchmail-20dfee53954fb557cf867a053d4d5d29e9bedb89.zip
Looks like we've got the new authentication logic done.
svn path=/trunk/; revision=3072
Diffstat (limited to 'gssapi.c')
-rw-r--r--gssapi.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gssapi.c b/gssapi.c
index 5156d009..6d83027b 100644
--- a/gssapi.c
+++ b/gssapi.c
@@ -106,10 +106,11 @@ int do_gssauth(int sock, char *command, char *hostname, char *username)
}
to64frombits(buf1, send_token.value, send_token.length);
gss_release_buffer(&min_stat, &send_token);
- strcat(buf1, "\r\n");
- SockWrite(sock, buf1, strlen(buf1));
- if (outlevel >= O_MONITOR)
- report(stdout, "IMAP> %s\n", buf1);
+
+ suppress_tags = TRUE;
+ gen_send(sock, buf1, strlen(buf1));
+ suppress_tags = FALSE;
+
if (maj_stat == GSS_S_CONTINUE_NEEDED) {
if (result = gen_recv(sock, buf1, sizeof buf1)) {
gss_release_name(&min_stat, &target_name);
@@ -119,18 +120,19 @@ int do_gssauth(int sock, char *command, char *hostname, char *username)
request_buf.value = buf2;
sec_token = &request_buf;
}
- } while (maj_stat == GSS_S_CONTINUE_NEEDED);
+ } while
+ (maj_stat == GSS_S_CONTINUE_NEEDED);
gss_release_name(&min_stat, &target_name);
/* get security flags and buffer size */
- if (result = gen_recv(sock, buf1, sizeof buf1)) {
+ if (result = gen_recv(sock, buf1, sizeof buf1))
return result;
- }
+
request_buf.length = from64tobits(buf2, buf1 + 2);
request_buf.value = buf2;
- maj_stat = gss_unwrap(&min_stat, context, &request_buf, &send_token,
- &cflags, &quality);
+ maj_stat = gss_unwrap(&min_stat, context,
+ &request_buf, &send_token, &cflags, &quality);
if (maj_stat != GSS_S_COMPLETE) {
report(stderr, _("Couldn't unwrap security level data\n"));
gss_release_buffer(&min_stat, &send_token);