37
37
/* *
38
38
* TLSSocket is a wrapper around Socket for interacting with TLS servers.
39
39
*
40
- * TLSSocketWrapper can use any Socket as a transport and after
41
- * completing the TLS handshake, can be used as any Socket would be used.
40
+ * TLSSocketWrapper can use any Socket as a transport. After
41
+ * completing the TLS handshake, it can be used as any Socket would be used.
42
42
*
43
43
*/
44
44
class TLSSocketWrapper : public Socket {
@@ -67,7 +67,7 @@ class TLSSocketWrapper : public Socket {
67
67
68
68
/* * Set hostname.
69
69
*
70
- * TLSSocket requires hostname that is used to verify the certificate.
70
+ * TLSSocket requires hostname used to verify the certificate.
71
71
* If hostname is not given in constructor, this function must be used before
72
72
* starting the TLS handshake.
73
73
*
@@ -77,7 +77,7 @@ class TLSSocketWrapper : public Socket {
77
77
78
78
/* * Sets the certification of Root CA.
79
79
*
80
- * @param root_ca Root CA Certificate in any mbed-TLS supported format.
80
+ * @param root_ca Root CA Certificate in any Mbed TLS- supported format.
81
81
* @param len Length of certificate (including terminating 0 for PEM).
82
82
* @return 0 on success, negative error code on failure.
83
83
*/
@@ -92,10 +92,10 @@ class TLSSocketWrapper : public Socket {
92
92
93
93
/* * Sets client certificate, and client private key.
94
94
*
95
- * @param client_cert client certification in PEM or DER format.
96
- * @param client_cert_len certificate size including the terminating null byte for PEM data.
97
- * @param client_private_key_pem client private key in PEM or DER format.
98
- * @param client_private_key_len key size including the terminating null byte for PEM data
95
+ * @param client_cert Client certification in PEM or DER format.
96
+ * @param client_cert_len Certificate size including the terminating null byte for PEM data.
97
+ * @param client_private_key_pem Client private key in PEM or DER format.
98
+ * @param client_private_key_len Key size including the terminating null byte for PEM data
99
99
* @return 0 on success, negative error code on failure.
100
100
*/
101
101
nsapi_error_t set_client_cert_key (const void *client_cert, size_t client_cert_len,
@@ -109,7 +109,7 @@ class TLSSocketWrapper : public Socket {
109
109
*/
110
110
nsapi_error_t set_client_cert_key (const char *client_cert_pem, const char *client_private_key_pem);
111
111
112
- /* * Send data over a TLS socket
112
+ /* * Send data over a TLS socket.
113
113
*
114
114
* The socket must be connected to a remote host. Returns the number of
115
115
* bytes sent from the buffer.
@@ -153,7 +153,7 @@ class TLSSocketWrapper : public Socket {
153
153
#if defined(MBEDTLS_X509_CRT_PARSE_C) || defined(DOXYGEN_ONLY)
154
154
/* * Get own certificate directly from Mbed TLS.
155
155
*
156
- * @return internal Mbed TLS X509 structure.
156
+ * @return Internal Mbed TLS X509 structure.
157
157
*/
158
158
mbedtls_x509_crt *get_own_cert ();
159
159
@@ -203,7 +203,7 @@ class TLSSocketWrapper : public Socket {
203
203
* Underlying transport socket should already be connected.
204
204
*
205
205
* Root CA certification must be set by set_ssl_ca_pem() before
206
- * call this function.
206
+ * calling this function.
207
207
*
208
208
* For non-blocking purposes, this functions needs to know whether this
209
209
* was a first call to Socket::connect() API so that NSAPI_ERROR_INPROGRESS
@@ -225,20 +225,20 @@ class TLSSocketWrapper : public Socket {
225
225
/* * Continue already initialized handshake */
226
226
nsapi_error_t continue_handshake ();
227
227
/* *
228
- * Helper for pretty-printing mbed TLS error codes
228
+ * Helper for pretty-printing Mbed TLS error codes
229
229
*/
230
230
static void print_mbedtls_error (const char *name, int err);
231
231
232
232
#if MBED_CONF_TLS_SOCKET_DEBUG_LEVEL > 0
233
233
/* *
234
- * Debug callback for mbed TLS
234
+ * Debug callback for Mbed TLS
235
235
* Just prints on the USB serial port
236
236
*/
237
237
static void my_debug (void *ctx, int level, const char *file, int line,
238
238
const char *str);
239
239
240
240
/* *
241
- * Certificate verification callback for mbed TLS
241
+ * Certificate verification callback for Mbed TLS
242
242
* Here we only use it to display information on each cert in the chain
243
243
*/
244
244
static int my_verify (void *data, mbedtls_x509_crt *crt, int depth, uint32_t *flags);
0 commit comments