libssl.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _LIBSSL_H
  2. #define _LIBSSL_H
  3. #ifdef HAVE_CONFIG_H
  4. # include "config.h"
  5. #endif
  6. #include "common.h"
  7. #include "dl.h"
  8. #include <bdlib/src/String.h>
  9. #include ".defs/libssl_pre.h"
  10. #ifdef EGG_SSL_EXT
  11. # ifndef EGG_SSL_INCS
  12. # include <openssl/ssl.h>
  13. # define EGG_SSL_INCS 1
  14. # endif
  15. #endif
  16. #include ".defs/libssl_post.h"
  17. typedef int (*SSL_get_error_t)(const SSL*, int);
  18. typedef void (*SSL_free_t)(SSL*);
  19. typedef int (*SSL_connect_t)(SSL*);
  20. typedef int (*SSL_read_t)(SSL*, void*, int);
  21. typedef int (*SSL_write_t)(SSL*, const void*, int);
  22. typedef SSL* (*SSL_new_t)(SSL_CTX*);
  23. typedef const SSL_METHOD* (*SSLv23_client_method_t)(void);
  24. typedef int (*SSL_shutdown_t)(SSL*);
  25. typedef int (*SSL_set_fd_t)(SSL*, int);
  26. typedef int (*SSL_pending_t)(const SSL*);
  27. typedef void (*SSL_load_error_strings_t)(void);
  28. typedef int (*SSL_library_init_t)(void);
  29. typedef void (*SSL_CTX_free_t)(SSL_CTX*);
  30. typedef SSL_CTX* (*SSL_CTX_new_t)(const SSL_METHOD*);
  31. typedef long (*SSL_CTX_ctrl_t)(SSL_CTX*, int, long, void*);
  32. int load_libssl();
  33. int unload_libssl();
  34. #endif /* !_LIBSSL_H */