ssl_context Struct Reference

#include <ssl.h>


Data Fields

int state
int major_ver
int minor_ver
unsigned char max_ver [2]
unsigned char * in_ctr
unsigned char * in_hdr
unsigned char * in_msg
unsigned char * in_offt
int read_fd
int in_msgtype
int in_msglen
int in_left
int in_hslen
int nb_zero
unsigned char * out_ctr
unsigned char * out_hdr
unsigned char * out_msg
int write_fd
int out_msgtype
int out_msglen
int out_left
int out_uoff
rsa_contextown_key
x509_certown_cert
x509_certca_chain
x509_certpeer_cert
char * peer_cn
int endpoint
int authmode
int client_auth
int verify_result
int resumed
int sidlen
unsigned char sessid [32]
unsigned char * sidtable
md5_context hs_md5
sha1_context hs_sha1
dhm_context dhm_ctx
int(* rng_f )(void *)
void * rng_d
int pmslen
unsigned char premaster [256]
unsigned char randbytes [64]
unsigned char master [48]
intcipherlist
int cipher
int keylen
int minlen
int ctxlen
void * ctx_enc
void * ctx_dec
int ivlen
unsigned char iv_enc [16]
unsigned char iv_dec [16]
int maclen
unsigned char mac_enc [32]
unsigned char mac_dec [32]


Detailed Description

Definition at line 129 of file ssl.h.


Field Documentation

int ssl_context::state

SSL handshake: current state

Definition at line 131 of file ssl.h.

Referenced by ssl_client_start(), ssl_close_notify(), ssl_parse_certificate_request(), ssl_parse_certificate_verify(), ssl_parse_client_hello(), ssl_parse_client_key_exchange(), ssl_parse_server_hello(), ssl_parse_server_hello_done(), ssl_parse_server_key_exchange(), ssl_server_start(), ssl_write_certificate(), ssl_write_certificate_request(), ssl_write_certificate_verify(), ssl_write_client_hello(), ssl_write_client_key_exchange(), ssl_write_server_hello(), ssl_write_server_hello_done(), and ssl_write_server_key_exchange().

int ssl_context::major_ver

equal to SSLV3_MAJOR_VERSION

Definition at line 136 of file ssl.h.

Referenced by ssl_parse_client_hello(), ssl_write_client_hello(), ssl_write_record(), and ssl_write_server_hello().

int ssl_context::minor_ver

either 0: SSLv3, or 1: TLSv1.0

Definition at line 137 of file ssl.h.

Referenced by ssl_calc_verify(), ssl_decrypt_buf(), ssl_derive_keys(), ssl_encrypt_buf(), ssl_parse_client_hello(), ssl_parse_client_key_exchange(), ssl_parse_server_hello(), ssl_write_certificate(), ssl_write_client_hello(), ssl_write_client_key_exchange(), ssl_write_record(), and ssl_write_server_hello().

unsigned char ssl_context::max_ver[2]

max. version supported by client

Definition at line 138 of file ssl.h.

Referenced by ssl_parse_client_hello(), ssl_parse_client_key_exchange(), ssl_write_client_hello(), and ssl_write_client_key_exchange().

unsigned char* ssl_context::in_ctr

64-bit incoming message counter

Definition at line 143 of file ssl.h.

Referenced by ssl_decrypt_buf(), ssl_free(), and ssl_init().

unsigned char* ssl_context::in_hdr

5-byte record header (in_ctr+8)

Definition at line 144 of file ssl.h.

Referenced by ssl_decrypt_buf(), ssl_init(), and ssl_parse_client_hello().

unsigned char* ssl_context::in_msg

the message payload (in_hdr+5)

Definition at line 145 of file ssl.h.

Referenced by ssl_decrypt_buf(), ssl_init(), ssl_parse_certificate_request(), ssl_parse_certificate_verify(), ssl_parse_client_hello(), ssl_parse_client_key_exchange(), ssl_parse_server_hello(), ssl_parse_server_hello_done(), ssl_parse_server_key_exchange(), and ssl_read().

unsigned char* ssl_context::in_offt

read offset in message payload

Definition at line 146 of file ssl.h.

Referenced by ssl_read().

int ssl_context::read_fd

descriptor for read operations

Definition at line 148 of file ssl.h.

Referenced by ssl_parse_client_hello().

int ssl_context::in_msgtype

record header: message type

Definition at line 149 of file ssl.h.

Referenced by ssl_decrypt_buf(), ssl_parse_certificate_request(), ssl_parse_certificate_verify(), ssl_parse_client_key_exchange(), ssl_parse_server_hello(), ssl_parse_server_hello_done(), ssl_parse_server_key_exchange(), and ssl_read().

int ssl_context::in_msglen

record header: message length

Definition at line 150 of file ssl.h.

Referenced by ssl_decrypt_buf(), and ssl_read().

int ssl_context::in_left

amount of (tcp) data read so far

Definition at line 152 of file ssl.h.

Referenced by ssl_parse_client_hello().

int ssl_context::in_hslen

current handshake message length

Definition at line 153 of file ssl.h.

