Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

wtls.h File Reference

#include "gw/msg.h"
#include "wap/wap_events.h"
#include "wap/wtls_pdu.h"
#include "wtls_state-decl.h"
#include "wtls_machine-decl.h"

Include dependency graph for wtls.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  WTLSMachine

Defines

#define STATE_NAME(state)   state,
#define ROW(state, event, condition, action, next_state)
#define ENUM(name)   serv_states name;
#define ADDRTUPLE(name)   WAPAddrTuple *name;
#define INTEGER(name)   int name;
#define OCTSTR(name)   Octstr *name;
#define MACHINE(field)   field
#define PDULIST(name)   List *name;

Typedefs

typedef WTLSMachine WTLSMachine

Enumerations

enum  serv_states {
  state, event, condition, action,
  NULL_STATE, T_Unitdata_Ind, client_random, random_bytes,
  handshake_data, handle_event, res, CREATING,
  SEC_Terminate_Req, alert_level, alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh,
  CREATING, SEC_Exception_Req, alert_level, alert_desc,
  wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, CREATING, SEC_Create_Res, server_random = 0 wtls_pdu_create(Handshake_PDU) server_hello (ServerHello*) gw_malloc(sizeof(ServerHello)) 1 wtls_get_random() octstr_create("") pack_int32(wtls_machine->server_random,0,tempRandom->gmt_unix_time),
  random_bytes, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, handle_event, event,
  CREATED, SEC_Exchange_Req, wtls = NULL) wtls_pdu_create(Handshake_PDU) server_key_exchange (ServerKeyExchange*) gw_malloc(sizeof(ServerKeyExchange)) NULL, wtls = NULL) wtls_pdu_create(Handshake_PDU) server_key_exchange (ServerKeyExchange*) gw_malloc(sizeof(ServerKeyExchange)) NULL,
  wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, wtls = NULL) wtls_pdu_create(Handshake_PDU) server_key_exchange (ServerKeyExchange*) gw_malloc(sizeof(ServerKeyExchange)) NULL, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh,
  CREATED, SEC_Commit_Req, CREATED, SEC_Terminate_Req,
  alert_level, alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, CREATED,
  SEC_Exception_Req, alert_level, alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh,
  EXCHANGE, T_Unitdata_Ind, pdu_list = = 1, last_received_packet = = 1,
  EXCHANGE, T_Unitdata_Ind, handshake_data, data,
  clientKeyXchgPDU = wtls_pdu_unpack(tempPayload,wtls_machine), decryptedData = clientKeyXchgPDU->u.handshake.client_key_exchange->rsa_params->encrypted_secret wtls_decrypt_rsa(encryptedData) wtls_get_rsapublickey(), decryptedData = clientKeyXchgPDU->u.handshake.client_key_exchange->rsa_params->encrypted_secret wtls_decrypt_rsa(encryptedData) wtls_get_rsapublickey(), decryptedData = clientKeyXchgPDU->u.handshake.client_key_exchange->rsa_params->encrypted_secret wtls_decrypt_rsa(encryptedData) wtls_get_rsapublickey(),
  rsa_exponent, decryptedData = clientKeyXchgPDU->u.handshake.client_key_exchange->rsa_params->encrypted_secret wtls_decrypt_rsa(encryptedData) wtls_get_rsapublickey(), decryptedData = clientKeyXchgPDU->u.handshake.client_key_exchange->rsa_params->encrypted_secret wtls_decrypt_rsa(encryptedData) wtls_get_rsapublickey(), decryptedData = clientKeyXchgPDU->u.handshake.client_key_exchange->rsa_params->encrypted_secret wtls_decrypt_rsa(encryptedData) wtls_get_rsapublickey(),
  rsa_modulus, changeCipherSpec_incoming_PDU, wtls = NULL) wtls_pdu_create(Handshake_PDU) server_key_exchange (ServerKeyExchange*) gw_malloc(sizeof(ServerKeyExchange)) NULL, finished_incoming_PDU,
  verify_data, handshake_data, data, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh,
  wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, server_seq_num = 0, EXCHANGE, T_Unitdata_Ind,
  pdu_list = = 1, EXCHANGE, T_Unitdata_Ind, pdu_list = = 1,
  EXCHANGE, SEC_Terminate_Req, alert_level, alert_desc,
  wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, EXCHANGE, SEC_Exception_Req, alert_level,
  alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, COMMIT, T_Unitdata_Ind,
  pdu_list = = 1, last_received_packet = = 1, COMMIT, T_Unitdata_Ind,
  pdu_list = = 1, last_received_packet = = 1, COMMIT, T_Unitdata_Ind,
  pdu_list = = 1, COMMIT, T_Unitdata_Ind, pdu_list = = 1,
  COMMIT, T_Unitdata_Ind, pdu_list = = 1, COMMIT,
  T_Unitdata_Ind, pdu_list = = 1, COMMIT, SEC_Terminate_Req,
  alert_level, alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, COMMIT,
  SEC_Exception_Req, alert_level, alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh,
  OPENING, SEC_Create_Request_Req, OPENING, SEC_Unitdata_Req,
  OPENING, T_Unitdata_Ind, pdu_list = = 1, wtls = NULL) wtls_pdu_create(Handshake_PDU) server_key_exchange (ServerKeyExchange*) gw_malloc(sizeof(ServerKeyExchange)) NULL,
  d, data, ApplicationPDU = wtls_pdu_unpack(tempPayload, wtls_machine), OPENING,
  T_Unitdata_Ind, pdu_list = = 1, last_received_packet = = 1, OPENING,
  T_Unitdata_Ind, pdu_list = = 1, OPENING, T_Unitdata_Ind,
  pdu_list = = 1, OPENING, SEC_Terminate_Req, alert_level,
  alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, OPENING, SEC_Exception_Req,
  alert_level, alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, OPEN,
  SEC_Create_Request_Req, OPEN, SEC_Unitdata_Req, OPEN,
  T_Unitdata_Ind, pdu_list = = 1, OPEN, T_Unitdata_Ind,
  pdu_list = = 1, OPEN, T_Unitdata_Ind, pdu_list = = 1,
  OPEN, T_Unitdata_Ind, pdu_list = = 1, OPEN,
  T_Unitdata_Ind, pdu_list = = 1, OPEN, T_Unitdata_Ind,
  pdu_list = = 1, OPEN, SEC_Terminate_Req, alert_level,
  alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, OPEN, SEC_Exception_Req,
  alert_level, alert_desc, wtls_machine = tempRandom octstr_create("") event->u.SEC_Create_Res.client_key_id (CipherSuite*) gw_malloc(sizeof(CipherSuite)) event->u.SEC_Create_Res.bulk_cipher_algo event->u.SEC_Create_Res.mac_algo null_comp event->u.SEC_Create_Res.snmode event->u.SEC_Create_Res.krefresh, serv_states_count
}

