diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-12-12 18:54:44 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-12-12 18:54:44 +0100 |
commit | 3360065611857d43b7619684755f262e8cc9c0e4 (patch) | |
tree | d67e259618c091474824fd73ecdffc49121bb33e /src | |
parent | 55968012dcefc50590925b4ddcf556f8ca67a8b5 (diff) | |
download | gnutls-3360065611857d43b7619684755f262e8cc9c0e4.tar.gz |
gnutls_priority_get_cipher_suite was renamed to gnutls_priority_get_cipher_suite_index.
This makes a more consistent API at the cost of requiring gnutls_get_cipher_suite_info().
An advantage however is that more information can now be accessed.
Diffstat (limited to 'src')
-rw-r--r-- | src/common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c index 0cfc0aa0c6..d00bf5764c 100644 --- a/src/common.c +++ b/src/common.c @@ -574,6 +574,7 @@ print_list (const char* priorities, int verbose) { size_t i; int ret; + unsigned int idx; const char *name; const char *err; unsigned char id[2]; @@ -596,11 +597,16 @@ print_list (const char* priorities, int verbose) for (i=0;;i++) { - ret = gnutls_priority_get_cipher_suite(pcache, i, &name, id); + ret = gnutls_priority_get_cipher_suite_index(pcache, i, &idx); if (ret == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) break; if (ret == GNUTLS_E_UNKNOWN_CIPHER_SUITE) continue; - printf ("%-50s\t0x%02x, 0x%02x\n", name, id[0], id[1]); + name = gnutls_cipher_suite_info(idx, id, NULL, NULL, NULL, &version); + + if (name != NULL) + printf ("%-50s\t0x%02x, 0x%02x\t%s\n", + name, (unsigned char) id[0], (unsigned char) id[1], + gnutls_protocol_get_name (version)); } return; |