Skip to content

Commit

Permalink
Add some logs for how we verified the backup
Browse files Browse the repository at this point in the history
  • Loading branch information
bradtgmurray committed Feb 12, 2025
1 parent f764058 commit e034ab5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/keybackup.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (mach *OlmMachine) GetAndVerifyLatestKeyBackupVersion(ctx context.Context,
// key include the user entering the key, retrieving the key stored in secret storage, or obtaining the key via secret sharing
// from a verified device belonging to the same user."
if versionInfo.AuthData.PublicKey == id.Ed25519(base64.RawStdEncoding.EncodeToString(megolmBackupKey.PublicKey().Bytes())) {
log.Debug().Msg("key backup is trusted based on public key")
return versionInfo, nil
}

Expand Down Expand Up @@ -98,6 +99,7 @@ func (mach *OlmMachine) GetAndVerifyLatestKeyBackupVersion(ctx context.Context,
continue
} else {
// One of the signatures is valid, break from the loop.
log.Debug().Stringer("key_id", keyID).Msg("key backup is trusted based on matching signature")
signatureVerified = true
break
}
Expand Down

0 comments on commit e034ab5

Please sign in to comment.