Add SSL_get0_group_name() to get name of the group used for KEX
[openssl.git] / ssl / t1_lib.c
index 189f241f7af4652ab89ed8cd40a7b06510b241db..576c7a3271e5577aaa3114e06a02c5ebd52b4fba 100644 (file)
@@ -755,6 +755,16 @@ const TLS_GROUP_INFO *tls1_group_id_lookup(SSL_CTX *ctx, uint16_t group_id)
     return NULL;
 }
 
+const char *tls1_group_id2name(SSL_CTX *ctx, uint16_t group_id)
+{
+    const TLS_GROUP_INFO *tls_group_info = tls1_group_id_lookup(ctx, group_id);
+
+    if (tls_group_info == NULL)
+        return NULL;
+
+    return tls_group_info->tlsname;
+}
+
 int tls1_group_id2nid(uint16_t group_id, int include_unknown)
 {
     size_t i;