Kannel: Open Source WAP and SMS gateway  svn-r5335
wtls_statesupport.h File Reference
#include "gwlib/gwlib.h"
#include "wtls_pdu.h"
#include "wtls.h"

Go to the source code of this file.

Data Structures

struct  keyxchg_table_t
 
struct  bulk_table_t
 
struct  hash_table_t
 

Macros

#define KEYSIZE_MAX   2048
 
#define NOT_EXPORTABLE   0
 
#define EXPORTABLE   1
 
#define BLOCK   0
 
#define STREAM   1
 
#define ALG   EVP_rc5_32_12_16_cbc()
 

Enumerations

enum  key_exchange_suites {
  NULL_keyxchg, SHARED_SECRET, DH_anon, DH_anon_512,
  RSA_anon, RSA_anon_512, RSA_anon_768, RSA_NOLIMIT,
  RSA_512, RSA_768, ECDH_anon, ECDH_anon_113,
  ECDH_anon_131, ECDH_ECDSA_NOLIMIT
}
 
enum  bulk_algorithms {
  NULL_bulk, RC5_CBC_40, RC5_CBC_56, RC5_CBC,
  DES_CBC_40, DES_CBC, TRIPLE_DES_CBC_EDE, IDEA_CBC_40,
  IDEA_CBC_56, IDEA_CBC
}
 
enum  keyed_macs {
  SHA_0, SHA_40, SHA_80, SHA_NOLIMIT,
  SHA_XOR_40, MD5_40, MD5_80, MD5_NOLIMIT
}
 

Functions

Octstrwtls_calculate_prf (Octstr *secret, Octstr *label, Octstr *seed, int byteLength, WTLSMachine *wtls_machine)
 
RSAPublicKeywtls_get_rsapublickey (void)
 
Randomwtls_get_random (void)
 
Octstrwtls_decrypt (wtls_Payload *payload, WTLSMachine *wtls_machine)
 
Octstrwtls_encrypt (Octstr *buffer, WTLSMachine *wtls_machine, int recordType)
 
Octstrwtls_decrypt_key (int type, Octstr *encryptedData)
 
void wtls_decrypt_pdu_list (WTLSMachine *wtls_machine, List *pdu_list)
 
Octstrwtls_hash (Octstr *inputData, WTLSMachine *wtls_machine)
 
CipherSuitewtls_choose_ciphersuite (List *ciphersuites)
 
int wtls_choose_clientkeyid (List *clientKeyIDs, int *algo)
 
int wtls_choose_snmode (int snmode)
 
int wtls_choose_krefresh (int krefresh)
 
int clienthellos_are_identical (List *pdu_list, List *last_received_packet)
 
int certifcateverifys_are_identical (List *pdu_list, List *last_received_packet)
 
int certificates_are_identical (List *pdu_list, List *last_received_packet)
 
int clientkeyexchanges_are_identical (List *pdu_list, List *last_received_packet)
 
int changecipherspecs_are_identical (List *pdu_list, List *last_received_packet)
 
int finishes_are_indentical (List *pdu_list, List *last_received_packet)
 
int packet_contains_changecipherspec (List *pdu_list)
 
int packet_contains_finished (List *pdu_list)
 
int packet_contains_optional_stuff (List *pdu_list)
 
int packet_contains_userdata (List *pdu_list)
 
int packet_contains_clienthello (List *pdu_list)
 
int packet_is_application_data (List *pdu_list)
 
int is_critical_alert (List *pdu_list, WTLSMachine *wtls_machine)
 
int is_warning_alert (List *pdu_list, WTLSMachine *wtls_machine)
 
void calculate_client_key_block (WTLSMachine *wtls_machine)
 
void calculate_server_key_block (WTLSMachine *wtls_machine)
 
void cipherName (char *name, int cipher)
 
void keyName (char *name, int key)
 
void macName (char *name, int mac)
 
void alertName (char *name, int alert)
 
void pduName (char *name, int pdu)
 
void hsName (char *name, int handshake)
 

Macro Definition Documentation

◆ ALG

#define ALG   EVP_rc5_32_12_16_cbc()

Definition at line 72 of file wtls_statesupport.h.

◆ BLOCK

#define BLOCK   0

Definition at line 70 of file wtls_statesupport.h.

◆ EXPORTABLE

#define EXPORTABLE   1

Definition at line 69 of file wtls_statesupport.h.

◆ KEYSIZE_MAX

#define KEYSIZE_MAX   2048

Definition at line 67 of file wtls_statesupport.h.

◆ NOT_EXPORTABLE

#define NOT_EXPORTABLE   0

Definition at line 68 of file wtls_statesupport.h.

◆ STREAM

#define STREAM   1

Definition at line 71 of file wtls_statesupport.h.

Enumeration Type Documentation

◆ bulk_algorithms

