Skip to content

Commit

Permalink
Maybe use long opts correctly (#46)
Browse files Browse the repository at this point in the history
* Maybe use long opts correctly
  • Loading branch information
Cryptiiiic authored Jan 7, 2025
1 parent ebd4b27 commit 8808a88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tsschecker/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ int main(int argc, const char * argv[]) {
return -1;
}

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) {
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) {
switch (opt) {
case 'h': // long option: "help"; can be called as short option
cmd_help();
Expand Down
7 changes: 5 additions & 2 deletions tsschecker/tsschecker.c
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ int tssrequest(plist_t *tssreqret, char *buildManifest, t_devicevals *devVals, t
//TODO: don't use .shsh2 ending and don't save generator when saving only baseband
debug("[TSSR] User specified to request only a Baseband ticket.\n");
}

if (basebandMode != kBasebandModeWithoutBaseband) {
//TODO: verify that this being int64_t instead of uint64_t doesn't actually break something
t_bbdevice bbinfo = getBBDeviceInfo(devVals->deviceModel);
Expand Down Expand Up @@ -1575,12 +1575,15 @@ int isManifestBufSignedForDevice(char *buildManifestBuffer, t_devicevals *devVal
devVals->apnonce = apnonce;
devVals->installType = installType;
}
if(devVals->cryptexnonce && devVals->parsedCryptexnonceLen && !cryptextssrequest(&cryptextssreq, buildManifestBuffer, devVals)) {
if(devVals->cryptexnonce && devVals->parsedCryptexnonceLen) {
info("[TSSC] Also requesting Cryptex1 Ticket\n");
if(!cryptextssrequest(&cryptextssreq, buildManifestBuffer, devVals)) {
cryptexticket = tss_request_send(cryptextssreq, server_url_string);
if (print_tss_response) {
debug_plist2(cryptexticket);
}
}
}

plist_t manifest = 0;
plist_from_xml(buildManifestBuffer, (unsigned)strlen(buildManifestBuffer), &manifest);
Expand Down

0 comments on commit 8808a88

Please sign in to comment.