Skip to main content

pair_supervised

Function pair_supervised 

Source
pub async fn pair_supervised<S>(
    stream: &mut S,
    p12_bytes: &[u8],
    p12_password: &str,
    system_buid: &str,
) -> Result<(FullPairRecord, Vec<u8>), LockdownError>
where S: AsyncRead + AsyncWrite + Unpin,
Expand description

Perform supervised pairing with a P12 certificate on a raw lockdown stream.

The stream must be a raw TCP connection to lockdown port 62078 (via usbmux), NOT a TLS-wrapped connection. This is because we are pairing for the first time and do not yet have the certificates needed for TLS.

Returns (pair_record, escrow_bag) on success. The pair_record contains all certificates and keys needed for future TLS sessions, and should be saved to disk in the standard lockdown pair record directory.

ยงArguments

  • stream - Raw lockdown stream (usbmux connection to port 62078)
  • p12_bytes - Raw bytes of the P12 supervisor certificate file
  • p12_password - Password for the P12 file
  • system_buid - System BUID (from usbmuxd ReadBUID)