openssl.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef HEADER_CURL_SSLUSE_H
  2. #define HEADER_CURL_SSLUSE_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 1998 - 2022, 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 https://curl.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. * SPDX-License-Identifier: curl
  24. *
  25. ***************************************************************************/
  26. #include "curl_setup.h"
  27. #ifdef USE_OPENSSL
  28. /*
  29. * This header should only be needed to get included by vtls.c, openssl.c
  30. * and ngtcp2.c
  31. */
  32. #include <openssl/ssl.h>
  33. #include "urldata.h"
  34. /*
  35. * In an effort to avoid using 'X509 *' here, we instead use the struct
  36. * x509_st version of the type so that we can forward-declare it here without
  37. * having to include <openssl/x509v3.h>. Including that header causes name
  38. * conflicts when libcurl is built with both Schannel and OpenSSL support.
  39. */
  40. struct x509_st;
  41. CURLcode Curl_ossl_verifyhost(struct Curl_easy *data, struct connectdata *conn,
  42. struct x509_st *server_cert);
  43. extern const struct Curl_ssl Curl_ssl_openssl;
  44. struct ssl_ctx_st;
  45. CURLcode Curl_ossl_set_client_cert(struct Curl_easy *data,
  46. struct ssl_ctx_st *ctx, char *cert_file,
  47. const struct curl_blob *cert_blob,
  48. const char *cert_type, char *key_file,
  49. const struct curl_blob *key_blob,
  50. const char *key_type, char *key_passwd);
  51. CURLcode Curl_ossl_certchain(struct Curl_easy *data, SSL *ssl);
  52. #endif /* USE_OPENSSL */
  53. #endif /* HEADER_CURL_SSLUSE_H */