Skip to content

Commit 86808b8

Browse files
authored
Merge pull request wolfSSL#9578 from anhu/early_data_doc
Correct the API docs for wolfSSL_write_early_data()
2 parents 8f089cd + 0b5e9c7 commit 86808b8

File tree

1 file changed

+3
-4
lines changed
  • doc/dox_comments/header_files

1 file changed

+3
-4
lines changed

doc/dox_comments/header_files/ssl.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14418,8 +14418,7 @@ int wolfSSL_set_max_early_data(WOLFSSL* ssl, unsigned int sz);
1441814418
\ingroup IO
1441914419
1442014420
\brief This function writes early data to the server on resumption.
14421-
Call this function instead of wolfSSL_connect() or wolfSSL_connect_TLSv13()
14422-
to connect to the server and send the data in the handshake.
14421+
Call this function before wolfSSL_connect() or wolfSSL_connect_TLSv13().
1442314422
This function is only used with clients.
1442414423
1442514424
\param [in,out] ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
@@ -14431,7 +14430,7 @@ int wolfSSL_set_max_early_data(WOLFSSL* ssl, unsigned int sz);
1443114430
not using TLSv1.3.
1443214431
\return SIDE_ERROR if called with a server.
1443314432
\return WOLFSSL_FATAL_ERROR if the connection is not made.
14434-
\return WOLFSSL_SUCCESS if successful.
14433+
\return the amount of early data written in bytes if successful.
1443514434
1443614435
_Example_
1443714436
\code
@@ -14444,7 +14443,7 @@ int wolfSSL_set_max_early_data(WOLFSSL* ssl, unsigned int sz);
1444414443
...
1444514444
1444614445
ret = wolfSSL_write_early_data(ssl, earlyData, sizeof(earlyData), &outSz);
14447-
if (ret != WOLFSSL_SUCCESS) {
14446+
if (ret < 0) {
1444814447
err = wolfSSL_get_error(ssl, ret);
1444914448
printf(“error = %d, %s\n”, err, wolfSSL_ERR_error_string(err, buffer));
1445014449
goto err_label;

0 commit comments

Comments
 (0)