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

wtls_pdu.h File Reference

#include "gwlib/list.h"
#include "gwlib/octstr.h"
#include "wtls.h"

Include dependency graph for wtls_pdu.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  random
struct  ecpoint
struct  dhpublickey
struct  rsa_public_key
struct  public_key
struct  identifier
struct  eccurve
struct  dh_parameters
struct  ec_parameters
struct  parameter_set
struct  parameter_specifier
struct  key_exchange_id
struct  signature
struct  to_be_signed_cert
struct  wtls_cert
struct  rsa_secret
struct  rsa_encrypted_secret
struct  cipher_suite
struct  cert_request
struct  cert_verify
struct  hello_request
struct  client_hello
struct  server_hello
struct  certificate
struct  server_key_exchange
struct  client_key_exchange
struct  finished
struct  server_hello_done
struct  cc
struct  alert
struct  handshake
struct  application
struct  wtls_pdu
struct  wtls_payload

Typedefs

typedef enum wtls_pdu_modes wtls_pdu_modes
typedef enum handshake_type HandshakeType
typedef enum compmethod CompressionMethod
typedef enum certificateformat CertificateFormat
typedef enum sig_algo SignatureAlgorithm
typedef enum keyex_suite KeyExchangeSuite
typedef enum pubkey_algo PublicKeyAlgorithm
typedef enum identifier_type IdentifierType
typedef enum public_key_type PublicKeyType
typedef enum ecbasistype ECBasisType
typedef enum ecfield ECField
typedef random Random
typedef ecpoint ECPoint
typedef ECPoint ECPublicKey
typedef dhpublickey DHPublicKey
typedef rsa_public_key RSAPublicKey
typedef public_key PublicKey
typedef identifier Identifier
typedef eccurve ECCurve
typedef dh_parameters DHParameters
typedef ec_parameters ECParameters
typedef parameter_set ParameterSet
typedef parameter_specifier ParameterSpecifier
typedef key_exchange_id KeyExchangeId
typedef signature Signature
typedef to_be_signed_cert ToBeSignedCertificate
typedef wtls_cert WTLSCertificate
typedef rsa_secret RSASecret
typedef rsa_encrypted_secret RSAEncryptedSecret
typedef cipher_suite CipherSuite
typedef cert_request CertificateRequest
typedef cert_verify CertificateVerify
typedef hello_request HelloRequest
typedef client_hello ClientHello
typedef server_hello ServerHello
typedef certificate Certificate
typedef server_key_exchange ServerKeyExchange
typedef client_key_exchange ClientKeyExchange
typedef finished Finished
typedef server_hello_done ServerHelloDone
typedef cc ChangeCipher
typedef alert Alert
typedef handshake Handshake
typedef application Application
typedef wtls_pdu wtls_PDU
typedef wtls_payload wtls_Payload

Enumerations

enum  wtls_pdu_modes { ChangeCipher_PDU = 1, Alert_PDU, Handshake_PDU, Application_PDU }
enum  handshake_type {
  hello_request = 0, client_hello = 1, server_hello = 2, certificate = 11,
  server_key_exchange = 12, certificate_request = 13, server_hello_done = 14, certificate_verify = 15,
  client_key_exchange = 16, finished = 20
}
enum  compmethod { null_comp = 0 }
enum  certificateformat { WTLSCert = 1, X509Cert, X968Cert }
enum  sig_algo { anonymous, ecdsa_sha, rsa_sha }
enum  keyex_suite {
  null_k, shared_secret, dh_anon, dh_anon_512,
  dh_anon_768, rsa_anon, rsa_anon_512, rsa_anon_768,
  rsa, rsa_512, rsa_768, ecdh_anon,
  ecdh_anon_113, ecdh_anon_131, ecdh_ecdsa
}
enum  pubkey_algo { rsa_pubkey, diffie_hellman_pubkey, elliptic_curve_pubkey }
enum  identifier_type {
  null = 0, text, binary, key_hash_sha = 254,
  x509_name = 255
}
enum  public_key_type { rsa_key = 2, ecdh_key = 3, ecdsa_key = 4 }
enum  ecbasistype { ec_basis_onb = 1, ec_basis_trinomial, ec_basis_pentanomial, ec_basis_polynomial }
enum  ecfield { ec_prime_p, ec_characteristic_two }

