apple.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef HEADER_CURL_VTLS_APPLE_H
  2. #define HEADER_CURL_VTLS_APPLE_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) Jan Venekamp, <[email protected]>
  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_APPLE_SECTRUST
  28. struct Curl_cfilter;
  29. struct Curl_easy;
  30. struct ssl_peer;
  31. /* Get the DER encoded i-th certificate in the server handshake */
  32. typedef CURLcode Curl_vtls_get_cert_der(struct Curl_cfilter *cf,
  33. struct Curl_easy *data,
  34. void *user_data,
  35. size_t i,
  36. unsigned char **pder,
  37. size_t *pder_len);
  38. /* Ask Apple's Security framework to verify the certificate chain
  39. * send by the peer. On CURLE_OK it has been verified.
  40. */
  41. CURLcode Curl_vtls_apple_verify(struct Curl_cfilter *cf,
  42. struct Curl_easy *data,
  43. struct ssl_peer *peer,
  44. size_t num_certs,
  45. Curl_vtls_get_cert_der *der_cb,
  46. void *cb_user_data,
  47. const unsigned char *ocsp_buf,
  48. size_t ocsp_len);
  49. #endif /* USE_APPLE_SECTRUST */
  50. #endif /* HEADER_CURL_VTLS_APPLE_H */