SHSH Protocol

Here is a description about the protocol that is used when iTunes requests the SHSH certificate from Apple. For details about what this is used for, please see the main article SHSH.

This is a simple HTTP (POST) request and answer. You can retry this via a Telnet session or similar. The destination host is gs.apple.com (IP 17.171.36.30 [previously 17.112.176.11]) and runs on the common HTTP port 80. The data is plaintext and not encoded in any way. For details about the HTTP protocol itself, please see RFC2616.

Sending data (request)
POST /TSS/controller?action=2 HTTP/1.1 Accept: */* Cache-Control: no-cache Content-type: text/xml; charset="utf-8" User-Agent: InetURL/1.0 Content-Length: 12345 Host: gs.apple.com (here comes the Plist request file)

Receiving data (answer)
HTTP/1.1 200 OK Date: Sun, 15 Aug 2010 19:25:18 GMT Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5 Content-Type: text/html Content-Length: 123456 MS-Author-Via: DAV STATUS=0&MESSAGE=SUCCESS&REQUEST_STRING=(here comes the requested SHSH file)

Plist request file
NOTE: This template is only for devices other than the iPhone 4

 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" " http://www.apple.com/DTDs/PropertyList-1.0.dtd ">  @APTicket @HostIpAddress 192.168.0.1 	 @HostPlatformInfo windows ---> "darwin" without quotes for Mac/Linux Systems @Locality en_US @VersionInfo libauthinstall-34 ---> "3.8" without quotes for Mac/Linux Systems ApBoardID ____ 	 ApChipID ____ 	 ApECID ************* > This is your own ECID ApProductionMode ApSecurityDomain ____ 	 UniqueBuildID ApNonce AppleLogo Digest PartialDigest Trusted BatteryCharging Digest PartialDigest Trusted BatteryCharging0 Digest PartialDigest Trusted BatteryCharging1 Digest PartialDigest Trusted BatteryFull Digest PartialDigest Trusted BatteryLow0 Digest PartialDigest Trusted BatteryLow1 Digest PartialDigest Trusted BatteryPlugin Digest PartialDigest Trusted DeviceTree Digest PartialDigest Trusted KernelCache Digest PartialDigest Trusted LLB BuildString _________________________ 		 Digest PartialDigest Trusted RecoveryMode Digest PartialDigest Trusted RestoreDeviceTree Digest PartialDigest Trusted RestoreKernelCache Digest PartialDigest Trusted RestoreLogo Digest PartialDigest Trusted RestoreRamDisk Digest PartialDigest Trusted iBEC BuildString _________________________ 		 Digest PartialDigest Trusted iBSS BuildString _________________________ 		 Digest PartialDigest Trusted iBoot Digest PartialDigest Trusted

The underlined values( _______ ) can be found from the BuildManifest.plist which is located inside a IPSW file.

Status responses

 * STATUS=0&MESSAGE=SUCCESS
 * STATUS=94&MESSAGE=This device isn't eligible for the requested build.
 * STATUS=100&MESSAGE=An internal error occurred.
 * STATUS=511&MESSAGE=No data in the request
 * STATUS=551&MESSAGE=Error occured while importing config packet with cpsn:
 * STATUS=5000&MESSAGE=Invalid Option!

Other parameters / open questions
Some parameters could have other values. Not all details are known.
 * action=2 in the request. What other values exist and what is their meaning?
 * ApProductionMode What does this mean? Is there a test environment?
 * ApSecurityDomain Meaning?
 * Trusted What is this for?
 * Full description of the above values for UniqueBuildID, Digest, PartialDigest and BuildString.