Referenced by ssl_parse_certificate_verify(), ssl_parse_client_key_exchange(), ssl_parse_server_hello(), ssl_parse_server_hello_done(), and ssl_parse_server_key_exchange().

int ssl_context::nb_zero

# of 0-length encrypted messages

Definition at line 154 of file ssl.h.

Referenced by ssl_decrypt_buf().

unsigned char* ssl_context::out_ctr

64-bit outgoing message counter

Definition at line 159 of file ssl.h.

Referenced by ssl_encrypt_buf(), ssl_free(), and ssl_init().

unsigned char* ssl_context::out_hdr

5-byte record header (out_ctr+8)

Definition at line 160 of file ssl.h.

Referenced by ssl_flush_output(), ssl_init(), and ssl_write_record().

unsigned char* ssl_context::out_msg

the message payload (out_hdr+5)

Definition at line 161 of file ssl.h.

Referenced by ssl_close_notify(), ssl_encrypt_buf(), ssl_init(), ssl_write(), ssl_write_certificate(), ssl_write_certificate_request(), ssl_write_certificate_verify(), ssl_write_client_hello(), ssl_write_client_key_exchange(), ssl_write_record(), ssl_write_server_hello(), ssl_write_server_hello_done(), and ssl_write_server_key_exchange().

int ssl_context::write_fd

descriptor for write operations

Definition at line 163 of file ssl.h.

Referenced by ssl_flush_output(), and ssl_write_record().

int ssl_context::out_msgtype

record header: message type

Definition at line 164 of file ssl.h.

Referenced by ssl_close_notify(), ssl_encrypt_buf(), ssl_write(), ssl_write_certificate(), ssl_write_certificate_request(), ssl_write_certificate_verify(), ssl_write_client_hello(), ssl_write_client_key_exchange(), ssl_write_record(), ssl_write_server_hello(), ssl_write_server_hello_done(), and ssl_write_server_key_exchange().

int ssl_context::out_msglen

record header: message length

Definition at line 165 of file ssl.h.

Referenced by ssl_close_notify(), ssl_encrypt_buf(), ssl_flush_output(), ssl_write(), ssl_write_certificate(), ssl_write_certificate_request(), ssl_write_certificate_verify(), ssl_write_client_hello(), ssl_write_client_key_exchange(), ssl_write_record(), ssl_write_server_hello(), ssl_write_server_hello_done(), and ssl_write_server_key_exchange().

int ssl_context::out_left

amount of data not yet written

Definition at line 167 of file ssl.h.

Referenced by ssl_flush_output(), and ssl_write_record().

int ssl_context::out_uoff

offset in user-supplied buffer

Definition at line 168 of file ssl.h.

Referenced by ssl_write().

rsa_context* ssl_context::own_key

own RSA private key

Definition at line 173 of file ssl.h.

Referenced by ssl_parse_certificate_request(), ssl_parse_client_key_exchange(), ssl_write_certificate_verify(), and ssl_write_server_key_exchange().

x509_cert* ssl_context::own_cert

own X.509 certificate

Definition at line 174 of file ssl.h.

Referenced by ssl_parse_certificate_request(), and ssl_write_certificate().

x509_cert* ssl_context::ca_chain

own trusted CA chain

Definition at line 175 of file ssl.h.

Referenced by ssl_write_certificate_request().

x509_cert* ssl_context::peer_cert

peer X.509 cert chain

Definition at line 176 of file ssl.h.

Referenced by ssl_free(), ssl_parse_certificate_verify(), ssl_parse_server_key_exchange(), and ssl_write_client_key_exchange().

char* ssl_context::peer_cn

expected peer CN

Definition at line 177 of file ssl.h.

int ssl_context::endpoint

0: client, 1: server

Definition at line 179 of file ssl.h.

Referenced by ssl_derive_keys(), ssl_handshake(), ssl_set_endpoint(), and ssl_write_certificate().

int ssl_context::authmode

verification mode

Definition at line 180 of file ssl.h.

Referenced by ssl_parse_certificate_verify(), and ssl_write_certificate_request().

int ssl_context::client_auth

flag for client auth.

Definition at line 181 of file ssl.h.

Referenced by ssl_parse_certificate_request(), ssl_parse_server_hello_done(), ssl_write_certificate(), and ssl_write_certificate_verify().

int ssl_context::verify_result

verification result

Definition at line 182 of file ssl.h.

Referenced by ssl_get_verify_result().

int ssl_context::resumed

session resuming flag

Definition at line 187 of file ssl.h.

Referenced by ssl_derive_keys(), ssl_parse_server_hello(), and ssl_write_server_hello().

int ssl_context::sidlen

session id length

Definition at line 188 of file ssl.h.

Referenced by ssl_get_session(), ssl_init(), ssl_parse_client_hello(), ssl_parse_server_hello(), ssl_set_session(), ssl_write_client_hello(), and ssl_write_server_hello().

unsigned char ssl_context::sessid[32]

session id

Definition at line 189 of file ssl.h.

Referenced by ssl_get_session(), ssl_init(), ssl_parse_client_hello(), ssl_parse_server_hello(), ssl_set_session(), ssl_write_client_hello(), and ssl_write_server_hello().

