ref: c3bd38194e979c0ff0a43c3c023bac25791e7d80
parent: 89dc334feb966e83aac28e326e0076d0e1a0de5a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Apr 17 01:18:24 EDT 2017
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.
--- a/sys/src/cmd/auth/factotum/rsa.c
+++ b/sys/src/cmd/auth/factotum/rsa.c
@@ -149,7 +149,7 @@
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);
--
⑨