diff options
| author | 2010-05-22 14:48:13 -0400 | |
|---|---|---|
| committer | 2010-05-22 14:48:13 -0400 | |
| commit | a184cda744006d4a597ff5a23b67b635dd28c222 (patch) | |
| tree | ae250bf08d06cc95db3729dcd8d36734926f903c /src/tss.c | |
| parent | 58a0ad3e30bd61cb0c2e6bb62dec600305ea2368 (diff) | |
| download | idevicerestore-a184cda744006d4a597ff5a23b67b635dd28c222.tar.gz idevicerestore-a184cda744006d4a597ff5a23b67b635dd28c222.tar.bz2 | |
Started implementation of img3 file and tss_stitcher
Diffstat (limited to 'src/tss.c')
| -rw-r--r-- | src/tss.c | 30 | 
1 files changed, 22 insertions, 8 deletions
| @@ -26,10 +26,16 @@  #include <plist/plist.h>  #include "tss.h" +#include "img3.h"  #include "idevicerestore.h"  #define ECID_STRSIZE 0x20 +typedef struct { +	int length; +	char* content; +} tss_response; +  plist_t tss_create_request(plist_t buildmanifest, uint64_t ecid) {  	// Fetch build information from BuildManifest  	plist_t build_identities_array = plist_dict_get_item(buildmanifest, "BuildIdentities"); @@ -127,13 +133,14 @@ plist_t tss_create_request(plist_t buildmanifest, uint64_t ecid) {  		plist_t tss_entry = plist_copy(manifest_entry);  		plist_dict_insert_item(tss_request, key, tss_entry); +		free(key);  	} -	/* -		int sz = 0; -		char* xml = NULL; -		plist_to_xml(tss_request, &xml, &sz); -		printf("%s", xml); -	*/ + +	int sz = 0; +	char* xml = NULL; +	plist_to_xml(tss_request, &xml, &sz); +	printf("%s", xml); +  	return tss_request;  } @@ -182,6 +189,7 @@ plist_t tss_send_request(plist_t tss_request) {  		curl_easy_perform(handle);  		curl_slist_free_all(header);  		curl_easy_cleanup(handle); +		free(request);  	}  	curl_global_cleanup(); @@ -204,11 +212,17 @@ plist_t tss_send_request(plist_t tss_request) {  	plist_t tss_response = NULL;  	tss_size = response->length - (tss_data - response->content);  	plist_from_xml(tss_data, tss_size, &tss_response); -/* +	free(response->content); +	free(response); +  	int sz = 0;  	char* xml = NULL;  	plist_to_xml(tss_response, &xml, &sz);  	printf("%s", xml); -*/ +  	return tss_response;  } + +void tss_stitch_img3(img3_file* file, plist_t signature) { + +} | 