unsigned char* ssl_context::sidtable

table of session IDs

Definition at line 190 of file ssl.h.

Referenced by ssl_get_session(), and ssl_set_session().

md5_context ssl_context::hs_md5

MD5( Handshake msgs )

Definition at line 195 of file ssl.h.

Referenced by ssl_calc_verify(), ssl_parse_client_hello(), ssl_write_client_hello(), and ssl_write_record().

sha1_context ssl_context::hs_sha1

SHA1( Handshake msgs )

Definition at line 196 of file ssl.h.

Referenced by ssl_calc_verify(), ssl_parse_client_hello(), ssl_write_client_hello(), and ssl_write_record().

dhm_context ssl_context::dhm_ctx

DHM key exchange

Definition at line 197 of file ssl.h.

Referenced by ssl_free(), ssl_parse_client_key_exchange(), ssl_parse_server_key_exchange(), ssl_write_client_key_exchange(), and ssl_write_server_key_exchange().

int(* ssl_context::rng_f)(void *)

RNG function

Referenced by ssl_write_client_hello(), ssl_write_client_key_exchange(), ssl_write_server_hello(), and ssl_write_server_key_exchange().

void* ssl_context::rng_d

RNG data

Definition at line 200 of file ssl.h.

Referenced by ssl_write_client_hello(), ssl_write_client_key_exchange(), ssl_write_server_hello(), and ssl_write_server_key_exchange().

int ssl_context::pmslen

premaster length

Definition at line 202 of file ssl.h.

Referenced by ssl_derive_keys(), ssl_parse_client_key_exchange(), and ssl_write_client_key_exchange().

unsigned char ssl_context::premaster[256]

premaster secret

Definition at line 203 of file ssl.h.

Referenced by ssl_derive_keys(), ssl_parse_client_key_exchange(), and ssl_write_client_key_exchange().

unsigned char ssl_context::randbytes[64]

random bytes

Definition at line 204 of file ssl.h.

Referenced by ssl_derive_keys(), ssl_parse_client_hello(), ssl_parse_server_hello(), ssl_parse_server_key_exchange(), ssl_write_client_hello(), ssl_write_server_hello(), and ssl_write_server_key_exchange().

unsigned char ssl_context::master[48]

master secret

Definition at line 205 of file ssl.h.

Referenced by ssl_calc_verify(), ssl_derive_keys(), ssl_get_session(), ssl_init(), and ssl_set_session().

int* ssl_context::cipherlist

accepted ciphersuites

Definition at line 207 of file ssl.h.

Referenced by ssl_parse_client_hello(), ssl_parse_server_hello(), and ssl_write_client_hello().

int ssl_context::cipher

current chosen cipher

Definition at line 208 of file ssl.h.

Referenced by ssl_derive_keys(), ssl_get_session(), ssl_parse_client_hello(), ssl_parse_client_key_exchange(), ssl_parse_server_hello(), ssl_parse_server_key_exchange(), ssl_set_session(), ssl_write_client_key_exchange(), ssl_write_server_hello(), and ssl_write_server_key_exchange().

int ssl_context::keylen

symmetric key length

Definition at line 209 of file ssl.h.

Referenced by ssl_derive_keys().

int ssl_context::minlen

min. ciphertext length

Definition at line 210 of file ssl.h.

Referenced by ssl_decrypt_buf(), and ssl_derive_keys().

int ssl_context::ctxlen

cipher context length

Definition at line 212 of file ssl.h.

Referenced by ssl_derive_keys(), and ssl_free().

void* ssl_context::ctx_enc

encryption context

Definition at line 213 of file ssl.h.

Referenced by ssl_derive_keys(), ssl_encrypt_buf(), and ssl_free().

void* ssl_context::ctx_dec

decryption context

Definition at line 214 of file ssl.h.

Referenced by ssl_decrypt_buf(), ssl_derive_keys(), and ssl_free().

int ssl_context::ivlen

IV length

Definition at line 216 of file ssl.h.

Referenced by ssl_decrypt_buf(), ssl_derive_keys(), and ssl_encrypt_buf().

unsigned char ssl_context::iv_enc[16]

IV (encryption)

Definition at line 217 of file ssl.h.

Referenced by ssl_derive_keys(), and ssl_encrypt_buf().

unsigned char ssl_context::iv_dec[16]

IV (decryption)

Definition at line 218 of file ssl.h.

Referenced by ssl_decrypt_buf(), and ssl_derive_keys().

int ssl_context::maclen

MAC length

Definition at line 220 of file ssl.h.

Referenced by ssl_decrypt_buf(), ssl_derive_keys(), and ssl_encrypt_buf().

unsigned char ssl_context::mac_enc[32]

MAC (encryption)

Definition at line 221 of file ssl.h.

Referenced by ssl_derive_keys(), and ssl_encrypt_buf().

unsigned char ssl_context::mac_dec[32]

MAC (decryption)

Definition at line 222 of file ssl.h.

Referenced by ssl_decrypt_buf(), and ssl_derive_keys().


The documentation for this struct was generated from the following file:
Generated on Fri May 16 14:49:58 2008 for Mobile-C by  doxygen 1.5.4