]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLOPT_HSTS*FUNCTION.3: document the involved structs as well
authorDaniel Stenberg <daniel@haxx.se>
Tue, 3 May 2022 11:49:43 +0000 (13:49 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 3 May 2022 15:18:28 +0000 (17:18 +0200)
Reviewed-By: Daniel Gustafsson
Closes #8788

docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.3
docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.3

index 89c423c2e5d04123906bba4a8d5f642269cf9947..8d0b87d002b9bf580849e1a0ad86c42b0ef8cb9e 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
@@ -27,6 +27,13 @@ CURLOPT_HSTSREADFUNCTION \- read callback for HSTS hosts
 .nf
 #include <curl/curl.h>
 
+struct curl_hstsentry {
+  char *name;
+  size_t namelen;
+  unsigned int includeSubDomains:1;
+  char expire[18]; /* YYYYMMDD HH:MM:SS [null-terminated] */
+};
+
 CURLSTScode hstsread(CURL *easy, struct curl_hstsentry *sts, void *userp);
 
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSREADFUNCTION, hstsread);
index cee41d7b9c362272d3704eca4026eb601d5e512d..edc56d308ef8c8b4d3c967ea17f1d9cff4718bbb 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
@@ -27,6 +27,18 @@ CURLOPT_HSTSWRITEFUNCTION \- write callback for HSTS hosts
 .nf
 #include <curl/curl.h>
 
+struct curl_hstsentry {
+  char *name;
+  size_t namelen;
+  unsigned int includeSubDomains:1;
+  char expire[18]; /* YYYYMMDD HH:MM:SS [null-terminated] */
+};
+
+struct curl_index {
+  size_t index; /* the provided entry's "index" or count */
+  size_t total; /* total number of entries to save */
+};
+
 CURLSTScode hstswrite(CURL *easy, struct curl_hstsentry *sts,
                       struct curl_index *count, void *userp);