libssl.h 1.1 KB

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