diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-11-25 18:16:05 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-11-25 18:16:05 +0000 |
commit | 018025f0f36a4847df265c9948dbaf7073ed3245 (patch) | |
tree | 984c9a4bba06ef8abc02d0fbe81a70ec28c6f529 /src/sbearssl/sbearssl_ta_to.c | |
parent | 6421a5e923b0f695047b429e4176bca2873c5189 (diff) | |
download | s6-networking-018025f0f36a4847df265c9948dbaf7073ed3245.tar.xz |
Alpha version of the SSL work.
Doesn't build yet, but I'm scared of losing it, so using git as
storage.
Will fix the stupid bugs now, the tricky bugs later.
Diffstat (limited to 'src/sbearssl/sbearssl_ta_to.c')
-rw-r--r-- | src/sbearssl/sbearssl_ta_to.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sbearssl/sbearssl_ta_to.c b/src/sbearssl/sbearssl_ta_to.c new file mode 100644 index 0000000..4714b47 --- /dev/null +++ b/src/sbearssl/sbearssl_ta_to.c @@ -0,0 +1,12 @@ +/* ISC license. */ + +#include <bearssl.h> +#include <s6-networking/sbearssl.h> + +void sbearssl_ta_to (sbearssl_ta const *sta, br_x509_trust_anchor *bta, char const *s) +{ + bta->dn = s + sta->dn ; + bta->dn_len = sta->dnlen ; + bta->flags = sta->flags ; + sbearssl_pkey_to(&sta->pkey, &bta->pkey, s) ; +} |