darwinssl.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef HEADER_CURL_DARWINSSL_H
  2. #define HEADER_CURL_DARWINSSL_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 2012 - 2014, Nick Zitzmann, <[email protected]>.
  11. * Copyright (C) 2012 - 2017, Daniel Stenberg, <[email protected]>, et al.
  12. *
  13. * This software is licensed as described in the file COPYING, which
  14. * you should have received as part of this distribution. The terms
  15. * are also available at https://curl.haxx.se/docs/copyright.html.
  16. *
  17. * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  18. * copies of the Software, and permit persons to whom the Software is
  19. * furnished to do so, under the terms of the COPYING file.
  20. *
  21. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  22. * KIND, either express or implied.
  23. *
  24. ***************************************************************************/
  25. #include "curl_setup.h"
  26. #ifdef USE_DARWINSSL
  27. CURLcode Curl_darwinssl_connect(struct connectdata *conn, int sockindex);
  28. CURLcode Curl_darwinssl_connect_nonblocking(struct connectdata *conn,
  29. int sockindex,
  30. bool *done);
  31. /* close a SSL connection */
  32. void Curl_darwinssl_close(struct connectdata *conn, int sockindex);
  33. void Curl_darwinssl_session_free(void *ptr);
  34. size_t Curl_darwinssl_version(char *buffer, size_t size);
  35. int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex);
  36. int Curl_darwinssl_check_cxn(struct connectdata *conn);
  37. bool Curl_darwinssl_data_pending(const struct connectdata *conn,
  38. int connindex);
  39. CURLcode Curl_darwinssl_random(unsigned char *entropy,
  40. size_t length);
  41. void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
  42. size_t tmplen,
  43. unsigned char *md5sum, /* output */
  44. size_t md5len);
  45. bool Curl_darwinssl_false_start(void);
  46. /* Set the API backend definition to SecureTransport */
  47. #define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL
  48. /* API setup for SecureTransport */
  49. #define curlssl_init() (1)
  50. #define curlssl_cleanup() Curl_nop_stmt
  51. #define curlssl_connect Curl_darwinssl_connect
  52. #define curlssl_connect_nonblocking Curl_darwinssl_connect_nonblocking
  53. #define curlssl_session_free(x) Curl_darwinssl_session_free(x)
  54. #define curlssl_close_all(x) ((void)x)
  55. #define curlssl_close Curl_darwinssl_close
  56. #define curlssl_shutdown(x,y) 0
  57. #define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
  58. #define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
  59. #define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
  60. #define curlssl_version Curl_darwinssl_version
  61. #define curlssl_check_cxn Curl_darwinssl_check_cxn
  62. #define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y)
  63. #define curlssl_random(x,y,z) ((void)x, Curl_darwinssl_random(y,z))
  64. #define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d)
  65. #define curlssl_false_start() Curl_darwinssl_false_start()
  66. #endif /* USE_DARWINSSL */
  67. #endif /* HEADER_CURL_DARWINSSL_H */