summaryrefslogtreecommitdiff
path: root/lib/cert-cred.c
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2020-09-04 15:51:14 +0000
committerDaiki Ueno <ueno@gnu.org>2020-09-04 15:51:14 +0000
commita78f971d67565a98b813f3250c1a722d75b9e74a (patch)
tree1123454ab3ffb63fc6017cdd91c81886844757fc /lib/cert-cred.c
parent1efebfb7a4d5f689eabe2c7e3232daf5ecbab957 (diff)
parentf748e8df7f7220656be116f2e354fc3aabbdde67 (diff)
downloadgnutls-a78f971d67565a98b813f3250c1a722d75b9e74a.tar.gz
Merge branch 'gnutls-cli-aia' into 'master'
Dynamic downloading of missing intermediate CAs via gnutls-cli using the option 'ca-auto-retrieve' Closes #968 See merge request gnutls/gnutls!1319
Diffstat (limited to 'lib/cert-cred.c')
-rw-r--r--lib/cert-cred.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/cert-cred.c b/lib/cert-cred.c
index a5b9493ab4..06a7054330 100644
--- a/lib/cert-cred.c
+++ b/lib/cert-cred.c
@@ -914,6 +914,41 @@ void gnutls_x509_trust_list_set_getissuer_function(gnutls_x509_trust_list_t tlis
tlist->issuer_callback = func;
}
+/**
+ * gnutls_x509_trust_list_set_ptr:
+ * @tlist: is a #gnutls_x509_trust_list_t type.
+ * @ptr: is the user pointer
+ *
+ * This function will set (associate) the user given pointer @ptr to
+ * the tlist structure. This pointer can be accessed with
+ * gnutls_x509_trust_list_get_ptr(). Useful in the callback function
+ * gnutls_x509_trust_list_set_getissuer_function.
+ *
+ * Since: 3.7.0
+ **/
+void gnutls_x509_trust_list_set_ptr(gnutls_x509_trust_list_t tlist, void *ptr)
+{
+ tlist->usr_ptr = ptr;
+}
+
+/**
+ * gnutls_x509_trust_list_get_ptr:
+ * @tlist: is a #gnutls_x509_trust_list_t type.
+ *
+ * Get user pointer for tlist. Useful in callback function
+ * gnutls_x509_trust_list_set_getissuer_function.
+ * This is the pointer set with gnutls_x509_trust_list_set_ptr().
+ *
+ * Returns: the user given pointer from the tlist structure, or
+ * %NULL if it was never set.
+ *
+ * Since: 3.7.0
+ **/
+void *gnutls_x509_trust_list_get_ptr(gnutls_x509_trust_list_t tlist)
+{
+ return tlist->usr_ptr;
+}
+
#define TEST_TEXT "test text"
/* returns error if the certificate has different algorithm than
* the given key parameters.