summaryrefslogtreecommitdiff
path: root/src/sbearssl/sbearssl_s6tlsd.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-11-25 20:16:06 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-11-25 20:16:06 +0000
commit8d532683386121e70810b0d7c6642cc2c2b89cb0 (patch)
tree866010763c829a35b18603c5af58896bd14afd18 /src/sbearssl/sbearssl_s6tlsd.c
parent018025f0f36a4847df265c9948dbaf7073ed3245 (diff)
downloads6-networking-8d532683386121e70810b0d7c6642cc2c2b89cb0.tar.xz
Fix build bugs. It builds!
Two things remain to do: - how to pass SNI information to libtls - how to detect cert issuer key type for ECC in bearssl
Diffstat (limited to 'src/sbearssl/sbearssl_s6tlsd.c')
-rw-r--r--src/sbearssl/sbearssl_s6tlsd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sbearssl/sbearssl_s6tlsd.c b/src/sbearssl/sbearssl_s6tlsd.c
index 1bc1114..1198349 100644
--- a/src/sbearssl/sbearssl_s6tlsd.c
+++ b/src/sbearssl/sbearssl_s6tlsd.c
@@ -62,12 +62,12 @@ int sbearssl_s6tlsd (char const *const *argv, char const *const *envp, tain_t co
switch (skey.type)
{
case BR_KEYTYPE_RSA :
- sbearssl_rsa_skey_to(&skey.rsa, &key.rsa, storage.s) ;
+ sbearssl_rsa_skey_to(&skey.data.rsa, &key.rsa, storage.s) ;
br_ssl_server_init_full_rsa(&sc, chain, chainlen, &key.rsa) ;
break ;
case BR_KEYTYPE_EC :
- sbearssl_ec_skey_to(&skey.ec, &key.ec, storage.s) ;
- br_ssl_server_init_full_ec(&sc, chain, chainlen, &key.ec) ;
+ sbearssl_ec_skey_to(&skey.data.ec, &key.ec, storage.s) ;
+ br_ssl_server_init_full_ec(&sc, chain, chainlen, BR_KEYTYPE_EC, &key.ec) ;
break ;
default :
strerr_dief1x(96, "unsupported private key type") ;
@@ -75,7 +75,7 @@ int sbearssl_s6tlsd (char const *const *argv, char const *const *envp, tain_t co
if (!random_init())
strerr_diefu1sys(111, "initialize random generator") ;
- random_string(buf, 32) ;
+ random_string((char *)buf, 32) ;
br_ssl_engine_inject_entropy(&sc.eng, buf, 32) ;
random_finish() ;