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