summaryrefslogtreecommitdiff
path: root/lib/includes/gnutls/gnutls.h.in
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2022-01-12 10:37:53 +0100
committerDaiki Ueno <ueno@gnu.org>2022-02-10 16:14:40 +0100
commita96b04ffcf8fd7375dc3c0f90602bf679f5a9791 (patch)
tree68d52c946bc48d49066263c514ad27158fd93386 /lib/includes/gnutls/gnutls.h.in
parent6c494be78240bdfa736e4c2cfcbbd1a28c290665 (diff)
downloadgnutls-a96b04ffcf8fd7375dc3c0f90602bf679f5a9791.tar.gz
gnutls_ciphersuite_get: new function to get unique ciphersuite name
The existing method to obtain the name of the currently negotiated TLS ciphersuite is as follows: - call gnutls_cipher_get, gnutls_mac_get, gnutls_kx_get - call gnutls_cipher_suite_get_name with the value from the above functions This process is cumbersome and only works with TLS 1.2 or earlier; moreover the returned names are GnuTLS specific. This change adds a new function gnutls_ciphersuite_get to eliminate those limitations. It returns the "canonical" name of the ciphersuite, which is mostly identical to the ones registered in IANA, with an exception for compatibility. Signed-off-by: Daiki Ueno <ueno@gnu.org>
Diffstat (limited to 'lib/includes/gnutls/gnutls.h.in')
-rw-r--r--lib/includes/gnutls/gnutls.h.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 6359a0edb6..482e9653c8 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -1809,6 +1809,9 @@ const char *
gnutls_cipher_algorithm_t cipher_algorithm,
gnutls_mac_algorithm_t mac_algorithm) __GNUTLS_CONST__;
+const char *
+gnutls_ciphersuite_get(gnutls_session_t session) __GNUTLS_CONST__;
+
/* get the currently used protocol version */
gnutls_protocol_t gnutls_protocol_get_version(gnutls_session_t session);