From 128783a700932b527ca6cb0c234db5d3542b3356 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 17 Apr 2017 05:18:24 +0200 Subject: factotum: append public rsa encyption exponent after the modulus this makes implementing ssh-rsa authentication easier, as we then can convert the public key directly to ssh format and check if the server will accept that public key. tlshand just needs the modulus to see if the public key matches the one it has from the certificate. --- sys/src/cmd/auth/factotum/rsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/auth/factotum/rsa.c b/sys/src/cmd/auth/factotum/rsa.c index 2ef94f0b3..596f19e26 100644 --- a/sys/src/cmd/auth/factotum/rsa.c +++ b/sys/src/cmd/auth/factotum/rsa.c @@ -149,7 +149,7 @@ rsaread(Fsstate *fss, void *va, uint *n) return failure(fss, nil); s->off++; priv = s->key->priv; - *n = snprint(va, *n, "%B", priv->pub.n); + *n = snprint(va, *n, "%B %B", priv->pub.n, priv->pub.ek); return RpcOk; case CHaveResp: *n = snprint(va, *n, "%B", s->resp); -- cgit v1.2.3