Revert libloki.crypto.generateEphemeralKeyPair, use ... for OR retries

pull/1100/head
Ryan Tharp 5 years ago committed by GitHub
parent 80a3eb0521
commit f134c6ae48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -138,11 +138,11 @@ const sendViaOnion = async (srvPubKey, url, pFetchOptions, options = {}) => {
} Couldnt handle onion request, retrying`, } Couldnt handle onion request, retrying`,
payloadObj payloadObj
); );
// eslint-disable-next-line no-param-reassign return sendViaOnion(srvPubKey, url, pFetchOptions, {
options.retry += 1; ...options,
// eslint-disable-next-line no-param-reassign retry: options.retry + 1,
options.counter = adnOnionRequestCount; counter: adnOnionRequestCount
return sendViaOnion(srvPubKey, url, pFetchOptions, options); });
} }
// get the return variables we need // get the return variables we need
@ -233,8 +233,7 @@ const sendToProxy = async (
// async maybe preferable to avoid cpu spikes // async maybe preferable to avoid cpu spikes
// tho I think sync might be more apt in certain cases here... // tho I think sync might be more apt in certain cases here...
// like sending // like sending
// cannot use libloki.crypto.generateEphemeralKeyPair() because it removes the 05 prefix const ephemeralKey = await libloki.crypto.generateEphemeralKeyPair();
const ephemeralKey = await libsignal.Curve.async.generateKeyPair();
// mix server pub key with our priv key // mix server pub key with our priv key
const symKey = await libsignal.Curve.async.calculateAgreement( const symKey = await libsignal.Curve.async.calculateAgreement(

Loading…
Cancel
Save