File nut/app/tls_client/tls_client.c


Included Files


Preprocessor definitions

#define DBG_BAUDRATE 115200

#define DNSSERVERIP "192.168.1.254"

#define MY_MAC

#define MY_IP "192.168.1.10"

#define MY_MASK "255.255.255.0"

#define MY_GATE "192.168.1.254"

#define MYTZ -1

#define MYTIMED "130.149.17.21"


Typedef HTTP_SCHEME

typedef struct {...} HTTP_SCHEME
struct  
   {  
      char* schm_uri;  
      char* schm_user;  
      char* schm_pass;  
      char* schm_host;  
      char* schm_port;  
      char* schm_path;  
      uint16_t schm_portnum;  
   }  

Global Variable my_certificate

const unsigned char my_certificate[]
Included from nut/app/tls_client/cert.h
Visible in:   nut/app/tls_client/tls_client.c
Used in: tls_client() nut/app/tls_client/tls_client.c

Global Variable my_certificate_len

unsigned int my_certificate_len
Included from nut/app/tls_client/cert.h
Visible in:   nut/app/tls_client/tls_client.c
Used in: tls_client() nut/app/tls_client/tls_client.c

Global Variable my_private_key

const unsigned char my_private_key[]
Included from nut/app/tls_client/private_key.h
Visible in:   nut/app/tls_client/tls_client.c
Used in: tls_client() nut/app/tls_client/tls_client.c

Global Variable my_private_key_len

unsigned int my_private_key_len
Included from nut/app/tls_client/private_key.h
Visible in:   nut/app/tls_client/tls_client.c
Used in: tls_client() nut/app/tls_client/tls_client.c

Global Function HttpSchemeParse()

HTTP_SCHEME* HttpSchemeParse ( const char* uri )
Calls: HttpSchemeRelease() nut/app/tls_client/tls_client.c
  atoi(), malloc(), memset(), strdup()
Called by: tls_client() nut/app/tls_client/tls_client.c

Global Function HttpSchemeRelease()

void HttpSchemeRelease ( HTTP_SCHEME* schm )
Calls: free()
Called by: HttpSchemeParse() nut/app/tls_client/tls_client.c
  tls_client() nut/app/tls_client/tls_client.c

Global Function NutAppMain()

int NutAppMain ( void )
Calls: NUTPANIC(), NutDhcpIfConfig(), NutDnsConfig2(), NutHeapRootAvailable(), NutIpRouteAdd(), NutNetIfConfig(), NutRegisterDevice(), NutSNTPGetTime(), NutSleep(), NutThreadCreate(), NutVersionString(), _fileno(), _ioctl(), ctime(), fopen(), freopen(), inet_addr(), inet_ntoa(), printf(), stime()
References Functions: TlsClient() nut/app/tls_client/tls_client.c

Global Function TlsClient()

void TlsClient ( void* arg )
Prototyped in: nut/app/tls_client/tls_client.c
Calls: tls_client() nut/app/tls_client/tls_client.c
  EdLineClose(), EdLineOpen(), EdLineRead(), printf(), puts(), strcpy(), strncasecmp()
Used in: NutAppMain() nut/app/tls_client/tls_client.c

Local Function display_cipher()

* Display what cipher we are using

static void display_cipher ( SSL* ssl )

Calls: printf(), ssl_get_cipher_id()
Called by: tls_client() nut/app/tls_client/tls_client.c

Local Function display_session_id()

* Display what session id we have.

static void display_session_id ( SSL* ssl )

Calls: printf(), ssl_get_session_id(), ssl_get_session_id_size()
Called by: tls_client() nut/app/tls_client/tls_client.c

Local Function tls_client()

* Implement the SSL/TLS client logic.

static int tls_client ( char* uri )

Calls: HttpSchemeParse() nut/app/tls_client/tls_client.c
  HttpSchemeRelease() nut/app/tls_client/tls_client.c
  display_cipher() nut/app/tls_client/tls_client.c
  display_session_id() nut/app/tls_client/tls_client.c
  NUTPANIC(), NutDnsGetHostByName(), NutHeapRootAvailable(), NutTcpCloseSocket(), NutTcpConnect(), NutTcpCreateSocket(), NutTcpError(), NutTcpSetSockOpt(), atoi(), fflush(), free(), malloc(), memset(), printf(), puts(), sprintf(), ssl_client_new(), ssl_ctx_free(), ssl_ctx_new(), ssl_display_error(), ssl_free(), ssl_get_cert_dn(), ssl_handshake_status(), ssl_obj_memory_load(), ssl_read(), ssl_verify_cert(), ssl_write(), strlen()
Called by: TlsClient() nut/app/tls_client/tls_client.c
References Variables: my_certificate nut/app/tls_client/tls_client.c
  my_certificate_len nut/app/tls_client/tls_client.c
  my_private_key nut/app/tls_client/tls_client.c
  my_private_key_len nut/app/tls_client/tls_client.c