curl_darwinssl.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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, <nickzman@gmail.com>.
  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 http://curl.haxx.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. ***************************************************************************/
  24. #include "curl_setup.h"
  25. #ifdef USE_DARWINSSL
  26. CURLcode Curl_darwinssl_connect(struct connectdata *conn, int sockindex);
  27. CURLcode Curl_darwinssl_connect_nonblocking(struct connectdata *conn,
  28. int sockindex,
  29. bool *done);
  30. /* this function doesn't actually do anything */
  31. void Curl_darwinssl_close_all(struct SessionHandle *data);
  32. /* close a SSL connection */
  33. void Curl_darwinssl_close(struct connectdata *conn, int sockindex);
  34. void Curl_darwinssl_session_free(void *ptr);
  35. size_t Curl_darwinssl_version(char *buffer, size_t size);
  36. int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex);
  37. int Curl_darwinssl_check_cxn(struct connectdata *conn);
  38. bool Curl_darwinssl_data_pending(const struct connectdata *conn,
  39. int connindex);
  40. int Curl_darwinssl_random(unsigned char *entropy,
  41. size_t length);
  42. void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
  43. size_t tmplen,
  44. unsigned char *md5sum, /* output */
  45. size_t md5len);
  46. /* API setup for SecureTransport */
  47. #define curlssl_init() (1)
  48. #define curlssl_cleanup() Curl_nop_stmt
  49. #define curlssl_connect Curl_darwinssl_connect
  50. #define curlssl_connect_nonblocking Curl_darwinssl_connect_nonblocking
  51. #define curlssl_session_free(x) Curl_darwinssl_session_free(x)
  52. #define curlssl_close_all Curl_darwinssl_close_all
  53. #define curlssl_close Curl_darwinssl_close
  54. #define curlssl_shutdown(x,y) 0
  55. #define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
  56. #define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
  57. #define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
  58. #define curlssl_version Curl_darwinssl_version
  59. #define curlssl_check_cxn Curl_darwinssl_check_cxn
  60. #define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y)
  61. #define curlssl_random(x,y,z) Curl_darwinssl_random(y,z)
  62. #define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d)
  63. #define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL
  64. #endif /* USE_DARWINSSL */
  65. #endif /* HEADER_CURL_DARWINSSL_H */