examples/portscanner: quick hack to make it work on single host/portrange
[rofl0r-rocksock.git] / rocksock_ssl_internal.h
blob680b967d42cdf57ac1c9163436c8daf8dd337f4b
1 #ifndef ROCKSOCK_SSL_PRIVATE_H
2 #define ROCKSOCK_SSL_PRIVATE_H
4 #include "rocksock.h"
6 const char* rocksock_ssl_strerror(rocksock *sock, int error);
7 int rocksock_ssl_send(rocksock* sock, char* buf, size_t sz);
8 int rocksock_ssl_recv(rocksock* sock, char* buf, size_t sz);
9 int rocksock_ssl_connect_fd(rocksock* sock);
10 void rocksock_ssl_free_context(rocksock *sock);
11 int rocksock_ssl_peek(rocksock* sock, int *result);
12 int rocksock_ssl_pending(rocksock *sock);
14 /* if you want cyassl, put both -DUSE_SSL and -DUSE_CYASSL
15 in your CFLAGS.
16 for openssl use -DUSE_SSL and -DUSE_OPENSSL.
18 #ifdef USE_SSL
20 #ifdef USE_CYASSL
21 #pragma RcB2 DEP "rocksock_cyassl.c"
22 #elif defined(USE_OPENSSL)
23 #pragma RcB2 DEP "rocksock_openssl.c"
24 #else
25 #error "need to define one of USE_OPENSSL or USE_CYASSL with -DUSE_SSL"
26 #endif
28 #else
29 #warning "compiling without SSL support"
30 #pragma RcB2 DEP "rocksock_ssl.c"
31 #endif
33 #endif