From: Sahil Siddiq Date: Thu, 22 Aug 2024 18:32:37 +0000 (+0530) Subject: doc: Fix error and improve doc X-Git-Tag: 3.8.8~16^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=378bc5946961eb7cbaa3033d8567cbef283fddca;p=thirdparty%2Fgnutls.git doc: Fix error and improve doc The description of "gnutls_psk_allocate_client_credentials" incorrectly states that sc is a pointer to a "gnutls_psk_server_credentials_t". sc is a pointer to a "gnutls_psk_client_credentials_t". In the description of "gnutls_credentials_set", mention the type that the cred parameter should be when using GNUTLS_CRD_PSK. Signed-off-by: Sahil Siddiq --- diff --git a/lib/auth.c b/lib/auth.c index bd366ba9d2..e0cbde700f 100644 --- a/lib/auth.c +++ b/lib/auth.c @@ -189,6 +189,10 @@ int gnutls_credentials_set(gnutls_session_t session, * in case of a client, and #gnutls_srp_server_credentials_t, in case * of a server. * + * For %GNUTLS_CRD_PSK, @cred will be #gnutls_psk_client_credentials_t + * in case of a client, and #gnutls_psk_server_credentials_t, in case + * of a server. + * * For %GNUTLS_CRD_CERTIFICATE, @cred will be * #gnutls_certificate_credentials_t. * diff --git a/lib/psk.c b/lib/psk.c index faa25ec07b..c548c6b001 100644 --- a/lib/psk.c +++ b/lib/psk.c @@ -52,7 +52,7 @@ void gnutls_psk_free_client_credentials(gnutls_psk_client_credentials_t sc) /** * gnutls_psk_allocate_client_credentials: - * @sc: is a pointer to a #gnutls_psk_server_credentials_t type. + * @sc: is a pointer to a #gnutls_psk_client_credentials_t type. * * Allocate a gnutls_psk_client_credentials_t structure. *