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

#include <bearssl.h>
#include <s6-networking/sbearssl.h>

void sbearssl_rsa_skey (sbearssl_rsa_skey const *l, br_rsa_private_key *k, char const *s)
{
  k->n_bitlen = l->n_bitlen ;
  k->p = s + l->p ;
  k->plen = l->plen ;
  k->q = s + l->q ;
  k->qlen = l->qlen ;
  k->dp = s + l->dp ;
  k->dplen = l->dplen ;
  k->dq = s + l->dq ;
  k->dqlen = l->dqlen ;
  k->iq = s + l->iq ;
  k->iqlen = l->iqlen ;
}