Functions

wtls_PDUwtls_pdu_create (int type)
void wtls_pdu_destroy (wtls_PDU *msg)
void wtls_pdu_dump (wtls_PDU *msg, int level)
wtls_PDUwtls_pdu_unpack (wtls_Payload *payload, WTLSMachine *wtls_machine)
wtls_Payloadwtls_pdu_pack (wtls_PDU *pdu, WTLSMachine *wtls_machine)
wtls_Payloadwtls_payload_unpack (Octstr *data)
Octstrwtls_payload_pack (wtls_Payload *payload)
void wtls_payload_destroy (wtls_Payload *payload)
Listwtls_unpack_payloadlist (Octstr *data)
Octstrwtls_pack_payloadlist (List *payloadlist)


Typedef Documentation

typedef struct alert Alert
 

typedef struct application Application
 

typedef struct certificate Certificate
 

typedef enum certificateformat CertificateFormat
 

typedef struct cert_request CertificateRequest
 

typedef struct cert_verify CertificateVerify
 

typedef struct cc ChangeCipher
 

typedef struct cipher_suite CipherSuite
 

typedef struct client_hello ClientHello
 

typedef struct client_key_exchange ClientKeyExchange
 

typedef enum compmethod CompressionMethod
 

typedef struct dh_parameters DHParameters
 

typedef struct dhpublickey DHPublicKey
 

typedef enum ecbasistype ECBasisType
 

typedef struct eccurve ECCurve
 

typedef enum ecfield ECField
 

typedef struct ec_parameters ECParameters
 

typedef struct ecpoint ECPoint
 

typedef ECPoint ECPublicKey
 

Definition at line 171 of file wtls_pdu.h.

typedef struct finished Finished
 

typedef struct handshake Handshake
 

typedef enum handshake_type HandshakeType
 

typedef struct hello_request HelloRequest
 

typedef struct identifier Identifier
 

typedef enum identifier_type IdentifierType
 

typedef struct key_exchange_id KeyExchangeId
 

typedef enum keyex_suite KeyExchangeSuite
 

typedef struct parameter_set ParameterSet
 

typedef struct parameter_specifier ParameterSpecifier
 

typedef struct public_key PublicKey
 

typedef enum pubkey_algo PublicKeyAlgorithm
 

typedef enum public_key_type PublicKeyType
 

typedef struct random Random
 

typedef struct rsa_encrypted_secret RSAEncryptedSecret
 

typedef struct rsa_public_key RSAPublicKey
 

typedef struct rsa_secret RSASecret
 

typedef struct server_hello ServerHello
 

typedef struct server_hello_done ServerHelloDone
 

typedef struct server_key_exchange ServerKeyExchange
 

typedef struct signature Signature
 

typedef enum sig_algo SignatureAlgorithm
 

typedef struct to_be_signed_cert ToBeSignedCertificate
 

typedef struct wtls_payload wtls_Payload
 

typedef struct wtls_pdu wtls_PDU
 

typedef enum wtls_pdu_modes wtls_pdu_modes
 

typedef struct wtls_cert WTLSCertificate
 


Enumeration Type Documentation

enum certificateformat
 

Enumeration values:
WTLSCert 
X509Cert 
X968Cert 

Definition at line 92 of file wtls_pdu.h.

00092                                {
00093     WTLSCert = 1,
00094     X509Cert,
00095     X968Cert
00096 } CertificateFormat;

enum compmethod
 

Enumeration values:
null_comp 

Definition at line 88 of file wtls_pdu.h.

00088                         {
00089     null_comp = 0
00090 } CompressionMethod;

enum ecbasistype
 

Enumeration values:
ec_basis_onb 
ec_basis_trinomial 
ec_basis_pentanomial 
ec_basis_polynomial 

Definition at line 150 of file wtls_pdu.h.

00150                          {
00151     ec_basis_onb = 1,
00152     ec_basis_trinomial,
00153     ec_basis_pentanomial,
00154     ec_basis_polynomial
00155 } ECBasisType;

enum ecfield
 

Enumeration values:
ec_prime_p 
ec_characteristic_two 

