summaryrefslogtreecommitdiff
path: root/lib/gnutls_priority.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-10-16 13:54:24 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-10-16 13:54:24 +0200
commit62f15c9d0c5083ceb76f4c6d085c1a8b31c6e914 (patch)
tree81ed098dc0a4b37f748dffd06ad49e95f1fd455b /lib/gnutls_priority.c
parent4739f20dd8a43ce1e930df9c4b94fec024d54f28 (diff)
downloadgnutls-62f15c9d0c5083ceb76f4c6d085c1a8b31c6e914.tar.gz
added gnutls_priority_string_list(), a function to iterate all priority strings
Diffstat (limited to 'lib/gnutls_priority.c')
-rw-r--r--lib/gnutls_priority.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gnutls_priority.c b/lib/gnutls_priority.c
index 1dd422b445..c402580553 100644
--- a/lib/gnutls_priority.c
+++ b/lib/gnutls_priority.c
@@ -1687,3 +1687,22 @@ gnutls_priority_certificate_type_list(gnutls_priority_t pcache,
*list = pcache->cert_type.priority;
return pcache->cert_type.algorithms;
}
+
+/**
+ * gnutls_priority_string_list:
+ * @iter: an integer counter starting from zero
+ *
+ * Returns all available priority strings. When no strings
+ * are available it returns %NULL.
+ * structure.
+ *
+ * Returns: a priority string
+ * Since: 3.4.0
+ **/
+const char *
+gnutls_priority_string_list(unsigned iter)
+{
+ if (iter >= (sizeof(pgroups)/sizeof(pgroups[0]))-1)
+ return NULL;
+ return pgroups[iter].name;
+}