1#ifndef __KRB4_H 2#define __KRB4_H 3/*************************************************************************** 4 * _ _ ____ _ 5 * Project ___| | | | _ \| | 6 * / __| | | | |_) | | 7 * | (__| |_| | _ <| |___ 8 * \___|\___/|_| \_\_____| 9 * 10 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. 11 * 12 * This software is licensed as described in the file COPYING, which 13 * you should have received as part of this distribution. The terms 14 * are also available at http://curl.haxx.se/docs/copyright.html. 15 * 16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 * copies of the Software, and permit persons to whom the Software is 18 * furnished to do so, under the terms of the COPYING file. 19 * 20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 * KIND, either express or implied. 22 * 23 ***************************************************************************/ 24 25struct Curl_sec_client_mech { 26 const char *name; 27 size_t size; 28 int (*init)(void *); 29 int (*auth)(void *, struct connectdata *); 30 void (*end)(void *); 31 int (*check_prot)(void *, int); 32 int (*overhead)(void *, int, int); 33 int (*encode)(void *, const void*, int, int, void**, struct connectdata *); 34 int (*decode)(void *, void*, int, int, struct connectdata *); 35}; 36 37 38#define AUTH_OK 0 39#define AUTH_CONTINUE 1 40#define AUTH_ERROR 2 41 42#ifdef HAVE_KRB4 43extern struct Curl_sec_client_mech Curl_krb4_client_mech; 44#endif 45#ifdef HAVE_GSSAPI 46extern struct Curl_sec_client_mech Curl_krb5_client_mech; 47#endif 48 49CURLcode Curl_krb_kauth(struct connectdata *conn); 50int Curl_sec_read_msg (struct connectdata *conn, char *, 51 enum protection_level); 52void Curl_sec_end (struct connectdata *); 53CURLcode Curl_sec_login (struct connectdata *); 54int Curl_sec_request_prot (struct connectdata *conn, const char *level); 55 56#endif 57