aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/https_common.h
blob: 3ccd2cb1c280b992ef76be9e74631d74f4d24659 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#define PORT 5556
#define SERVER "127.0.0.1"

#include <config.h>
#include <gnutls.h>

#include <sys/socket.h>
#include <arpa/inet.h>
#ifdef _WIN32
# include <io.h>
# include <winbase.h>
# define close closesocket
#else
# include <netinet/in.h>
# include <unistd.h>
# include <netdb.h>
# include <signal.h>
#endif

/* the number of elements in the priority structures.
 */
#define PRI_MAX 16

extern const char str_unknown[];

int print_info (gnutls_session_t state, const char *hostname);
void print_cert_info (gnutls_session_t state, const char *hostname);
void print_list (int verbose);

void parse_comp (char **comp, int ncomp, int *comp_priority);
void parse_kx (char **kx, int nkx, int *kx_priority);
void parse_ctypes (char **ctype, int nctype, int *cert_type_priority);
void parse_macs (char **macs, int nmacs, int *mac_priority);
void parse_ciphers (char **ciphers, int nciphers, int *cipher_priority);
void parse_protocols (char **protocols, int protocols_size,
		      int *protocol_priority);
const char *raw_to_string (const unsigned char *raw, size_t raw_size);
int service_to_port (const char *service);

void sockets_init (void);