summaryrefslogtreecommitdiff
path: root/util.h
blob: 7e62deda4f6ba6a7b4c173876eb341586cfcc963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* See COPYING file for copyright and license details. */
#define COOKIEMAX 1024
#include <openssl/ssl.h>
#include <openssl/err.h>
typedef struct {
        int fd;
        SSL *sslhandle;
} 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);