summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/util.h b/util.h
index 6959ddc..a48a12e 100644
--- a/util.h
+++ b/util.h
@@ -1,7 +1,14 @@
/* See COPYING file for copyright and license details. */
#define COOKIEMAX 1024
-int dial(char *host, char *port);
-int get(char *host, char *path, char *sendcookie, char *savecookie, char **body, int istext);
-int post(char *host, char *path, char *sendcookie, char *savecookie, char *data, char **body, int istext);
-int gettofile(char *host, char *url, char *sendcookie, char *savecookie, char *savepath, int istext);
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+typedef struct {
+ int fd;
+ SSL *sslhandle;
+ SSL_CTX *sslcontext;
+} conn;
+conn *dial(char *host, char *port, int ssl);
+int get(char *host, int ssl, char *path, char *sendcookie, char *savecookie, char **body, int istext);
+int post(char *host, int ssl, char *path, char *sendcookie, char *savecookie, char *data, char **body, int istext);
+int gettofile(char *host, int ssl, char *url, char *sendcookie, char *savecookie, char *savepath, int istext);
int renameifjpg(char *path);