This commit is contained in:
Michał Trojnara
2025-06-20 12:28:17 +02:00
parent ff9a6d3593
commit dfc3e46a77
8 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
- signature extraction/removal/verificaton on MSI/CAB files
- signature extraction/removal/verification on MSI/CAB files
- clean up / untangle code
- separate timestamping
- remove mmap usage to increase portability

4
appx.c
View File

@ -925,7 +925,7 @@ static int appx_write_central_directory(BIO *bio, ZIP_FILE *zip, int removeSigna
if (removeSignature && !strcmp(entry->fileName, APP_SIGNATURE_FILENAME)) {
continue;
}
/* APP_SIGNATURE is nt 'tainted' by offset shift after replacing the contents of [content_types] */
/* APP_SIGNATURE is not 'tainted' by offset shift after replacing the contents of [content_types] */
zipWriteCentralDirectoryEntry(bio, &sizeOnDisk, entry, strcmp(entry->fileName, APP_SIGNATURE_FILENAME) ? offsetDiff : 0);
cdSize += sizeOnDisk;
if (entry->overrideData) {
@ -1430,7 +1430,7 @@ static void zipWriteCentralDirectoryEntry(BIO *bio, uint64_t *sizeOnDisk, ZIP_CE
#if 0
if (entry->extraFieldLen > 0 && entry->extraField)
{
/* TODO, if override daata, need to rewrite the extra field */
/* TODO, if override data, need to rewrite the extra field */
BIO_write(bio, entry->extraField, entry->extraFieldLen);
}
#endif

View File

@ -998,7 +998,7 @@ static BIO *bio_get_http(char *url, BIO *req, char *proxy, int rfc3161, char *ca
#endif /* OPENSSL_VERSION_NUMBER<0x30000000L */
/*
* Decode a HTTP response from BIO and write it into the PKCS7 structure
* Decode an HTTP response from BIO and write it into the PKCS7 structure
* Add timestamp to the PKCS7 SignerInfo structure:
* sig->d.sign->signer_info->unauth_attr
* [in, out] p7: new PKCS#7 signature

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
"""Implementation of a HTTP client"""
"""Implementation of an HTTP client"""
import os
import sys

View File

@ -29,7 +29,7 @@ def main() -> None:
# all exceptions are critical
print(err, file=sys.stderr)
else:
print("Usage:\n\t{} COMMAND [ARG]...'".format(sys.argv[0]), file=sys.stderr)
print("Usage:\n\t{} COMMAND [ARG]...".format(sys.argv[0]), file=sys.stderr)
sys.exit(1)

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
"""Implementation of a HTTP server"""
"""Implementation of an HTTP server"""
import argparse
import os

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
"""Windows: Implementation of a HTTP server"""
"""Windows: Implementation of an HTTP server"""
import argparse
import os

View File

@ -51,7 +51,7 @@ def clear_catalog(certs_path) -> None:
file.write(random_hex)
def main() -> None:
"""Wait for all tests certificate, compute leafhash"""
"""Wait for all test certificates and compute leaf hash"""
parser = argparse.ArgumentParser()
parser.add_argument(