#ifndef __SOCKETWRAPPER_H__\r
#define __SOCKETWRAPPER_H__\r
\r
+#include <ws2tcpip.h>\r
+#include <windows.h>\r
+\r
#define USE_OPENSSL\r
\r
typedef BOOL (__stdcall* LPSSLTIMEOUTCALLBACK)(BOOL*);\r
BOOL IsOpenSSLLoaded();\r
void SetSSLTimeoutCallback(DWORD Timeout, LPSSLTIMEOUTCALLBACK pCallback);\r
void SetSSLConfirmCallback(LPSSLCONFIRMCALLBACK pCallback);\r
-BOOL SetSSLRootCertificate(void* pData, DWORD Length);\r
+BOOL SetSSLRootCertificate(const void* pData, DWORD Length);\r
BOOL IsHostNameMatched(LPCSTR HostName, LPCSTR CommonName);\r
-BOOL AttachSSL(SOCKET s, SOCKET parent, BOOL* pbAborted);\r
+BOOL EncryptSignature(const char* PrivateKey, const char* Password, const void* pIn, DWORD InLength, void* pOut, DWORD OutLength, DWORD* pOutLength);\r
+BOOL DecryptSignature(const char* PublicKey, const char* Password, const void* pIn, DWORD InLength, void* pOut, DWORD OutLength, DWORD* pOutLength);\r
+BOOL GetHashSHA1(const void* pData, DWORD Size, void* pHash);\r
+BOOL GetHashSHA224(const void* pData, DWORD Size, void* pHash);\r
+BOOL GetHashSHA256(const void* pData, DWORD Size, void* pHash);\r
+BOOL GetHashSHA384(const void* pData, DWORD Size, void* pHash);\r
+BOOL GetHashSHA512(const void* pData, DWORD Size, void* pHash);\r
+BOOL AttachSSL(SOCKET s, SOCKET parent, BOOL* pbAborted, BOOL bStrengthen);\r
BOOL DetachSSL(SOCKET s);\r
BOOL IsSSLAttached(SOCKET s);\r
-SOCKET socketS(int af, int type, int protocol);\r
-int bindS(SOCKET s, const struct sockaddr *addr, int namelen);\r
-int listenS(SOCKET s, int backlog);\r
-SOCKET acceptS(SOCKET s, struct sockaddr *addr, int *addrlen);\r
-int connectS(SOCKET s, const struct sockaddr *name, int namelen);\r
-int closesocketS(SOCKET s);\r
-int sendS(SOCKET s, const char * buf, int len, int flags);\r
-int recvS(SOCKET s, char * buf, int len, int flags);\r
+SOCKET FTPS_socket(int af, int type, int protocol);\r
+int FTPS_bind(SOCKET s, const struct sockaddr *addr, int namelen);\r
+int FTPS_listen(SOCKET s, int backlog);\r
+SOCKET FTPS_accept(SOCKET s, struct sockaddr *addr, int *addrlen);\r
+int FTPS_connect(SOCKET s, const struct sockaddr *name, int namelen);\r
+int FTPS_closesocket(SOCKET s);\r
+int FTPS_send(SOCKET s, const char * buf, int len, int flags);\r
+int FTPS_recv(SOCKET s, char * buf, int len, int flags);\r
+\r
+HANDLE WSAAsyncGetHostByNameIPv6(HWND hWnd, u_int wMsg, const char * name, char * buf, int buflen, short Family);\r
+int WSACancelAsyncRequestIPv6(HANDLE hAsyncTaskHandle);\r
+char* AddressToStringIPv4(char* str, void* in);\r
+char* AddressToStringIPv6(char* str, void* in6);\r
+char* inet6_ntoa(struct in6_addr in6);\r
+struct in6_addr inet6_addr(const char* cp);\r
+HANDLE WSAAsyncGetHostByNameM(HWND hWnd, u_int wMsg, const char * name, char * buf, int buflen);\r
+HANDLE WSAAsyncGetHostByNameIPv6M(HWND hWnd, u_int wMsg, const char * name, char * buf, int buflen, short Family);\r
+\r
+extern const struct in6_addr IN6ADDR_NONE;\r
+\r
+BOOL LoadPuTTY();\r
+void FreePuTTY();\r
+BOOL IsPuTTYLoaded();\r
+BOOL IsSFTPAttached(SOCKET s);\r
+SOCKET SFTP_socket(int af, int type, int protocol);\r
+int SFTP_bind(SOCKET s, const struct sockaddr *addr, int namelen);\r
+int SFTP_listen(SOCKET s, int backlog);\r
+SOCKET SFTP_accept(SOCKET s, struct sockaddr *addr, int *addrlen);\r
+int SFTP_connect(SOCKET s, const struct sockaddr *name, int namelen);\r
+int SFTP_closesocket(SOCKET s);\r
+int SFTP_send(SOCKET s, const char * buf, int len, int flags);\r
+int SFTP_recv(SOCKET s, char * buf, int len, int flags);\r
+BOOL SFTP_SetTimeoutCallback(SOCKET s, void* pCallback);\r
+SOCKET SFTP_GetDataHandle(SOCKET s, int af, int type, int protocol);\r
+BOOL SFTP_SetFilePosition(SOCKET s, LONGLONG Position);\r
\r
#endif\r
\r