]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
doc: Fix error and improve doc
authorSahil Siddiq <sahilcdq@proton.me>
Thu, 22 Aug 2024 18:32:37 +0000 (00:02 +0530)
committerSahil Siddiq <sahilcdq@proton.me>
Thu, 22 Aug 2024 18:47:55 +0000 (00:17 +0530)
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 <sahilcdq@proton.me>
lib/auth.c
lib/psk.c

index bd366ba9d20ac09f0591db6af802298b3b1fed0a..e0cbde700f5cc56fa154b3c8bab80961f4b13643 100644 (file)
@@ -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.
  *
index faa25ec07bbdca084e69547e66d11c8f673df717..c548c6b001490b08c575c0e5e2c4661a54059f7a 100644 (file)
--- 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.
  *