76 lines
2.3 KiB
C
Raw Normal View History

2015-04-27 22:25:09 +02:00
#ifndef HEADER_CURL_GTLS_H
#define HEADER_CURL_GTLS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
2023-07-02 19:51:09 +02:00
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2015-04-27 22:25:09 +02:00
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
2021-09-14 00:13:48 +02:00
* are also available at https://curl.se/docs/copyright.html.
2015-04-27 22:25:09 +02: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
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
2022-11-16 20:14:03 +01:00
* SPDX-License-Identifier: curl
*
2015-04-27 22:25:09 +02:00
***************************************************************************/
#include "curl_setup.h"
2023-05-23 16:38:00 +02:00
#include <curl/curl.h>
2015-04-27 22:25:09 +02:00
#ifdef USE_GNUTLS
2022-03-29 21:10:50 +02:00
#include <gnutls/gnutls.h>
2023-05-23 16:38:00 +02:00
#ifdef HAVE_GNUTLS_SRP
/* the function exists */
#ifdef USE_TLS_SRP
/* the functionality is not disabled */
#define USE_GNUTLS_SRP
#endif
#endif
struct Curl_easy;
struct Curl_cfilter;
struct ssl_primary_config;
struct ssl_config_data;
2024-04-14 22:45:38 +02:00
struct ssl_peer;
2023-05-23 16:38:00 +02:00
struct gtls_instance {
gnutls_session_t session;
gnutls_certificate_credentials_t cred;
#ifdef USE_GNUTLS_SRP
gnutls_srp_client_credentials_t srp_client_cred;
#endif
};
2022-03-29 21:10:50 +02:00
CURLcode
2023-05-23 16:38:00 +02:00
gtls_client_init(struct Curl_easy *data,
struct ssl_primary_config *config,
struct ssl_config_data *ssl_config,
2024-04-14 22:45:38 +02:00
struct ssl_peer *peer,
2023-05-23 16:38:00 +02:00
struct gtls_instance *gtls,
long *pverifyresult);
CURLcode
Curl_gtls_verifyserver(struct Curl_easy *data,
2022-03-29 21:10:50 +02:00
gnutls_session_t session,
2023-05-23 16:38:00 +02:00
struct ssl_primary_config *config,
struct ssl_config_data *ssl_config,
2024-04-14 22:45:38 +02:00
struct ssl_peer *peer,
2023-05-23 16:38:00 +02:00
const char *pinned_key);
2018-01-26 17:06:56 +01:00
extern const struct Curl_ssl Curl_ssl_gnutls;
2015-04-27 22:25:09 +02:00
#endif /* USE_GNUTLS */
#endif /* HEADER_CURL_GTLS_H */