summaryrefslogtreecommitdiff
path: root/src/sbearssl/sbearssl_suite_bits.c
blob: 8e2584e3e9aa812b3a4db76fa43e3a8a2f070f54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* ISC license. */

#include <stdint.h>

#include <bearssl.h>

#include <s6-networking/sbearssl.h>
#include "sbearssl-internal.h"

uint16_t sbearssl_suite_bits (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].bits ;
  return 0 ;
}