no string response

This commit is contained in:
jusax23 2023-03-13 15:29:08 +01:00
parent 05025d209a
commit 0c8a27a7fe
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41
4 changed files with 10 additions and 10 deletions

View file

@ -32,7 +32,7 @@ export const createSignature = {
const server = selfTag;
const tag = `${client.name}@${server.host}:${server.port}-${data.publicKey}`;
var signature = await sign(tag, await getSettings(SETTINGS.privateKey));
aws("ok", signature);
aws("ok", { sign: signature });
}
};

View file

@ -179,7 +179,7 @@ export const remote1 = {
client.challenge = get64(64);
client.state = STATE.remoteP;
client.remoteKey = data.publicKey;
aws("ok", client.challenge);
aws("ok", { challenge: client.challenge });
} catch (e) {
client.suspect();
aws("error", "signature");

View file

@ -33,10 +33,10 @@ const list = [
accountKey
}, "error", "config");
}], ["remote", async (req) => {
let signature = await req({ "authorization": `Digest name=${name1} server=localhost:7224 accountKey=${accountKey}` },
let signature = (await req({ "authorization": `Digest name=${name1} server=localhost:7224 accountKey=${accountKey}` },
"createSignature", {
publicKey
}, "ok", null);
}, "ok", null)).sign;
let falseSignature = await sign("lol", privateKey);
let token = (await req({}, "requestTempToken", {}, "ok", { token: null })).token;
@ -58,14 +58,14 @@ const list = [
sign: falseSignature
}, "error", "signature");
let challenge = await req({
let challenge = (await req({
"authorization": `Bearer ${token}`
}, "remote1", {
name: name1,
server: "localhost:7224",
publicKey,
sign: signature
}, "ok", null);
}, "ok", null)).challenge;
await req({
"authorization": `Bearer ${token}`

View file

@ -40,9 +40,9 @@ const list = [
server: "localhost:7224",
accountKey
}, "ok", "");
let signature = await req(handler, "createSignature", {
let signature = (await req(handler, "createSignature", {
publicKey
}, "ok", null);
}, "ok", null)).sign;
let falseSignature = await sign("lol", privateKey);
let h2 = await newHandler();
await req(h2, "remote1", {
@ -57,12 +57,12 @@ const list = [
publicKey,
sign: falseSignature
}, "error", "signature");
let challenge = await req(h2, "remote1", {
let challenge = (await req(h2, "remote1", {
name: name1,
server: "localhost:7224",
publicKey,
sign: signature
}, "ok", null);
}, "ok", null)).challenge;
await req(h2, "remote1", {
name: name1,
server: "localhost:7224",