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

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  certificates
 
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 struct random Random
 
typedef struct ecpoint ECPoint
 
typedef ECPoint ECPublicKey
 
typedef struct dhpublickey DHPublicKey
 
typedef struct rsa_public_key RSAPublicKey
 
typedef struct public_key PublicKey
 
typedef struct identifier Identifier
 
typedef struct eccurve ECCurve
 
typedef struct dh_parameters DHParameters
 
typedef struct ec_parameters ECParameters
 
typedef struct parameter_set ParameterSet
 
typedef struct parameter_specifier ParameterSpecifier
 
typedef struct key_exchange_id KeyExchangeId
 
typedef struct signature Signature
 
typedef struct to_be_signed_cert ToBeSignedCertificate
 
typedef struct wtls_cert WTLSCertificate
 
typedef struct rsa_secret RSASecret
 
typedef struct rsa_encrypted_secret RSAEncryptedSecret
 
typedef struct cipher_suite CipherSuite
 
typedef struct cert_request CertificateRequest
 
typedef struct cert_verify CertificateVerify
 
typedef struct hello_request HelloRequest
 
typedef struct client_hello ClientHello
 
typedef struct server_hello ServerHello
 
typedef struct certificate Certificate
 
typedef struct server_key_exchange ServerKeyExchange
 
typedef struct client_key_exchange ClientKeyExchange
 
typedef struct finished Finished
 
typedef struct server_hello_done ServerHelloDone
 
typedef struct cc ChangeCipher
 
typedef struct alert Alert
 
typedef struct certificates Certificates
 
typedef struct handshake Handshake
 
typedef struct application Application
 
typedef struct wtls_pdu wtls_PDU
 
typedef struct 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 }
 
enum  AlertLevel { warning_alert = 1, critical_alert, fatal_alert }
 
enum  AlertDescription {
  connection_close_notify = 0, session_close_notify, no_connection = 5, unexpected_message = 10,
  time_required, bad_record_mac = 20, decryption_failed, record_overflow,
  decompression_failure = 30, handshake_failure = 40, bad_certificate = 42, unsupported_certificate,
  certificate_revoked, certificate_expired, certificate_unknown, illegal_parameter,
  unknown_ca, access_denied, decode_error, decrypt_error,
  unknown_key_id, disabled_key_id, key_exchange_disabled, session_not_ready,
  unknown_parameter_index, duplicate_finished_received, export_restriction = 60, protocol_version = 70,
  insufficient_security, internal_error = 80, user_canceled = 90, no_renegotiation = 100
}
 

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, int seqnum)
 
void wtls_payload_dump (wtls_Payload *msg, int level)
 
void wtls_pldList_destroy (List *pldList)
 
void wtls_payload_destroy (wtls_Payload *payload)
 
Listwtls_unpack_payloadlist (Octstr *data)
 
Octstrwtls_pack_payloadlist (List *payloadlist, int seqnum)
 

Typedef Documentation

◆ Alert

typedef struct alert Alert

◆ Application

typedef struct application Application

◆ Certificate

typedef struct certificate Certificate

◆ CertificateFormat

◆ CertificateRequest

◆ Certificates

typedef struct certificates Certificates

◆ CertificateVerify

◆ ChangeCipher

typedef struct cc ChangeCipher

◆ CipherSuite

typedef struct cipher_suite CipherSuite

◆ ClientHello

typedef struct client_hello ClientHello

◆ ClientKeyExchange

◆ CompressionMethod

◆ DHParameters

typedef struct dh_parameters DHParameters

◆ DHPublicKey

typedef struct dhpublickey DHPublicKey

◆ ECBasisType

typedef enum ecbasistype ECBasisType

◆ ECCurve

typedef struct eccurve ECCurve

◆ ECField

typedef enum ecfield ECField

◆ ECParameters

typedef struct ec_parameters ECParameters

◆ ECPoint

typedef struct ecpoint ECPoint

◆ ECPublicKey

Definition at line 164 of file wtls_pdu.h.

◆ Finished

typedef struct finished Finished

◆ Handshake

typedef struct handshake Handshake

◆ HandshakeType

◆ HelloRequest

typedef struct hello_request HelloRequest

◆ Identifier

typedef struct identifier Identifier

◆ IdentifierType

◆ KeyExchangeId

◆ KeyExchangeSuite

◆ ParameterSet

typedef struct parameter_set ParameterSet

◆ ParameterSpecifier

◆ PublicKey

typedef struct public_key PublicKey

◆ PublicKeyAlgorithm

◆ PublicKeyType

◆ Random

typedef struct random Random

◆ RSAEncryptedSecret

◆ RSAPublicKey

typedef struct rsa_public_key RSAPublicKey

◆ RSASecret

typedef struct rsa_secret RSASecret

◆ ServerHello

typedef struct server_hello ServerHello

◆ ServerHelloDone

◆ ServerKeyExchange

◆ Signature

typedef struct signature Signature

◆ SignatureAlgorithm

◆ ToBeSignedCertificate

◆ wtls_Payload

typedef struct wtls_payload wtls_Payload

◆ wtls_PDU

typedef struct wtls_pdu wtls_PDU

◆ wtls_pdu_modes

◆ WTLSCertificate

typedef struct wtls_cert WTLSCertificate

Enumeration Type Documentation

◆ AlertDescription

