From 133bd2881c588dcc7e0b5c15719f49a4e1cd74de Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Fri, 6 Nov 2026 10:41:57 +1000 Subject: [PATCH] Fix wolfSSL_send_hrr_cookie documentation Function name in example code had extra underscore. 'secret' needs to be unsigned. WOLFSSL_TLS13_SHA512 needs to be defined for SHA-512 to be used. --- doc/dox_comments/header_files-ja/ssl.h | 6 +++--- doc/dox_comments/header_files/ssl.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/dox_comments/header_files-ja/ssl.h b/doc/dox_comments/header_files-ja/ssl.h index c284f5c4728..41d4a877f66 100644 --- a/doc/dox_comments/header_files-ja/ssl.h +++ b/doc/dox_comments/header_files-ja/ssl.h @@ -12103,7 +12103,7 @@ int wolfSSL_connect(WOLFSSL* ssl); \param [in,out] ssl wolfSSL_new()を使用して作成されたWOLFSSL構造体へのポインタ。 \param [in] secret secretを保持するバッファへのポインタ。NULLを渡すと、新しいランダムなsecretを生成することを示します。 - \param [in] secretSz secretのサイズ(バイト単位)。0を渡すと、デフォルトサイズを使用することを示します:WC_SHA256_DIGEST_SIZE(SHA-256が利用できない場合はWC_SHA_DIGEST_SIZE)。 + \param [in] secretSz secretのサイズ(バイト単位)。0を渡すと、デフォルトサイズを使用することを示します:cookie MACが使用するハッシュのダイジェストサイズで、WC_SHA256_DIGEST_SIZE、SHA-256が利用できない場合はWC_SHA384_DIGEST_SIZE、WC_SHA512_DIGEST_SIZE(WOLFSSL_TLS13_SHA512使用時)、WC_SM3_DIGEST_SIZEの順に選択されます。 \return BAD_FUNC_ARG sslがNULLまたはTLS v1.3を使用していない場合。 \return SIDE_ERROR クライアントで呼び出された場合。 @@ -12115,9 +12115,9 @@ int wolfSSL_connect(WOLFSSL* ssl); \code int ret; WOLFSSL* ssl; - char secret[32]; + unsigned char secret[32]; ... - ret = wolfSSL__send_hrr_cookie(ssl, secret, sizeof(secret)); + ret = wolfSSL_send_hrr_cookie(ssl, secret, sizeof(secret)); if (ret != WOLFSSL_SUCCESS) { // Cookieとsecretの使用設定に失敗しました。 } diff --git a/doc/dox_comments/header_files/ssl.h b/doc/dox_comments/header_files/ssl.h index 67f76e82f4b..c3af8cbb3ab 100644 --- a/doc/dox_comments/header_files/ssl.h +++ b/doc/dox_comments/header_files/ssl.h @@ -15183,8 +15183,8 @@ int wolfSSL_connect(WOLFSSL* ssl); \param [in] secretSz Size of the secret in bytes. Passing 0 indicates to use the default size: the digest size of the hash the cookie MAC uses, WC_SHA256_DIGEST_SIZE, or when SHA-256 is not - available WC_SHA384_DIGEST_SIZE, WC_SHA512_DIGEST_SIZE or - WC_SM3_DIGEST_SIZE, in that order. + available WC_SHA384_DIGEST_SIZE, WC_SHA512_DIGEST_SIZE (with + WOLFSSL_TLS13_SHA512) or WC_SM3_DIGEST_SIZE, in that order. \return BAD_FUNC_ARG if ssl is NULL or not using TLS v1.3. \return SIDE_ERROR if called with a client. @@ -15203,9 +15203,9 @@ int wolfSSL_connect(WOLFSSL* ssl); \code int ret; WOLFSSL* ssl; - char secret[32]; + unsigned char secret[32]; ... - ret = wolfSSL__send_hrr_cookie(ssl, secret, sizeof(secret)); + ret = wolfSSL_send_hrr_cookie(ssl, secret, sizeof(secret)); if (ret != WOLFSSL_SUCCESS) { // failed to set use of Cookie and secret }