summaryrefslogtreecommitdiff
path: root/src/sbearssl/sbearssl_suite_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sbearssl/sbearssl_suite_name.c')
-rw-r--r--src/sbearssl/sbearssl_suite_name.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sbearssl/sbearssl_suite_name.c b/src/sbearssl/sbearssl_suite_name.c
new file mode 100644
index 0000000..97cc593
--- /dev/null
+++ b/src/sbearssl/sbearssl_suite_name.c
@@ -0,0 +1,14 @@
+/* ISC license. */
+
+#include <bearssl.h>
+
+#include <s6-networking/sbearssl.h>
+#include "sbearssl-internal.h"
+
+char const *sbearssl_suite_name (br_ssl_session_parameters const *params)
+{
+ for (size_t i = 0 ; i < sbearssl_suite_list_len ; i++)
+ if (sbearssl_suite_list[i].id == params->cipher_suite)
+ return sbearssl_suite_list[i].name ;
+ return 0 ;
+}