1 /* suggest.c suggest client and server mechanism in a set of mechanisms
2 * Copyright (C) 2002 Simon Josefsson
4 * This file is part of libgsasl.
6 * Libgsasl is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * Libgsasl is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with libgsasl; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * gsasl_client_suggest_mechanism:
26 * @ctx: libgsasl handle.
27 * @mechlist: input character array with SASL mechanism names,
28 * separated by invalid characters (e.g. SPC).
30 * Return value: Returns name of "best" SASL mechanism supported by
31 * the libgsasl client which is present in the input string.
34 gsasl_client_suggest_mechanism (Gsasl_ctx
*ctx
, const char *mechlist
)
36 /* XXX parse mechlist */
37 return ctx
->client_mechs
[0].name
;
41 * gsasl_server_suggest_mechanism:
42 * @ctx: libgsasl handle.
43 * @mechlist: input character array with SASL mechanism names,
44 * separated by invalid characters (e.g. SPC).
46 * Return value: Returns name of "best" SASL mechanism supported by
47 * the libgsasl server which is present in the input string.
50 gsasl_server_suggest_mechanism (Gsasl_ctx
*ctx
, const char *mechlist
)
52 /* XXX parse mechlist */
53 return ctx
->server_mechs
[0].name
;