30 #ifndef __APPS_INCLUDE_NETUTILS_WEBCLIENT_H 31 #define __APPS_INCLUDE_NETUTILS_WEBCLIENT_H 37 #include <tinyara/config.h> 38 #include <sys/types.h> 40 #ifdef CONFIG_NET_SECURITY_TLS 41 #include "tls/config.h" 42 #include "tls/entropy.h" 43 #include "tls/ctr_drbg.h" 44 #include "tls/certs.h" 48 #include "tls/error.h" 49 #include "tls/debug.h" 50 #include "tls/ssl_cache.h" 53 #include <apps/netutils/webserver/http_keyvalue_list.h> 59 #define WGET_MODE_GET 0 60 #define WGET_MODE_POST 1 61 #define WGET_MODE_PUT 2 62 #define WGET_MODE_DELETE 3 64 #define CONTENT_LENGTH 0 65 #define CHUNKED_ENCODING 1 67 #define WEBCLIENT_CONF_MAX_URL_SIZE 50 68 #define WEBCLIENT_CONF_MAX_ENTITY_SIZE 2048 69 #define WEBCLIENT_CONF_MAX_PHRASE_SIZE 50 70 #define WEBCLIENT_CONF_MAX_MESSAGE_SIZE 2100 72 #define WEBCLIENT_CONF_TIMEOUT_MSEC 5000 73 #define WEBCLIENT_CONF_MIN_TLS_MEMORY 100000 82 #ifdef CONFIG_NET_SECURITY_TLS 104 #ifdef CONFIG_HW_RSA_SIGN 105 unsigned int ca_key_index;
106 unsigned int dev_key_index;
107 unsigned int ca_cert_index;
108 unsigned int dev_cert_index;
132 #ifdef CONFIG_NET_SECURITY_TLS 156 #define EXTERN extern "C" 159 #define EXTERN extern void http_client_response_release(struct http_client_response_t *response)
http_client_response_release() releases the response structure.
mbedtls_pk_context tls_pkey
mbedtls_ssl_config tls_conf
mbedtls_ctr_drbg_context tls_ctr_drbg
mbedtls_x509_crt tls_clicert
unsigned int private_key_len
mbedtls_ssl_session tls_session
struct http_keyvalue_list_t * headers
mbedtls_net_context tls_client_fd
struct http_keyvalue_list_t * headers
int http_client_response_init(struct http_client_response_t *response)
http_client_response_init() initializes the response structure.
mbedtls_entropy_context tls_entropy
HTTP client TLS structure.
struct http_client_response_t * httprsp
mbedtls_ssl_context tls_ssl
HTTP keyvalue linked list structure.
int http_client_send_request_async(struct http_client_request_t *request, struct http_client_ssl_config_t *ssl_config, wget_callback_t cb)
http_client_send_request_async() sends the HTTP request to HTTP server with asynchronous function...
int http_client_send_request(struct http_client_request_t *request, struct http_client_ssl_config_t *ssl_config, struct http_client_response_t *response)
http_client_send_request() sends the HTTP request to HTTP server with synchronous function...
unsigned int dev_cert_len
void(* wget_callback_t)(httprsp)