Kannel: Open Source WAP and SMS gateway  $Revision: 5037 $
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

#define ALG   EVP_rc5_32_12_16_cbc()

Definition at line 72 of file wtls_statesupport.h.

#define BLOCK   0

Definition at line 70 of file wtls_statesupport.h.

#define EXPORTABLE   1

Definition at line 69 of file wtls_statesupport.h.

#define KEYSIZE_MAX   2048

Definition at line 67 of file wtls_statesupport.h.

#define NOT_EXPORTABLE   0

Definition at line 68 of file wtls_statesupport.h.

#define STREAM   1

Definition at line 71 of file wtls_statesupport.h.

Enumeration Type Documentation

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.

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.

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

void alertName ( char *  name,
int  alert 
)
void calculate_client_key_block ( WTLSMachine wtls_machine)
void calculate_server_key_block ( WTLSMachine wtls_machine)
int certifcateverifys_are_identical ( List pdu_list,
List last_received_packet 
)
int certificates_are_identical ( List pdu_list,
List last_received_packet 
)
int changecipherspecs_are_identical ( List pdu_list,
List last_received_packet 
)
void cipherName ( char *  name,
int  cipher 
)
int clienthellos_are_identical ( List pdu_list,
List last_received_packet 
)
int clientkeyexchanges_are_identical ( List pdu_list,
List last_received_packet 
)
int finishes_are_indentical ( List pdu_list,
List last_received_packet 
)
void hsName ( char *  name,
int  handshake 
)
int is_critical_alert ( List pdu_list,
WTLSMachine wtls_machine 
)
int is_warning_alert ( List pdu_list,
WTLSMachine wtls_machine 
)
void keyName ( char *  name,
int  key 
)
void macName ( char *  name,
int  mac 
)
int packet_contains_changecipherspec ( List pdu_list)
int packet_contains_clienthello ( 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_is_application_data ( List pdu_list)
void pduName ( char *  name,
int  pdu 
)
Octstr* wtls_calculate_prf ( Octstr secret,
Octstr label,
Octstr seed,
int  byteLength,
WTLSMachine wtls_machine 
)
CipherSuite* wtls_choose_ciphersuite ( List ciphersuites)
int wtls_choose_clientkeyid ( List clientKeyIDs,
int *  algo 
)
int wtls_choose_krefresh ( int  krefresh)
int wtls_choose_snmode ( int  snmode)
Octstr* wtls_decrypt ( wtls_Payload payload,
WTLSMachine wtls_machine 
)
Octstr* wtls_decrypt_key ( int  type,
Octstr encryptedData 
)
void wtls_decrypt_pdu_list ( WTLSMachine wtls_machine,
List pdu_list 
)
Octstr* wtls_encrypt ( Octstr buffer,
WTLSMachine wtls_machine,
int  recordType 
)
Random* wtls_get_random ( void  )
RSAPublicKey* wtls_get_rsapublickey ( void  )
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.