Enumerator
NULL_bulk 
RC5_CBC_40 
RC5_CBC_56 
RC5_CBC 
DES_CBC_40 
DES_CBC 
TRIPLE_DES_CBC_EDE 
IDEA_CBC_40 
IDEA_CBC_56 
IDEA_CBC 

Definition at line 97 of file wtls_statesupport.h.

◆ key_exchange_suites

Enumerator
NULL_keyxchg 
SHARED_SECRET 
DH_anon 
DH_anon_512 
RSA_anon 
RSA_anon_512 
RSA_anon_768 
RSA_NOLIMIT 
RSA_512 
RSA_768 
ECDH_anon 
ECDH_anon_113 
ECDH_anon_131 
ECDH_ECDSA_NOLIMIT 

Definition at line 80 of file wtls_statesupport.h.

◆ keyed_macs

enum keyed_macs
Enumerator
SHA_0 
SHA_40 
SHA_80 
SHA_NOLIMIT 
SHA_XOR_40 
MD5_40 
MD5_80 
MD5_NOLIMIT 

Definition at line 110 of file wtls_statesupport.h.

Function Documentation

◆ alertName()

void alertName ( char *  name,
int  alert 
)

◆ calculate_client_key_block()

void calculate_client_key_block ( WTLSMachine wtls_machine)

◆ calculate_server_key_block()

void calculate_server_key_block ( WTLSMachine wtls_machine)

◆ certifcateverifys_are_identical()

int certifcateverifys_are_identical ( List pdu_list,
List last_received_packet 
)

◆ certificates_are_identical()

int certificates_are_identical ( List pdu_list,
List last_received_packet 
)

◆ changecipherspecs_are_identical()

int changecipherspecs_are_identical ( List pdu_list,
List last_received_packet 
)

◆ cipherName()

void cipherName ( char *  name,
int  cipher 
)

◆ clienthellos_are_identical()

int clienthellos_are_identical ( List pdu_list,
List last_received_packet 
)

◆ clientkeyexchanges_are_identical()

int clientkeyexchanges_are_identical ( List pdu_list,
List last_received_packet 
)

◆ finishes_are_indentical()

int finishes_are_indentical ( List pdu_list,
List last_received_packet 
)

◆ hsName()

void hsName ( char *  name,
int  handshake 
)

◆ is_critical_alert()

int is_critical_alert ( List pdu_list,
WTLSMachine wtls_machine 
)

◆ is_warning_alert()

int is_warning_alert ( List pdu_list,
WTLSMachine wtls_machine 
)

◆ keyName()

void keyName ( char *  name,
int  key 
)

◆ macName()

void macName ( char *  name,
int  mac 
)

◆ packet_contains_changecipherspec()

int packet_contains_changecipherspec ( List pdu_list)

◆ packet_contains_clienthello()

int packet_contains_clienthello ( List pdu_list)

◆ packet_contains_finished()

int packet_contains_finished ( List pdu_list)

◆ packet_contains_optional_stuff()

int packet_contains_optional_stuff ( List pdu_list)

◆ packet_contains_userdata()

int packet_contains_userdata ( List pdu_list)

◆ packet_is_application_data()

int packet_is_application_data ( List pdu_list)

◆ pduName()

void pduName ( char *  name,
int  pdu 
)

◆ wtls_calculate_prf()

Octstr* wtls_calculate_prf ( Octstr secret,
Octstr label,
Octstr seed,
int  byteLength,
WTLSMachine wtls_machine 
)

◆ wtls_choose_ciphersuite()

CipherSuite* wtls_choose_ciphersuite ( List ciphersuites)

◆ wtls_choose_clientkeyid()

int wtls_choose_clientkeyid ( List clientKeyIDs,
int *  algo 
)

◆ wtls_choose_krefresh()

int wtls_choose_krefresh ( int  krefresh)

◆ wtls_choose_snmode()

int wtls_choose_snmode ( int  snmode)

◆ wtls_decrypt()

Octstr* wtls_decrypt ( wtls_Payload payload,
WTLSMachine wtls_machine 
)

◆ wtls_decrypt_key()

Octstr* wtls_decrypt_key ( int  type,
Octstr encryptedData 
)

◆ wtls_decrypt_pdu_list()

void wtls_decrypt_pdu_list ( WTLSMachine wtls_machine,
List pdu_list 
)

◆ wtls_encrypt()

Octstr* wtls_encrypt ( Octstr buffer,
WTLSMachine wtls_machine,
int  recordType 
)

◆ wtls_get_random()

Random* wtls_get_random ( void  )

◆ wtls_get_rsapublickey()

RSAPublicKey* wtls_get_rsapublickey ( void  )

◆ wtls_hash()

Octstr* wtls_hash ( Octstr inputData,
WTLSMachine wtls_machine 
)
See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.