.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" This manpage is Copyright (C) 1999 Tim Martin
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\"
.TH sasl_checkpass "26 March 2000" SASL "SASL man pages"
.SH NAME
sasl_checkpass \- Check a plaintext password


.SH SYNOPSIS
.nf
.B #include <sasl.h>
.sp

.BI "int sasl_checkpass(sasl_conn_t *" conn ", "
.BI "		       const char *" user ", "
.BI "		       unsigned " userlen ", "
.BI "		       const char *" pass ", "
.BI "		       unsigned " passlen ", "
.BI "		       const char **" errstr ");"


.fi
.SH DESCRIPTION

.B sasl_checkpass()
will check a plaintext password. This is needed for protocols that had a login method before SASL (for example the LOGIN command in IMAP). The password is checked with the
.I pwcheck_method
See sasl_callbacks
for information on how this parameter is set. On failure
.I errstr
may contain a specific reason for failure that should NOT be given to the user agent.

.PP

.SH "RETURN VALUE"

sasl_checkpass returns an integer which corresponds to one of the
following codes. SASL_OK indicates that the authentication is
complete. All other return codes indicate errors and should either be
handled or the authentication session should be quit.

.SH ERRORS
.TP 0.8i
.B SASL_OK
Success. Authentication complete
.TP 0.8i
.B SASL_NOUSER
User doesn't exist
.TP 0.8i
.B SASL_BADAUTH
Password is probably incorrect
.TP 0.8i
.B SASL_BADVERS
Mechanism version mismatch
.TP 0.8i
.B SASL_BADPARAM
error in config file
.TP 0.8i
.B SASL_NOMEM
not enough memory to complete operation

.SH "CONFORMING TO"
RFC 2222
.SH "SEE ALSO"
.BR other sasl stuff
.BR 
.BR 