ssluse.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef __SSLUSE_H
  2. #define __SSLUSE_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 1998 - 2007, Daniel Stenberg, <[email protected]>, 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 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. * $Id$
  24. ***************************************************************************/
  25. /*
  26. * This header should only be needed to get included by sslgen.c and ssluse.c
  27. */
  28. #include "urldata.h"
  29. CURLcode Curl_ossl_connect(struct connectdata *conn, int sockindex);
  30. CURLcode Curl_ossl_connect_nonblocking(struct connectdata *conn,
  31. int sockindex,
  32. bool *done);
  33. void Curl_ossl_close(struct connectdata *conn); /* close a SSL connection */
  34. /* tell OpenSSL to close down all open information regarding connections (and
  35. thus session ID caching etc) */
  36. int Curl_ossl_close_all(struct SessionHandle *data);
  37. /* Sets an OpenSSL engine */
  38. CURLcode Curl_ossl_set_engine(struct SessionHandle *data, const char *engine);
  39. /* function provided for the generic SSL-layer, called when a session id
  40. should be freed */
  41. void Curl_ossl_session_free(void *ptr);
  42. /* Sets engine as default for all SSL operations */
  43. CURLcode Curl_ossl_set_engine_default(struct SessionHandle *data);
  44. /* Build list of OpenSSL engines */
  45. struct curl_slist *Curl_ossl_engines_list(struct SessionHandle *data);
  46. int Curl_ossl_init(void);
  47. void Curl_ossl_cleanup(void);
  48. ssize_t Curl_ossl_send(struct connectdata *conn,
  49. int sockindex,
  50. void *mem,
  51. size_t len);
  52. ssize_t Curl_ossl_recv(struct connectdata *conn, /* connection data */
  53. int num, /* socketindex */
  54. char *buf, /* store read data here */
  55. size_t buffersize, /* max amount to read */
  56. bool *wouldblock);
  57. size_t Curl_ossl_version(char *buffer, size_t size);
  58. int Curl_ossl_check_cxn(struct connectdata *cxn);
  59. int Curl_ossl_seed(struct SessionHandle *data);
  60. int Curl_ossl_shutdown(struct connectdata *conn, int sockindex);
  61. #endif