0fde1ce3 |
1 | /* $Id: authsaslclientcrammd5.c,v 1.3 2008/07/10 02:43:55 mrsam Exp $ */ |
d9898ee8 |
2 | |
3 | /* |
0fde1ce3 |
4 | ** Copyright 2000-2008 Double Precision, Inc. See COPYING for |
d9898ee8 |
5 | ** distribution information. |
6 | */ |
7 | |
8 | #include "courier_auth_config.h" |
9 | #include "courierauthsasl.h" |
d9898ee8 |
10 | #include "libhmac/hmac.h" |
d9898ee8 |
11 | #include "authsaslclient.h" |
12 | #include <stdlib.h> |
13 | #include <stdio.h> |
14 | #include <ctype.h> |
15 | #include <string.h> |
16 | #include <errno.h> |
17 | |
d9898ee8 |
18 | extern int authsaslclient_cram(const struct authsaslclientinfo *info, |
19 | const char *p, |
20 | const struct hmac_hashinfo *); |
21 | |
22 | int authsaslclient_crammd5(const struct authsaslclientinfo *info) |
23 | { |
24 | const char *p=(*info->start_conv_func)("CRAM-MD5", NULL, info->conv_func_arg); |
25 | |
26 | if (!p) return (AUTHSASL_CANCELLED); |
27 | return ( authsaslclient_cram(info, p, &hmac_md5)); |
28 | } |