diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-10-16 13:54:24 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-10-16 13:54:24 +0200 |
commit | 62f15c9d0c5083ceb76f4c6d085c1a8b31c6e914 (patch) | |
tree | 81ed098dc0a4b37f748dffd06ad49e95f1fd455b /lib/gnutls_priority.c | |
parent | 4739f20dd8a43ce1e930df9c4b94fec024d54f28 (diff) | |
download | gnutls-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.c | 19 |
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; +} |