wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
http-utils.h
Go to the documentation of this file.
1 
5 #ifndef HTTP_UTILS_H
6 #define HTTP_UTILS_H
7 
8 struct http_ctx;
9 
11  char *oid;
12  u8 *data;
13  size_t len;
14 };
15 
16 #define HTTP_MAX_CERT_LOGO_HASH 32
17 
18 struct http_logo {
19  char *alg_oid;
20  u8 *hash;
21  size_t hash_len;
22  char *uri;
23 };
24 
25 struct http_cert {
26  char **dnsname;
27  unsigned int num_dnsname;
28  struct http_othername *othername;
29  unsigned int num_othername;
30  struct http_logo *logo;
31  unsigned int num_logo;
32 };
33 
34 int soap_init_client(struct http_ctx *ctx, const char *address,
35  const char *ca_fname, const char *username,
36  const char *password, const char *client_cert,
37  const char *client_key);
38 int soap_reinit_client(struct http_ctx *ctx);
39 xml_node_t * soap_send_receive(struct http_ctx *ctx, xml_node_t *node);
40 
41 struct http_ctx * http_init_ctx(void *upper_ctx, struct xml_node_ctx *xml_ctx);
42 void http_ocsp_set(struct http_ctx *ctx, int val);
43 void http_deinit_ctx(struct http_ctx *ctx);
44 
45 int http_download_file(struct http_ctx *ctx, const char *url,
46  const char *fname, const char *ca_fname);
47 char * http_post(struct http_ctx *ctx, const char *url, const char *data,
48  const char *content_type, const char *ext_hdr,
49  const char *ca_fname,
50  const char *username, const char *password,
51  const char *client_cert, const char *client_key,
52  size_t *resp_len);
53 void http_set_cert_cb(struct http_ctx *ctx,
54  int (*cb)(void *ctx, struct http_cert *cert),
55  void *cb_ctx);
56 const char * http_get_err(struct http_ctx *ctx);
57 void http_parse_x509_certificate(struct http_ctx *ctx, const char *fname);
58 
59 #endif /* HTTP_UTILS_H */
Definition: http-utils.h:25
Definition: xml_libxml2.c:15
Definition: http_curl.c:27
Definition: http-utils.h:18
Definition: http-utils.h:10