{
const char *decoded;
size_t decodedlen;
+ NMH_UNUSED(nsc);
int offset = context ? *((int *) context) : 0;
#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);
i = (str[i] == NULL);
- free(str);
free(mlist);
if (i) {
* 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);
}
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() {
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'
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"