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

#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 ;
}