Enumerator
connection_close_notify 
session_close_notify 
no_connection 
unexpected_message 
time_required 
bad_record_mac 
decryption_failed 
record_overflow 
decompression_failure 
handshake_failure 
bad_certificate 
unsupported_certificate 
certificate_revoked 
certificate_expired 
certificate_unknown 
illegal_parameter 
unknown_ca 
access_denied 
decode_error 
decrypt_error 
unknown_key_id 
disabled_key_id 
key_exchange_disabled 
session_not_ready 
unknown_parameter_index 
duplicate_finished_received 
export_restriction 
protocol_version 
insufficient_security 
internal_error 
user_canceled 
no_renegotiation 

Definition at line 371 of file wtls_pdu.h.

371  {
374  no_connection = 5,
375  unexpected_message = 10,
377  bad_record_mac = 20,
381  handshake_failure = 40,
382  bad_certificate = 42,
388  unknown_ca,
390  decode_error,
398  export_restriction = 60,
399  protocol_version = 70,
401  internal_error = 80,
402  user_canceled = 90,
403  no_renegotiation = 100
AlertDescription
Definition: wtls_pdu.h:371

◆ AlertLevel

enum AlertLevel
Enumerator
warning_alert 
critical_alert 
fatal_alert 

Definition at line 365 of file wtls_pdu.h.

365  {
366  warning_alert = 1,
369 } AlertLevel;
AlertLevel
Definition: wtls_pdu.h:365

◆ certificateformat

Enumerator
WTLSCert 
X509Cert 
X968Cert 

Definition at line 93 of file wtls_pdu.h.

93  {
94  WTLSCert = 1,
95  X509Cert,
96  X968Cert
enum certificateformat CertificateFormat

◆ compmethod

enum compmethod
Enumerator
null_comp 

Definition at line 89 of file wtls_pdu.h.

89  {
90  null_comp = 0
enum compmethod CompressionMethod

◆ ecbasistype

Enumerator
ec_basis_onb 
ec_basis_trinomial 
ec_basis_pentanomial 
ec_basis_polynomial 

Definition at line 143 of file wtls_pdu.h.

◆ ecfield

enum ecfield
Enumerator
ec_prime_p 
ec_characteristic_two 

Definition at line 150 of file wtls_pdu.h.

150  {
151  ec_prime_p,
153 } ECField;
enum ecfield ECField

◆ handshake_type

Enumerator
hello_request 
client_hello 
server_hello 
certificate 
server_key_exchange 
certificate_request 
server_hello_done 
certificate_verify 
client_key_exchange 
finished 

Definition at line 76 of file wtls_pdu.h.

◆ identifier_type

Enumerator
null 
text 
binary 
key_hash_sha 
x509_name 

Definition at line 129 of file wtls_pdu.h.

129  {
130  null = 0,
131  text,
132  binary,
133  key_hash_sha = 254,
134  x509_name = 255
Definition: wtls_pdu.h:130
Definition: wtls_pdu.h:131
enum identifier_type IdentifierType

◆ keyex_suite

Enumerator
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 105 of file wtls_pdu.h.

105  {
106  null_k,
108  dh_anon,
109  dh_anon_512,
110  dh_anon_768,
111  rsa_anon,
112  rsa_anon_512,
113  rsa_anon_768,
114  rsa,
115  rsa_512,
116  rsa_768,
117  ecdh_anon,
120  ecdh_ecdsa,
enum keyex_suite KeyExchangeSuite
Definition: wtls_pdu.h:114

◆ pubkey_algo

Enumerator
rsa_pubkey 
diffie_hellman_pubkey 
elliptic_curve_pubkey 

Definition at line 123 of file wtls_pdu.h.

◆ public_key_type

Enumerator
rsa_key 
ecdh_key 
ecdsa_key 

Definition at line 137 of file wtls_pdu.h.

137  {
138  rsa_key = 2,
139  ecdh_key = 3,
140  ecdsa_key = 4
141 } PublicKeyType;
enum public_key_type PublicKeyType

◆ sig_algo

enum sig_algo
Enumerator
anonymous 
ecdsa_sha 
rsa_sha 

Definition at line 99 of file wtls_pdu.h.

99  {
100  anonymous,
101  ecdsa_sha,
102  rsa_sha,
enum sig_algo SignatureAlgorithm

◆ wtls_pdu_modes

Enumerator
ChangeCipher_PDU 
Alert_PDU 
Handshake_PDU 
Application_PDU 

Definition at line 69 of file wtls_pdu.h.

Function Documentation

◆ wtls_pack_payloadlist()

Octstr* wtls_pack_payloadlist ( List payloadlist,
int  seqnum 
)

◆ wtls_payload_destroy()

void wtls_payload_destroy ( wtls_Payload payload)

◆ wtls_payload_dump()

void wtls_payload_dump ( wtls_Payload msg,
int  level 
)

◆ wtls_payload_pack()

Octstr* wtls_payload_pack ( wtls_Payload payload,
int  seqnum 
)

◆ wtls_payload_unpack()

wtls_Payload* wtls_payload_unpack ( Octstr data)

◆ wtls_pdu_create()

wtls_PDU* wtls_pdu_create ( int  type)

◆ wtls_pdu_destroy()

void wtls_pdu_destroy ( wtls_PDU msg)

◆ wtls_pdu_dump()

void wtls_pdu_dump ( wtls_PDU msg,
int  level 
)

◆ wtls_pdu_pack()

wtls_Payload* wtls_pdu_pack ( wtls_PDU pdu,
WTLSMachine wtls_machine 
)

◆ wtls_pdu_unpack()

wtls_PDU* wtls_pdu_unpack ( wtls_Payload payload,
WTLSMachine wtls_machine 
)

◆ wtls_pldList_destroy()

void wtls_pldList_destroy ( List pldList)

◆ wtls_unpack_payloadlist()

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.