summaryrefslogtreecommitdiff
path: root/src/sbearssl/sbearssl_rsa_skey_to.c
blob: 93c90b011a92b679fee92db76254a7bf85c5ebcb (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_to (sbearssl_rsa_skey const *l, br_rsa_private_key *k, char *s)
{
  k->n_bitlen = l->n_bitlen ;
  k->p = (unsigned char *)s + l->p ;
  k->plen = l->plen ;
  k->q = (unsigned char *)s + l->q ;
  k->qlen = l->qlen ;
  k->dp = (unsigned char *)s + l->dp ;
  k->dplen = l->dplen ;
  k->dq = (unsigned char *)s + l->dq ;
  k->dqlen = l->dqlen ;
  k->iq = (unsigned char *)s + l->iq ;
  k->iqlen = l->iqlen ;
}