Skip to content

Commit 8808a88

Browse files
authored
Maybe use long opts correctly (#46)
* Maybe use long opts correctly
1 parent ebd4b27 commit 8808a88

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tsschecker/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ int main(int argc, const char * argv[]) {
194194
return -1;
195195
}
196196

197-
while ((opt = getopt_long(argc, (char* const *)argv, "hd:i:Z:B:e:g:x:b:m:3:8:9:t:r:c:S:uElso0124567p", longopts, &optindex)) > 0) {
197+
while ((opt = getopt_long(argc, (char* const *)argv, "hd:i:Z:B:e:g:x:b::m:3:8:9:t:r:c:S:uElso0124567p", longopts, &optindex)) > 0) {
198198
switch (opt) {
199199
case 'h': // long option: "help"; can be called as short option
200200
cmd_help();

tsschecker/tsschecker.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ int tssrequest(plist_t *tssreqret, char *buildManifest, t_devicevals *devVals, t
13881388
//TODO: don't use .shsh2 ending and don't save generator when saving only baseband
13891389
debug("[TSSR] User specified to request only a Baseband ticket.\n");
13901390
}
1391-
1391+
13921392
if (basebandMode != kBasebandModeWithoutBaseband) {
13931393
//TODO: verify that this being int64_t instead of uint64_t doesn't actually break something
13941394
t_bbdevice bbinfo = getBBDeviceInfo(devVals->deviceModel);
@@ -1575,12 +1575,15 @@ int isManifestBufSignedForDevice(char *buildManifestBuffer, t_devicevals *devVal
15751575
devVals->apnonce = apnonce;
15761576
devVals->installType = installType;
15771577
}
1578-
if(devVals->cryptexnonce && devVals->parsedCryptexnonceLen && !cryptextssrequest(&cryptextssreq, buildManifestBuffer, devVals)) {
1578+
if(devVals->cryptexnonce && devVals->parsedCryptexnonceLen) {
1579+
info("[TSSC] Also requesting Cryptex1 Ticket\n");
1580+
if(!cryptextssrequest(&cryptextssreq, buildManifestBuffer, devVals)) {
15791581
cryptexticket = tss_request_send(cryptextssreq, server_url_string);
15801582
if (print_tss_response) {
15811583
debug_plist2(cryptexticket);
15821584
}
15831585
}
1586+
}
15841587

15851588
plist_t manifest = 0;
15861589
plist_from_xml(buildManifestBuffer, (unsigned)strlen(buildManifestBuffer), &manifest);

0 commit comments

Comments
 (0)