Skip to content

Conversation

@aluedeke
Copy link
Collaborator

@aluedeke aluedeke commented Dec 4, 2025

Summary

  • Fixes supervised pairing (ios pair --p12file) when the device is already paired using the standard pairing
  • The device returns an EscrowBag immediately without requiring a challenge, but the code incorrectly treated this as an error

Problem

When pairing a supervised device that already trusts the supervisor certificate, the error was:

the response is missing the Error key: map[EscrowBag:[...] Request:Pair]

The code expected an MCChallengeRequired error with a challenge to sign, but the device skipped that step and returned success directly.

Solution

  • Detect when pairing succeeds on the first request (EscrowBag present in response)
  • Skip the challenge-response flow in that case
  • Also fixes typo: "missign" -> "missing"

Test plan

  • Code compiles successfully
  • Test with supervised device that already trusts the certificate

🤖 Generated with Claude Code

When using supervised pairing (ios pair --p12file), if the device already
trusts the supervisor certificate, it returns an EscrowBag immediately
without requiring a challenge. The code incorrectly treated this as an
error with message: "the response is missing the Error key: map[EscrowBag:...]"

This fix:
- Detects when pairing succeeds on the first request (EscrowBag present)
- Skips the challenge-response flow in that case
- Also fixes typo: "missign" -> "missing"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@aluedeke aluedeke marked this pull request as draft December 4, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants