2020-09-22 17:22:34 +08:00
|
|
|
#ifndef HEADER_CURL_KRB5_H
|
|
|
|
#define HEADER_CURL_KRB5_H
|
2002-09-03 19:52:59 +08:00
|
|
|
/***************************************************************************
|
2005-04-07 23:27:13 +08:00
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
2001-01-09 15:41:04 +08:00
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2023-01-02 20:51:48 +08:00
|
|
|
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2001-01-09 15:41:04 +08:00
|
|
|
*
|
2002-09-03 19:52:59 +08:00
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2005-04-07 23:27:13 +08:00
|
|
|
*
|
2001-01-09 15:41:04 +08:00
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
2002-09-03 19:52:59 +08:00
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
2001-01-09 15:41:04 +08:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
2022-05-17 17:16:50 +08:00
|
|
|
* SPDX-License-Identifier: curl
|
|
|
|
*
|
2002-09-03 19:52:59 +08:00
|
|
|
***************************************************************************/
|
2005-03-14 08:00:45 +08:00
|
|
|
|
|
|
|
struct Curl_sec_client_mech {
|
|
|
|
const char *name;
|
|
|
|
size_t size;
|
|
|
|
int (*init)(void *);
|
2021-01-25 01:57:02 +08:00
|
|
|
int (*auth)(void *, struct Curl_easy *data, struct connectdata *);
|
2005-03-14 08:00:45 +08:00
|
|
|
void (*end)(void *);
|
|
|
|
int (*check_prot)(void *, int);
|
2016-11-23 15:30:18 +08:00
|
|
|
int (*encode)(void *, const void *, int, int, void **);
|
|
|
|
int (*decode)(void *, void *, int, int, struct connectdata *);
|
2005-03-14 08:00:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#define AUTH_OK 0
|
|
|
|
#define AUTH_CONTINUE 1
|
|
|
|
#define AUTH_ERROR 2
|
|
|
|
|
2013-08-26 17:14:16 +08:00
|
|
|
#ifdef HAVE_GSSAPI
|
2021-01-25 01:57:02 +08:00
|
|
|
int Curl_sec_read_msg(struct Curl_easy *data, struct connectdata *conn, char *,
|
2016-12-14 06:34:59 +08:00
|
|
|
enum protection_level);
|
|
|
|
void Curl_sec_end(struct connectdata *);
|
2021-01-25 01:57:02 +08:00
|
|
|
CURLcode Curl_sec_login(struct Curl_easy *, struct connectdata *);
|
2016-12-14 06:34:59 +08:00
|
|
|
int Curl_sec_request_prot(struct connectdata *conn, const char *level);
|
2020-09-21 19:59:33 +08:00
|
|
|
#else
|
|
|
|
#define Curl_sec_end(x)
|
2013-08-23 22:16:42 +08:00
|
|
|
#endif
|
2012-12-28 19:03:09 +08:00
|
|
|
|
2020-09-22 17:22:34 +08:00
|
|
|
#endif /* HEADER_CURL_KRB5_H */
|