23 #define _TLS_CHANGE_CIPHER_SPEC_MESSAGE_H_ |
23 #define _TLS_CHANGE_CIPHER_SPEC_MESSAGE_H_ |
24 |
24 |
25 #include "eap_tools.h" |
25 #include "eap_tools.h" |
26 #include "eap_array.h" |
26 #include "eap_array.h" |
27 #include "abs_tls_change_cipher_spec.h" |
27 #include "abs_tls_change_cipher_spec.h" |
|
28 #include "eap_am_export.h" |
|
29 // Start: added by script change_export_macros.sh. |
|
30 #if defined(EAP_NO_EXPORT_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H) |
|
31 #define EAP_CLASS_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_NONSHARABLE |
|
32 #define EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H |
|
33 #define EAP_C_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H |
|
34 #define EAP_FUNC_EXPORT_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H |
|
35 #define EAP_C_FUNC_EXPORT_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H |
|
36 #elif defined(EAP_EXPORT_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H) |
|
37 #define EAP_CLASS_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_EXPORT |
|
38 #define EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_FUNC_EXPORT |
|
39 #define EAP_C_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_C_FUNC_EXPORT |
|
40 #define EAP_FUNC_EXPORT_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_FUNC_EXPORT |
|
41 #define EAP_C_FUNC_EXPORT_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_C_FUNC_EXPORT |
|
42 #else |
|
43 #define EAP_CLASS_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_IMPORT |
|
44 #define EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_FUNC_IMPORT |
|
45 #define EAP_C_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H EAP_C_FUNC_IMPORT |
|
46 #define EAP_FUNC_EXPORT_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H |
|
47 #define EAP_C_FUNC_EXPORT_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H |
|
48 #endif |
|
49 // End: added by script change_export_macros.sh. |
|
50 |
28 |
51 |
29 |
52 |
30 /** @file */ |
53 /** @file */ |
31 |
54 |
32 /** |
55 /** |
42 |
65 |
43 /// This class defines one TLS change cipher spec message. |
66 /// This class defines one TLS change cipher spec message. |
44 /** |
67 /** |
45 * This class includes data of TLS-ChangeCipherSpec message. |
68 * This class includes data of TLS-ChangeCipherSpec message. |
46 */ |
69 */ |
47 class EAP_EXPORT tls_change_cipher_spec_message_c |
70 class EAP_CLASS_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H tls_change_cipher_spec_message_c |
48 { |
71 { |
49 private: |
72 private: |
50 //-------------------------------------------------- |
73 //-------------------------------------------------- |
51 |
74 |
52 /// This is pointer to the tools class. @see abs_eap_am_tools_c. |
75 /// This is pointer to the tools class. @see abs_eap_am_tools_c. |
71 |
94 |
72 /** |
95 /** |
73 * The set_is_valid() function sets the state of the object valid. |
96 * The set_is_valid() function sets the state of the object valid. |
74 * The creator of this object calls this function after it is initialized. |
97 * The creator of this object calls this function after it is initialized. |
75 */ |
98 */ |
76 EAP_FUNC_IMPORT void set_is_valid(); |
99 EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H void set_is_valid(); |
77 |
100 |
78 //-------------------------------------------------- |
101 //-------------------------------------------------- |
79 protected: |
102 protected: |
80 //-------------------------------------------------- |
103 //-------------------------------------------------- |
81 |
104 |
84 //-------------------------------------------------- |
107 //-------------------------------------------------- |
85 |
108 |
86 /** |
109 /** |
87 * Destructor does nothing special. |
110 * Destructor does nothing special. |
88 */ |
111 */ |
89 EAP_FUNC_IMPORT virtual ~tls_change_cipher_spec_message_c(); |
112 EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H virtual ~tls_change_cipher_spec_message_c(); |
90 |
113 |
91 /** |
114 /** |
92 * Constructor initializes class. |
115 * Constructor initializes class. |
93 */ |
116 */ |
94 EAP_FUNC_IMPORT tls_change_cipher_spec_message_c( |
117 EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H tls_change_cipher_spec_message_c( |
95 abs_eap_am_tools_c * const tools, |
118 abs_eap_am_tools_c * const tools, |
96 abs_tls_change_cipher_spec_c * const change_cipher_spec, |
119 abs_tls_change_cipher_spec_c * const change_cipher_spec, |
97 const bool is_client); |
120 const bool is_client); |
98 |
121 |
99 /** |
122 /** |
100 * Object must indicate it's validity. |
123 * Object must indicate it's validity. |
101 * If object initialization fails this function must return false. |
124 * If object initialization fails this function must return false. |
102 * @return This function returns the validity of this object. |
125 * @return This function returns the validity of this object. |
103 */ |
126 */ |
104 EAP_FUNC_IMPORT bool get_is_valid(); |
127 EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H bool get_is_valid(); |
105 |
128 |
106 /** |
129 /** |
107 * This function creates data of the Handshake message to internal buffer. |
130 * This function creates data of the Handshake message to internal buffer. |
108 * Later this data is added to final TLS-record buffer. |
131 * Later this data is added to final TLS-record buffer. |
109 */ |
132 */ |
110 EAP_FUNC_IMPORT eap_status_e create_message_data(); |
133 EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H eap_status_e create_message_data(); |
111 |
134 |
112 |
135 |
113 /** |
136 /** |
114 * This function sets the change cipher spec message type. |
137 * This function sets the change cipher spec message type. |
115 */ |
138 */ |
116 EAP_FUNC_IMPORT eap_status_e set_change_cipher_spec_type(tls_change_cipher_spec_type_e type); |
139 EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H eap_status_e set_change_cipher_spec_type(tls_change_cipher_spec_type_e type); |
117 |
140 |
118 /** |
141 /** |
119 * This function gets the change cipher spec message type. |
142 * This function gets the change cipher spec message type. |
120 */ |
143 */ |
121 EAP_FUNC_IMPORT tls_change_cipher_spec_type_e get_change_cipher_spec_type() const; |
144 EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H tls_change_cipher_spec_type_e get_change_cipher_spec_type() const; |
122 |
145 |
123 /** |
146 /** |
124 * This function adds data of the TLS-CahneCipherSpec data message from m_tls_change_cipher_spec_message_buffer to tls_message_buffer. |
147 * This function adds data of the TLS-CahneCipherSpec data message from m_tls_change_cipher_spec_message_buffer to tls_message_buffer. |
125 */ |
148 */ |
126 EAP_FUNC_IMPORT eap_status_e add_message_data( |
149 EAP_FUNC_VISIBILITY_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H eap_status_e add_message_data( |
127 eap_variable_data_c * const tls_message_buffer); |
150 eap_variable_data_c * const tls_message_buffer); |
128 |
151 |
129 // |
152 // |
130 //-------------------------------------------------- |
153 //-------------------------------------------------- |
131 }; // class tls_change_cipher_spec_message_c |
154 }; // class tls_change_cipher_spec_message_c |