extern "C" {
#endif
-#define DTLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES 1
-
#define DTLS1_VERSION 0x0100
#define DTLS1_VERSION_MAJOR 0x01
#define DTLS1_VERSION_MINOR 0x00
typedef struct dtls1_bitmap_st
{
- unsigned long long map;
+ PQ_64BIT map;
unsigned long length; /* sizeof the bitmap in bits */
- unsigned long long max_seq_num; /* max record number seen so far */
+ PQ_64BIT max_seq_num; /* max record number seen so far */
} DTLS1_BITMAP;
struct hm_header_st
unsigned short seq;
unsigned long frag_off;
unsigned long frag_len;
- unsigned int is_ccs;
+ unsigned int is_ccs;
};
struct ccs_header_st
};
typedef struct record_pqueue_st
- {
- unsigned short epoch;
- pqueue q;
- } record_pqueue;
+ {
+ unsigned short epoch;
+ pqueue q;
+ } record_pqueue;
typedef struct hm_fragment_st
- {
- struct hm_header_st msg_header;
- unsigned char *fragment;
- } hm_fragment;
+ {
+ struct hm_header_st msg_header;
+ unsigned char *fragment;
+ } hm_fragment;
typedef struct dtls1_state_st
{
unsigned short handshake_read_seq;
- /* only matters for handshake messages */
- unsigned long long next_expected_seq_num;
-
/* Received handshake records (processed and unprocessed) */
record_pqueue unprocessed_rcds;
- record_pqueue processed_rcds;
+ record_pqueue processed_rcds;
- /* Buffered handshake messages */
- pqueue buffered_messages;
+ /* Buffered handshake messages */
+ pqueue buffered_messages;
/* Buffered (sent) handshake records */
pqueue sent_messages;
SSL3_RECORD rrec;
} DTLS1_RECORD_DATA;
-/* client methods */
-int dtls1_client_hello(SSL *s);
-int dtls1_send_client_certificate(SSL *s);
-int dtls1_send_client_key_exchange(SSL *s);
-int dtls1_send_client_verify(SSL *s);
-
-
-/* server methods */
-int dtls1_send_hello_request(SSL *s);
-int dtls1_send_server_hello(SSL *s);
-int dtls1_send_server_certificate(SSL *s);
-int dtls1_send_server_key_exchange(SSL *s);
-int dtls1_send_certificate_request(SSL *s);
-int dtls1_send_server_done(SSL *s);
-
-/* common methods */
-int dtls1_send_change_cipher_spec(SSL *s, int a, int b);
-int dtls1_send_finished(SSL *s, int a, int b, const char *sender, int slen);
-unsigned long dtls1_output_cert_chain(SSL *s, X509 *x);
-int dtls1_read_failed(SSL *s, int code);
-int dtls1_buffer_message(SSL *s, int ccs);
-int dtls1_retransmit_message(SSL *s, unsigned short seq,
- unsigned long frag_off, int *found);
-void dtls1_clear_record_buffer(SSL *s);
-void dtls1_get_message_header(unsigned char *data, struct hm_header_st *msg_hdr);
-void dtls1_get_ccs_header(unsigned char *data, struct ccs_header_st *ccs_hdr);
-void dtls1_reset_seq_numbers(SSL *s, int rw);
/* Timeout multipliers (timeout slice is defined in apps/timeouts.h */
#define DTLS1_TMO_READ_COUNT 2