tinydtls
0.8.6
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
state.h
Go to the documentation of this file.
1
/*******************************************************************************
2
*
3
* Copyright (c) 2011, 2012, 2013, 2014, 2015 Olaf Bergmann (TZI) and others.
4
* All rights reserved. This program and the accompanying materials
5
* are made available under the terms of the Eclipse Public License v1.0
6
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
7
*
8
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
9
* and the Eclipse Distribution License is available at
10
* http://www.eclipse.org/org/documents/edl-v10.php.
11
*
12
* Contributors:
13
* Olaf Bergmann - initial API and implementation
14
* Hauke Mehrtens - memory optimization, ECC integration
15
*
16
*******************************************************************************/
17
23
#ifndef _DTLS_STATE_H_
24
#define _DTLS_STATE_H_
25
26
#include <sys/types.h>
27
#include <stdint.h>
28
29
#include "
global.h
"
30
#include "
hmac.h
"
31
32
typedef
enum
{
33
DTLS_STATE_INIT
= 0,
DTLS_STATE_WAIT_CLIENTHELLO
,
DTLS_STATE_WAIT_CLIENTCERTIFICATE
,
34
DTLS_STATE_WAIT_CLIENTKEYEXCHANGE
,
DTLS_STATE_WAIT_CERTIFICATEVERIFY
,
35
DTLS_STATE_WAIT_CHANGECIPHERSPEC
,
36
DTLS_STATE_WAIT_FINISHED
,
DTLS_STATE_FINISHED
,
37
/* client states */
38
DTLS_STATE_CLIENTHELLO
,
DTLS_STATE_WAIT_SERVERCERTIFICATE
,
DTLS_STATE_WAIT_SERVERKEYEXCHANGE
,
39
DTLS_STATE_WAIT_SERVERHELLODONE
,
40
41
DTLS_STATE_CONNECTED
,
42
DTLS_STATE_CLOSING
,
43
DTLS_STATE_CLOSED
44
}
dtls_state_t
;
45
46
typedef
struct
{
47
uint16_t
mseq_s
;
48
uint16_t
mseq_r
;
51
/* FIXME: dtls_security_parameters_t pending_config; */
52
53
/* temporary storage for the final handshake hash */
54
dtls_hash_ctx
hs_hash
;
55
}
dtls_hs_state_t
;
56
#endif
/* _DTLS_STATE_H_ */
DTLS_STATE_WAIT_SERVERHELLODONE
Definition:
state.h:39
DTLS_STATE_WAIT_CLIENTKEYEXCHANGE
Definition:
state.h:34
DTLS_STATE_WAIT_CLIENTHELLO
Definition:
state.h:33
DTLS_STATE_WAIT_FINISHED
Definition:
state.h:36
dtls_state_t
dtls_state_t
Definition:
state.h:32
DTLS_STATE_WAIT_CHANGECIPHERSPEC
Definition:
state.h:35
dtls_hash_ctx
dtls_sha256_ctx dtls_hash_ctx
Definition:
hmac.h:31
global.h
DTLS_STATE_FINISHED
Definition:
state.h:36
DTLS_STATE_CLOSING
Definition:
state.h:42
dtls_hs_state_t::hs_hash
dtls_hash_ctx hs_hash
Definition:
state.h:54
hmac.h
DTLS_STATE_INIT
Definition:
state.h:33
DTLS_STATE_WAIT_SERVERKEYEXCHANGE
Definition:
state.h:38
DTLS_STATE_CLOSED
Definition:
state.h:43
dtls_hs_state_t::mseq_r
uint16_t mseq_r
Definition:
state.h:48
dtls_hs_state_t
Definition:
state.h:46
DTLS_STATE_CONNECTED
Definition:
state.h:41
DTLS_STATE_WAIT_SERVERCERTIFICATE
Definition:
state.h:38
DTLS_STATE_WAIT_CLIENTCERTIFICATE
Definition:
state.h:33
DTLS_STATE_WAIT_CERTIFICATEVERIFY
Definition:
state.h:34
dtls_hs_state_t::mseq_s
uint16_t mseq_s
Definition:
state.h:47
DTLS_STATE_CLIENTHELLO
Definition:
state.h:38
Generated on Thu Oct 31 2019 17:28:28 for tinydtls by
1.8.11