blob: 19e14eeb40955126e16e6aec2fb8691ce44b715a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
/* ISC license. */
#include <skalibs/stralloc.h>
#include <s6-networking/sbearssl.h>
int sbearssl_ec_skey_from (sbearssl_ec_skey *l, br_ec_private_key const *k, stralloc *sa)
{
if (!stralloc_catb(sa, (char const *)k->x, k->xlen)) return 0 ;
l->curve = k->curve ;
l->x = sa->len - k->xlen ;
l->xlen = k->xlen ;
return 1 ;
}
|