tls_hooks_init.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2007 iptelorg GmbH
  5. *
  6. * Permission to use, copy, modify, and distribute this software for any
  7. * purpose with or without fee is hereby granted, provided that the above
  8. * copyright notice and this permission notice appear in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  11. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  12. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  13. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  14. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  15. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  16. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*
  19. * tls hooks init
  20. *
  21. * History:
  22. * --------
  23. * 2007-02-09 created by andrei
  24. */
  25. /**
  26. * @file
  27. * @brief SIP-router TLS support :: TLS hooks init
  28. * @ingroup tls
  29. * Module: @ref tls
  30. */
  31. #ifndef _tls_hooks_init_h
  32. #define _tls_hooks_init_h
  33. #ifdef TLS_HOOKS
  34. #include "ip_addr.h" /* socket_info */
  35. #ifndef USE_TLS
  36. #error "USE_TLS required and not defined (please compile with make \
  37. TLS_HOOKS=1)"
  38. #endif
  39. #ifdef CORE_TLS
  40. #error "Conflict: CORE_TLS and TLS_HOOKS cannot be defined in the same time"
  41. #endif
  42. int tls_loaded(void);
  43. int tls_has_init_si(void); /*returns true if a handle for tls_init is registered*/
  44. int tls_init(struct socket_info* si);
  45. int init_tls(void);
  46. void destroy_tls(void);
  47. #endif /* TLS_HOOKS */
  48. #endif