diff options
author | Nikias Bassen | 2012-02-02 20:17:37 +0100 |
---|---|---|
committer | Nikias Bassen | 2012-02-02 20:17:37 +0100 |
commit | 482268c18b1f45364ea505a687704586f4f1017b (patch) | |
tree | 24b8755efc82098927ada069ef4ac0c2f5309c24 /src/recovery.c | |
parent | a2ee90f60d1efa1e642b8e44882607c620f75414 (diff) | |
download | idevicerestore-482268c18b1f45364ea505a687704586f4f1017b.tar.gz idevicerestore-482268c18b1f45364ea505a687704586f4f1017b.tar.bz2 |
recovery: add recovery_get_nonce() function
Diffstat (limited to 'src/recovery.c')
-rw-r--r-- | src/recovery.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/recovery.c b/src/recovery.c index dd544c1..51d2d1a 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -383,6 +383,23 @@ int recovery_get_ecid(struct idevicerestore_client_t* client, uint64_t* ecid) { return 0; } +int recovery_get_nonce(struct idevicerestore_client_t* client, unsigned char** nonce, int* nonce_size) { + irecv_error_t recovery_error = IRECV_E_SUCCESS; + + if(client->recovery == NULL) { + if (recovery_client_new(client) < 0) { + return -1; + } + } + + recovery_error = irecv_get_nonce(client->recovery->client, nonce, nonce_size); + if (recovery_error != IRECV_E_SUCCESS) { + return -1; + } + + return 0; +} + int recovery_get_cpid(struct idevicerestore_client_t* client, uint32_t* cpid) { irecv_error_t recovery_error = IRECV_E_SUCCESS; |