remove detailed logs and use correct publickey for

openConnectionCallback
This commit is contained in:
clauspeterhuebner 2025-07-11 17:54:07 +02:00
parent 37dd27745a
commit d991606d93
2 changed files with 1 additions and 5 deletions

View File

@ -43,10 +43,6 @@ export class AuthenticationResolver {
logger.removeContext('handshakeID')
throw new Error(errmsg)
}
const pubKeyComA = Buffer.from(args.publicKey, 'hex')
logger.debug('pubKeyComA', pubKeyComA)
logger.debug('args.publicKey', args.publicKey)
// const requestingCom = await DbCommunity.findOneBy({ publicKey: Buffer.from(args.publicKey, 'hex') })
const fedComA = await DbFedCommunity.findOneBy({ publicKey: Buffer.from(args.publicKey, 'hex') })
logger.debug('fedComA', new FederatedCommunityLoggingView(fedComA!))
if (fedComA && !openConnectionJwtPayload.url.startsWith(fedComA.endPoint)) {

View File

@ -60,7 +60,7 @@ export async function startOpenConnectionCallback(
// encrypt callbackArgs with requestedCom.publicJwtKey and sign it with homeCom.privateJwtKey
const jwt = await encryptAndSign(callbackArgs, homeComB!.privateJwtKey!, comA.publicJwtKey!)
const args = new EncryptedTransferArgs()
args.publicKey = comA.publicKey.toString('hex')
args.publicKey = homeComB!.publicKey.toString('hex')
args.jwt = jwt
args.handshakeID = handshakeID
if (await client.openConnectionCallback(args)) {