From: Ken Hornstein Date: Thu, 22 Sep 2016 03:33:29 +0000 (-0400) Subject: Merge branch 'pop-tls' of git.sv.gnu.org:/srv/git/nmh into pop-tls X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/d98775ebddf66dabdc0e46153f6d4308ff015054?hp=cff807ba1e4bf89c3dd0d3c746caba61211cf5c2 Merge branch 'pop-tls' of git.sv.gnu.org:/srv/git/nmh into pop-tls --- diff --git a/sbr/netsec.c b/sbr/netsec.c index 0333bf20..9fc6f465 100644 --- a/sbr/netsec.c +++ b/sbr/netsec.c @@ -288,6 +288,7 @@ netsec_b64_snoop_decoder(netsec_context *nsc, const char *string, size_t len, { const char *decoded; size_t decodedlen; + NMH_UNUSED(nsc); int offset = context ? *((int *) context) : 0; @@ -804,7 +805,7 @@ retry: #endif /* TLS_SUPPORT */ fprintf(stderr, "=> "); if (nsc->ns_snoop_cb) - nsc->ns_snoop_cb(nsc, nsc->ns_outptr, outlen, + nsc->ns_snoop_cb(nsc, (char *) nsc->ns_outptr, outlen, nsc->ns_snoop_context); else fprintf(stderr, "%.*s\n", outlen, nsc->ns_outptr); @@ -1100,7 +1101,6 @@ netsec_negotiate_sasl(netsec_context *nsc, const char *mechlist, char **errstr) i = (str[i] == NULL); - free(str); free(mlist); if (i) { @@ -1157,7 +1157,7 @@ netsec_negotiate_sasl(netsec_context *nsc, const char *mechlist, char **errstr) * we ignore it and send a blank message in response. We should * then get either an +OK or -ERR */ - free(errstr); + free(*errstr); nsc->sasl_proto_cb(NETSEC_SASL_WRITE, NULL, 0, NULL, 0, NULL); rc = nsc->sasl_proto_cb(NETSEC_SASL_FINISH, NULL, 0, NULL, 0, errstr); diff --git a/test/oauth/common.sh b/test/oauth/common.sh index ab0bad53..932c7051 100644 --- a/test/oauth/common.sh +++ b/test/oauth/common.sh @@ -131,7 +131,7 @@ expect_creds() { } test_inc() { - run_test "inc -host 127.0.0.1 -port ${pop_port} -saslmech xoauth2 -authservice test -user nobody@example.com -width 80" "$@" + run_test "inc -host 127.0.0.1 -port ${pop_port} -sasl -saslmech xoauth2 -authservice test -user nobody@example.com -width 80" "$@" } test_inc_success() { diff --git a/test/oauth/test-inc b/test/oauth/test-inc index c7456928..96a2af04 100755 --- a/test/oauth/test-inc +++ b/test/oauth/test-inc @@ -77,6 +77,7 @@ Content-Type: application/json EOF start_fakehttp +start_pop_xoauth test_inc 'inc: error refreshing OAuth2 token inc: bad OAuth request; re-run with -snoop and send REDACTED output to nmh-workers' @@ -93,7 +94,7 @@ EOF start_pop_xoauth -test_inc 'inc: -ERR [AUTH] Invalid credentials.' +test_inc 'inc: Authentication failed: -ERR [AUTH] Invalid credentials.' # TEST start_test "pop server doesn't support oauth"