axtls.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef HEADER_CURL_AXTLS_H
  2. #define HEADER_CURL_AXTLS_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 2010, DirecTV
  11. * contact: Eric Hu <ehu@directv.com>
  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 http://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. #ifdef USE_AXTLS
  26. #include "curl/curl.h"
  27. #include "urldata.h"
  28. int Curl_axtls_init(void);
  29. int Curl_axtls_cleanup(void);
  30. CURLcode Curl_axtls_connect(struct connectdata *conn, int sockindex);
  31. CURLcode Curl_axtls_connect_nonblocking(
  32. struct connectdata *conn,
  33. int sockindex,
  34. bool *done);
  35. /* tell axTLS to close down all open information regarding connections (and
  36. thus session ID caching etc) */
  37. void Curl_axtls_close_all(struct SessionHandle *data);
  38. /* close a SSL connection */
  39. void Curl_axtls_close(struct connectdata *conn, int sockindex);
  40. void Curl_axtls_session_free(void *ptr);
  41. size_t Curl_axtls_version(char *buffer, size_t size);
  42. int Curl_axtls_shutdown(struct connectdata *conn, int sockindex);
  43. int Curl_axtls_check_cxn(struct connectdata *conn);
  44. /* API setup for axTLS */
  45. #define curlssl_init Curl_axtls_init
  46. #define curlssl_cleanup Curl_axtls_cleanup
  47. #define curlssl_connect Curl_axtls_connect
  48. #define curlssl_connect_nonblocking Curl_axtls_connect_nonblocking
  49. #define curlssl_session_free(x) Curl_axtls_session_free(x)
  50. #define curlssl_close_all Curl_axtls_close_all
  51. #define curlssl_close Curl_axtls_close
  52. #define curlssl_shutdown(x,y) Curl_axtls_shutdown(x,y)
  53. #define curlssl_set_engine(x,y) (x=x, y=y, CURLE_NOT_BUILT_IN)
  54. #define curlssl_set_engine_default(x) (x=x, CURLE_NOT_BUILT_IN)
  55. #define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
  56. #define curlssl_version Curl_axtls_version
  57. #define curlssl_check_cxn(x) Curl_axtls_check_cxn(x)
  58. #define curlssl_data_pending(x,y) (x=x, y=y, 0)
  59. #endif /* USE_AXTLS */
  60. #endif /* HEADER_CURL_AXTLS_H */