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.
This commit is contained in:
cinap_lenrek 2017-04-17 05:18:24 +02:00
parent 242274f733
commit 128783a700

View file

@ -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);