Definition at line 157 of file wtls_pdu.h.

00157                      {
00158     ec_prime_p,
00159     ec_characteristic_two
00160 } ECField;

enum handshake_type
 

Enumeration values:
hello_request 
client_hello 
server_hello 
certificate 
server_key_exchange 
certificate_request 
server_hello_done 
certificate_verify 
client_key_exchange 
finished 

Definition at line 75 of file wtls_pdu.h.

00075                            {
00076     hello_request = 0,
00077     client_hello = 1,
00078     server_hello = 2,
00079     certificate = 11,
00080     server_key_exchange = 12,
00081     certificate_request = 13,
00082     server_hello_done = 14,
00083     certificate_verify = 15,
00084     client_key_exchange = 16,
00085     finished = 20
00086 } HandshakeType;

enum identifier_type
 

Enumeration values:
null 
text 
binary 
key_hash_sha 
x509_name 

Definition at line 136 of file wtls_pdu.h.

00136                              {
00137     null = 0,
00138     text,
00139     binary,
00140     key_hash_sha = 254,
00141     x509_name = 255
00142 } IdentifierType;

enum keyex_suite
 

Enumeration values:
null_k 
shared_secret 
dh_anon 
dh_anon_512 
dh_anon_768 
rsa_anon 
rsa_anon_512 
rsa_anon_768 
rsa 
rsa_512 
rsa_768 
ecdh_anon 
ecdh_anon_113 
ecdh_anon_131 
ecdh_ecdsa 

Definition at line 112 of file wtls_pdu.h.

00112                          {
00113     null_k,
00114     shared_secret,
00115     dh_anon,
00116     dh_anon_512,
00117     dh_anon_768,
00118     rsa_anon,
00119     rsa_anon_512,
00120     rsa_anon_768,
00121     rsa,
00122     rsa_512,
00123     rsa_768,
00124     ecdh_anon,
00125     ecdh_anon_113,
00126     ecdh_anon_131,
00127     ecdh_ecdsa,
00128 } KeyExchangeSuite;

enum pubkey_algo
 

Enumeration values:
rsa_pubkey 
diffie_hellman_pubkey 
elliptic_curve_pubkey 

Definition at line 130 of file wtls_pdu.h.

00130                          {
00131     rsa_pubkey,
00132     diffie_hellman_pubkey,
00133     elliptic_curve_pubkey,
00134 } PublicKeyAlgorithm;

enum public_key_type
 

Enumeration values:
rsa_key 
ecdh_key 
ecdsa_key 

Definition at line 144 of file wtls_pdu.h.

00144                              {
00145     rsa_key = 2,
00146     ecdh_key = 3,
00147     ecdsa_key = 4
00148 } PublicKeyType;

enum sig_algo
 

Enumeration values:
anonymous 
ecdsa_sha 
rsa_sha 

Definition at line 98 of file wtls_pdu.h.

00098                       {
00099     anonymous,
00100     ecdsa_sha,
00101     rsa_sha,
00102 } SignatureAlgorithm;

enum wtls_pdu_modes
 

Enumeration values:
ChangeCipher_PDU 
Alert_PDU 
Handshake_PDU 
Application_PDU 

Definition at line 68 of file wtls_pdu.h.

00068                             {
00069     ChangeCipher_PDU = 1,
00070     Alert_PDU,
00071     Handshake_PDU,
00072     Application_PDU
00073 } wtls_pdu_modes;


Function Documentation

Octstr* wtls_pack_payloadlist List payloadlist  ) 
 

void wtls_payload_destroy wtls_Payload payload  ) 
 

Octstr* wtls_payload_pack wtls_Payload payload  ) 
 

wtls_Payload* wtls_payload_unpack Octstr data  ) 
 

wtls_PDU* wtls_pdu_create int  type  ) 
 

void wtls_pdu_destroy wtls_PDU msg  ) 
 

void wtls_pdu_dump wtls_PDU msg,
int  level
 

wtls_Payload* wtls_pdu_pack wtls_PDU pdu,
WTLSMachine wtls_machine
 

wtls_PDU* wtls_pdu_unpack wtls_Payload payload,
WTLSMachine wtls_machine
 

List* wtls_unpack_payloadlist Octstr data  ) 
 

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