5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2005 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
20 /****h* silcske/SILC Connection Authentication
24 * SILC Connection Authentication protocol is closely related to the SILC
25 * Key Exchange protocol. After successful key exchange, additional
26 * authentication is usually required to gain access to remote server or
27 * service. Connection authentication may be based on passphrase or
28 * digital signatures. It is also possible to have no authentication at
33 #ifndef SILCCONNAUTH_H
34 #define SILCCONNAUTH_H
36 typedef struct SilcConnAuthStruct *SilcConnAuth;
39 SILC_CONN_UNKNOWN = 0,
40 SILC_CONN_CLIENT = 1, /* Client connection */
41 SILC_CONN_SERVER = 2, /* Server connection */
42 SILC_CONN_ROUTER = 3 /* Router connection */
45 typedef SilcBool (*SilcConnAuthGetAuthData)(SilcConnAuth connauth,
46 SilcConnectionType conn_type,
47 unsigned char **passphrase,
48 SilcUInt32 *passphrase_len,
52 typedef void (*SilcConnAuthCompletion)(SilcConnAuth connauth,
56 SilcConnAuth silc_connauth_alloc(SilcSchedule schedule,
58 SilcUInt32 timeout_secs);
59 void silc_connauth_free(SilcConnAuth connauth);
60 SilcSKE silc_connauth_get_ske(SilcConnAuth connauth);
62 silc_connauth_initiator(SilcConnAuth connauth,
63 SilcConnectionType conn_type,
64 SilcAuthMethod auth_method, void *auth_data,
65 SilcUInt32 auth_data_len,
66 SilcConnAuthCompletion completion,
69 silc_connauth_responder(SilcConnAuth connauth,
70 SilcConnAuthGetAuthData get_auth_data,
71 SilcConnAuthCompletion completion,
74 #endif /* SILCCONNAUTH_H */