Skip to content

Commit b79b608

Browse files
Mel WeedSeppo Takalo
authored andcommitted
mbed-tls/TLS to Mbed TLS
1 parent 40418d8 commit b79b608

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

features/netsocket/TLSSocketWrapper.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
/**
3838
* TLSSocket is a wrapper around Socket for interacting with TLS servers.
3939
*
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.
4242
*
4343
*/
4444
class TLSSocketWrapper : public Socket {
@@ -67,7 +67,7 @@ class TLSSocketWrapper : public Socket {
6767

6868
/** Set hostname.
6969
*
70-
* TLSSocket requires hostname that is used to verify the certificate.
70+
* TLSSocket requires hostname used to verify the certificate.
7171
* If hostname is not given in constructor, this function must be used before
7272
* starting the TLS handshake.
7373
*
@@ -77,7 +77,7 @@ class TLSSocketWrapper : public Socket {
7777

7878
/** Sets the certification of Root CA.
7979
*
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.
8181
* @param len Length of certificate (including terminating 0 for PEM).
8282
* @return 0 on success, negative error code on failure.
8383
*/
@@ -92,10 +92,10 @@ class TLSSocketWrapper : public Socket {
9292

9393
/** Sets client certificate, and client private key.
9494
*
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
9999
* @return 0 on success, negative error code on failure.
100100
*/
101101
nsapi_error_t set_client_cert_key(const void *client_cert, size_t client_cert_len,
@@ -109,7 +109,7 @@ class TLSSocketWrapper : public Socket {
109109
*/
110110
nsapi_error_t set_client_cert_key(const char *client_cert_pem, const char *client_private_key_pem);
111111

112-
/** Send data over a TLS socket
112+
/** Send data over a TLS socket.
113113
*
114114
* The socket must be connected to a remote host. Returns the number of
115115
* bytes sent from the buffer.
@@ -153,7 +153,7 @@ class TLSSocketWrapper : public Socket {
153153
#if defined(MBEDTLS_X509_CRT_PARSE_C) || defined(DOXYGEN_ONLY)
154154
/** Get own certificate directly from Mbed TLS.
155155
*
156-
* @return internal Mbed TLS X509 structure.
156+
* @return Internal Mbed TLS X509 structure.
157157
*/
158158
mbedtls_x509_crt *get_own_cert();
159159

@@ -203,7 +203,7 @@ class TLSSocketWrapper : public Socket {
203203
* Underlying transport socket should already be connected.
204204
*
205205
* Root CA certification must be set by set_ssl_ca_pem() before
206-
* call this function.
206+
* calling this function.
207207
*
208208
* For non-blocking purposes, this functions needs to know whether this
209209
* was a first call to Socket::connect() API so that NSAPI_ERROR_INPROGRESS
@@ -225,20 +225,20 @@ class TLSSocketWrapper : public Socket {
225225
/** Continue already initialized handshake */
226226
nsapi_error_t continue_handshake();
227227
/**
228-
* Helper for pretty-printing mbed TLS error codes
228+
* Helper for pretty-printing Mbed TLS error codes
229229
*/
230230
static void print_mbedtls_error(const char *name, int err);
231231

232232
#if MBED_CONF_TLS_SOCKET_DEBUG_LEVEL > 0
233233
/**
234-
* Debug callback for mbed TLS
234+
* Debug callback for Mbed TLS
235235
* Just prints on the USB serial port
236236
*/
237237
static void my_debug(void *ctx, int level, const char *file, int line,
238238
const char *str);
239239

240240
/**
241-
* Certificate verification callback for mbed TLS
241+
* Certificate verification callback for Mbed TLS
242242
* Here we only use it to display information on each cert in the chain
243243
*/
244244
static int my_verify(void *data, mbedtls_x509_crt *crt, int depth, uint32_t *flags);

0 commit comments

Comments
 (0)