shithub: riscv

Download patch

ref: 128783a700932b527ca6cb0c234db5d3542b3356
parent: 242274f7331436241464dcf26d2105b0f9aa9bbe
author: cinap_lenrek <[email protected]>
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);