Functions

void wtls_init (void)
void wtls_shutdown (void)
void wtls_dispatch_event (WAPEvent *event)
WAPEventwtls_unpack_wdp_datagram (Msg *msg)
int wtls_get_address_tuple (long mid, WAPAddrTuple **tuple)


Define Documentation

#define ADDRTUPLE name   )     WAPAddrTuple *name;
 

Definition at line 94 of file wtls.h.

#define ENUM name   )     serv_states name;
 

Definition at line 93 of file wtls.h.

#define INTEGER name   )     int name;
 

Definition at line 95 of file wtls.h.

#define MACHINE field   )     field
 

Definition at line 97 of file wtls.h.

#define OCTSTR name   )     Octstr *name;
 

Definition at line 96 of file wtls.h.

#define PDULIST name   )     List *name;
 

Definition at line 98 of file wtls.h.

#define ROW state,
event,
condition,
action,
next_state   ) 
 

#define STATE_NAME state   )     state,
 


Typedef Documentation

typedef struct WTLSMachine WTLSMachine
 

Definition at line 66 of file wtls.h.


Enumeration Type Documentation

enum serv_states
 

Enumeration values:
state 
event 
condition 
action 
NULL_STATE 
T_Unitdata_Ind 
client_random 
random_bytes 
handshake_data 
handle_event 
res 
CREATING 
SEC_Terminate_Req 
alert_level 
alert_desc 
wtls_machine 
CREATING 
SEC_Exception_Req 
alert_level 
alert_desc 
wtls_machine 
CREATING 
SEC_Create_Res 
server_random 
random_bytes 
wtls_machine 
handle_event 
event 
CREATED 
SEC_Exchange_Req 
wtls 
wtls 
wtls_machine 
wtls 
wtls_machine 
wtls_machine 
CREATED 
SEC_Commit_Req 
CREATED 
SEC_Terminate_Req 
alert_level 
alert_desc 
wtls_machine 
CREATED 
SEC_Exception_Req 
alert_level 
alert_desc 
wtls_machine 
EXCHANGE 
T_Unitdata_Ind 
pdu_list 
last_received_packet 
EXCHANGE 
T_Unitdata_Ind 
handshake_data 
data 
clientKeyXchgPDU 
decryptedData 
decryptedData 
decryptedData 
rsa_exponent 
decryptedData 
decryptedData 
decryptedData 
rsa_modulus 
changeCipherSpec_incoming_PDU 
wtls 
finished_incoming_PDU 
verify_data 
handshake_data 
data 
wtls_machine 
wtls_machine 
server_seq_num 
EXCHANGE 
T_Unitdata_Ind 
pdu_list 
EXCHANGE 
T_Unitdata_Ind 
pdu_list 
EXCHANGE 
SEC_Terminate_Req 
alert_level 
alert_desc 
wtls_machine 
EXCHANGE 
SEC_Exception_Req 
alert_level 
alert_desc 
wtls_machine 
COMMIT 
T_Unitdata_Ind 
pdu_list 
last_received_packet 
COMMIT 
T_Unitdata_Ind 
pdu_list 
last_received_packet 
COMMIT 
T_Unitdata_Ind 
pdu_list 
COMMIT 
T_Unitdata_Ind 
pdu_list 
COMMIT 
T_Unitdata_Ind 
pdu_list 
COMMIT 
T_Unitdata_Ind 
pdu_list 
COMMIT 
SEC_Terminate_Req 
alert_level 
alert_desc 
wtls_machine 
COMMIT 
SEC_Exception_Req 
alert_level 
alert_desc 
wtls_machine 
OPENING 
SEC_Create_Request_Req 
OPENING 
SEC_Unitdata_Req 
OPENING 
T_Unitdata_Ind 
pdu_list 
wtls 
d 
data 
ApplicationPDU 
OPENING 
T_Unitdata_Ind 
pdu_list 
last_received_packet 
OPENING 
T_Unitdata_Ind 
pdu_list 
OPENING 
T_Unitdata_Ind 
pdu_list 
OPENING 
SEC_Terminate_Req 
alert_level 
alert_desc 
wtls_machine 
OPENING 
SEC_Exception_Req 
alert_level 
alert_desc 
wtls_machine 
OPEN 
SEC_Create_Request_Req 
OPEN 
SEC_Unitdata_Req 
OPEN 
T_Unitdata_Ind 
pdu_list 
OPEN 
T_Unitdata_Ind 
pdu_list 
OPEN 
T_Unitdata_Ind 
pdu_list 
OPEN 
T_Unitdata_Ind 
pdu_list 
OPEN 
T_Unitdata_Ind 
pdu_list 
OPEN 
T_Unitdata_Ind 
pdu_list 
OPEN 
SEC_Terminate_Req 
alert_level 
alert_desc 
wtls_machine 
OPEN 
SEC_Exception_Req 
alert_level 
alert_desc 
wtls_machine 
serv_states_count 

Definition at line 78 of file wtls.h.

00078                  {
00079     #define STATE_NAME(state) state,
00080     #define ROW(state, event, condition, action, next_state)
00081     #include "wtls_state-decl.h"
00082     serv_states_count
00083 };


Function Documentation

void wtls_dispatch_event WAPEvent event  ) 
 

Referenced by main().

int wtls_get_address_tuple long  mid,
WAPAddrTuple **  tuple
 

void wtls_init void   ) 
 

Referenced by main().

void wtls_shutdown void   ) 
 

WAPEvent* wtls_unpack_wdp_datagram Msg msg  ) 
 

Referenced by main().

See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.