~sircmpwn/himitsu-ssh

261519ad42384ce19f02d95c9c1eb1371441c301 — Haelwenn (lanodan) Monnier a month ago 1984a42 master
catch up with stdlib ed25519 key name changes
3 files changed, 7 insertions(+), 7 deletions(-)

M cmd/hissh-agent/main.ha
M cmd/hissh-export/main.ha
M cmd/hissh-import/main.ha
M cmd/hissh-agent/main.ha => cmd/hissh-agent/main.ha +4 -4
@@ 180,7 180,7 @@ fn handle_req_ident(agent: *agent::agent) (void | agent::error | net::error) = {
		};

		let edkey = ssh::ed25519key { ... };
		edkey.pkey[..] = pkey[..];
		edkey.pubkey[..] = pkey[..];

		const sink = bufio::dynamic(io::mode::WRITE);
		ssh::encode_pubkey(&sink, &edkey)!;


@@ 213,12 213,12 @@ fn handle_sign_request(
		agent::writemsg(agent, &answer)!;
		return;
	};
	defer bytes::zero(key.skey);
	defer bytes::zero(key.privkey);

	let req = bufio::dynamic(io::mode::WRITE);
	defer io::close(&req)!;
	fmt::fprint(&req, "query -d proto=ssh pkey=")?;
	base64::encode(&req, &base64::std_encoding, key.pkey)!;
	base64::encode(&req, &base64::std_encoding, key.pubkey)!;
	fmt::fprintln(&req)!;

	const himitsu = himitsu_connect()?;


@@ 290,7 290,7 @@ fn handle_sign_request(
			yield "";
		};

		key.skey[..] = skey[..];
		key.privkey[..] = skey[..];
		found = true;
		break;
	};

M cmd/hissh-export/main.ha => cmd/hissh-export/main.ha +1 -1
@@ 89,7 89,7 @@ fn encode(key: *query::query) void = {
			...
		};
		// XXX: We could validate the length here
		key.pkey[..] = pkey[..];
		key.pubkey[..] = pkey[..];
		yield key;
	case =>
		fmt::errorfln("Skipping unsupported key type {}", keytype)!;

M cmd/hissh-import/main.ha => cmd/hissh-import/main.ha +2 -2
@@ 36,9 36,9 @@ export fn main() void = {
	let buf = bufio::dynamic(io::mode::WRITE);
	defer io::close(&buf)!;
	fmt::fprint(&buf, "add proto=ssh type=ssh-ed25519 pkey='")!;
	base64::encode(&buf, &base64::std_encoding, privkey.pkey)!;
	base64::encode(&buf, &base64::std_encoding, privkey.pubkey)!;
	fmt::fprint(&buf, "' skey!='")!;
	base64::encode(&buf, &base64::std_encoding, privkey.skey)!;
	base64::encode(&buf, &base64::std_encoding, privkey.privkey)!;
	fmt::fprint(&buf, "'")!;
	if (privkey.comment != "") {
		fmt::fprint(&buf, " comment=")!;