|
enum | SecurityMode { NO_SECURITY = 0,
TLS,
DTLS
} |
|
|
class | Test_M2MConnectionSecurity |
|
Connects the client to the server.
- Parameters
-
connHandler | The ConnectionHandler object that maintains the socket. |
- Returns
- Returns the state of the connection. Successful or not.
int M2MConnectionSecurity::continue_connecting |
( |
| ) |
|
Continues connectivity logic for a secure connection.
- Returns
- Returns an error code if any while continuing the connection sequence.
int M2MConnectionSecurity::read |
( |
unsigned char * |
buffer, |
|
|
uint16_t |
len |
|
) |
| |
Reads the data received from the server.
- Parameters
-
message | The data to be read. |
len | The length of the data. |
- Returns
- Indicates whether the data is read successfully or not.
int M2MConnectionSecurity::send_message |
( |
unsigned char * |
message, |
|
|
int |
len |
|
) |
| |
Sends data to the server.
- Parameters
-
message | The data to be sent. |
len | The length of the data. |
- Returns
- Indicates whether the data is sent successfully or not.
int M2MConnectionSecurity::set_dtls_socket_callback |
( |
void(*)(void *) |
foo, |
|
|
void * |
argument |
|
) |
| |
Set socket information for this secure connection.
- Parameters
-
socket | Socket used with this TLS session. |
address | Pointer to the address of the server. |
- Returns
- Indicates whether the data is read successfully or not.
void M2MConnectionSecurity::set_entropy_callback |
( |
entropy_cb |
callback | ) |
|
Sets the function callback that is called by mbed Client to provide an entropy source from an application to ensure strong entropy.
- Parameters
-
entropy_callback | A function pointer that is called by mbed-client while performing a secure handshake. Function signature, if using mbed-client-mbedtls, should be int (*mbedtls_entropy_f_source_ptr)(void *data, unsigned char *output, size_t len, size_t *olen); |
void M2MConnectionSecurity::set_random_number_callback |
( |
random_number_cb |
callback | ) |
|
Sets the function callback that is called by mbed Client to fetch a random number from an application to ensure strong entropy.
- Parameters
-
random_callback | A function pointer that is called by mbed Client while performing a secure handshake. The function signature should be uint32_t (*random_number_callback)(void); |
void M2MConnectionSecurity::set_socket |
( |
void * |
socket, |
|
|
void * |
address |
|
) |
| |
Set socket information for this secure connection.
- Parameters
-
socket | Socket used with this TLS session. |
address | Pointer to the address of the server. |
- Returns
- Indicates whether the data is read successfully or not.
Starts the connection in non-blocking mode.
- Parameters
-
connHandler | The ConnectionHandler object that maintains the socket. |
- Returns
- Returns the state of the connection. Successful or not.
The documentation for this class was generated from the following file: