@@ -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