Fix various typos

This commit is contained in:
Michał Trojnara
2025-06-19 12:50:51 +02:00
parent a3fcf41e1a
commit d65a2b5286
7 changed files with 20 additions and 20 deletions

View File

@ -6,7 +6,7 @@
- added PKCS#11 provider support (requires OpenSSL 3.0+) - added PKCS#11 provider support (requires OpenSSL 3.0+)
- added support for providers without specifying "-pkcs11module" option - added support for providers without specifying "-pkcs11module" option
(OpenSSL 3.0+, e.g., for the upcoming CNG provider) (OpenSSL 3.0+, e.g., for the upcoming CNG provider)
- added compatiblity with the CNG engine version 1.1 or later - added compatibility with the CNG engine version 1.1 or later
- added the "-engineCtrl" option to control hardware and CNG engines - added the "-engineCtrl" option to control hardware and CNG engines
- added the '-blobFile' option to specify a file containing the blob content - added the '-blobFile' option to specify a file containing the blob content
- improved unauthenticated blob support (thanks to Asger Hautop Drewsen) - improved unauthenticated blob support (thanks to Asger Hautop Drewsen)

4
appx.c
View File

@ -288,7 +288,7 @@ static void zipWriteCentralDirectoryEntry(BIO *bio, uint64_t *sizeOnDisk, ZIP_CE
static int zipAppendSignatureFile(BIO *bio, ZIP_FILE *zip, uint8_t *data, uint64_t dataSize); static int zipAppendSignatureFile(BIO *bio, ZIP_FILE *zip, uint8_t *data, uint64_t dataSize);
static int zipOverrideFileData(ZIP_CENTRAL_DIRECTORY_ENTRY *entry, uint8_t *data, uint64_t dataSize); static int zipOverrideFileData(ZIP_CENTRAL_DIRECTORY_ENTRY *entry, uint8_t *data, uint64_t dataSize);
static int zipRewriteData(ZIP_FILE *zip, ZIP_CENTRAL_DIRECTORY_ENTRY *entry, BIO *bio, uint64_t *sizeOnDisk); static int zipRewriteData(ZIP_FILE *zip, ZIP_CENTRAL_DIRECTORY_ENTRY *entry, BIO *bio, uint64_t *sizeOnDisk);
static void zipWriteLocalHeader(BIO *bio, uint64_t *sizeonDisk, ZIP_LOCAL_HEADER *heade); static void zipWriteLocalHeader(BIO *bio, uint64_t *sizeonDisk, ZIP_LOCAL_HEADER *header);
static int zipEntryExist(ZIP_FILE *zip, const char *name); static int zipEntryExist(ZIP_FILE *zip, const char *name);
static u_char *zipCalcDigest(ZIP_FILE *zip, const char *fileName, const EVP_MD *md); static u_char *zipCalcDigest(ZIP_FILE *zip, const char *fileName, const EVP_MD *md);
static size_t zipReadFileDataByName(uint8_t **pData, ZIP_FILE *zip, const char *name); static size_t zipReadFileDataByName(uint8_t **pData, ZIP_FILE *zip, const char *name);
@ -1908,7 +1908,7 @@ static size_t zipReadFileData(ZIP_FILE *zip, uint8_t **pData, ZIP_CENTRAL_DIRECT
OPENSSL_free(compressedData); OPENSSL_free(compressedData);
if (ret != Z_OK) { if (ret != Z_OK) {
fprintf(stderr, "Data decompresssion failed, zlib error: %d\n", ret); fprintf(stderr, "Data decompression failed, zlib error: %d\n", ret);
OPENSSL_free(uncompressedData); OPENSSL_free(uncompressedData);
return 0; /* FAILED */ return 0; /* FAILED */
} else { } else {

2
cab.c
View File

@ -696,7 +696,7 @@ static CAB_CTX *cab_ctx_get(char *indata, uint32_t filesize)
* and consist of 4 bytes (little-endian order) * and consist of 4 bytes (little-endian order)
* siglen - additional data size is located at offset 48 (from file beginning) * siglen - additional data size is located at offset 48 (from file beginning)
* and consist of 4 bytes (little-endian order) * and consist of 4 bytes (little-endian order)
* If there are additional headers, size of the CAB archive file is calcualted * If there are additional headers, size of the CAB archive file is calculated
* as additional data offset plus additional data size. * as additional data offset plus additional data size.
*/ */
sigpos = GET_UINT32_LE(indata + 44); sigpos = GET_UINT32_LE(indata + 44);

4
msi.c
View File

@ -2399,8 +2399,8 @@ static int msi_hash_length_get(FILE_FORMAT_CTX *ctx)
/* /*
* Get DigitalSignature and MsiDigitalSignatureEx streams * Get DigitalSignature and MsiDigitalSignatureEx streams
* to check if the signature exists. * to check if the signature exists.
* [in, out] ctx: structure holds input and output datafv * [in, out] ctx: structure holds input and output data
* [returns] 0 on error or 1 on successs * [returns] 0 on error or 1 on success
*/ */
static int msi_check_file(FILE_FORMAT_CTX *ctx) static int msi_check_file(FILE_FORMAT_CTX *ctx)
{ {

View File

@ -2090,7 +2090,7 @@ static X509_CRL *x509_crl_get(FILE_FORMAT_CTX *ctx, char *url)
ctx->options->noverifypeer ? NULL : ctx->options->https_crlfile); ctx->options->noverifypeer ? NULL : ctx->options->https_crlfile);
#endif /* OPENSSL_VERSION_NUMBER<0x30000000L */ #endif /* OPENSSL_VERSION_NUMBER<0x30000000L */
if (!bio) { if (!bio) {
fprintf(stderr, "Faild to get CRL from %s\n\n", url); fprintf(stderr, "Failed to get CRL from %s\n\n", url);
return NULL; /* FAILED */ return NULL; /* FAILED */
} }
crl = d2i_X509_CRL_bio(bio, NULL); /* DER format */ crl = d2i_X509_CRL_bio(bio, NULL); /* DER format */
@ -2100,7 +2100,7 @@ static X509_CRL *x509_crl_get(FILE_FORMAT_CTX *ctx, char *url)
} }
BIO_free_all(bio); BIO_free_all(bio);
if (!crl) { if (!crl) {
fprintf(stderr, "Faild to decode CRL from %s\n\n", url); fprintf(stderr, "Failed to decode CRL from %s\n\n", url);
return NULL; /* FAILED */ return NULL; /* FAILED */
} }
return crl; /* OK */ return crl; /* OK */
@ -4221,17 +4221,17 @@ static int read_token(GLOBAL_OPTIONS *options, ENGINE *engine)
struct { struct {
const char *id; const char *id;
X509 *cert; X509 *cert;
} parms; } params;
parms.id = options->p11cert; params.id = options->p11cert;
parms.cert = NULL; params.cert = NULL;
ENGINE_ctrl_cmd(engine, "LOAD_CERT_CTRL", 0, &parms, NULL, 1); ENGINE_ctrl_cmd(engine, "LOAD_CERT_CTRL", 0, &params, NULL, 1);
if (!parms.cert) { if (!params.cert) {
fprintf(stderr, "Failed to load certificate %s\n", options->p11cert); fprintf(stderr, "Failed to load certificate %s\n", options->p11cert);
ENGINE_finish(engine); ENGINE_finish(engine);
return 0; /* FAILED */ return 0; /* FAILED */
} else } else
sk_X509_push(options->certs, parms.cert); sk_X509_push(options->certs, params.cert);
} }
options->pkey = ENGINE_load_private_key(engine, options->keyfile, NULL, NULL); options->pkey = ENGINE_load_private_key(engine, options->keyfile, NULL, NULL);

View File

@ -17,7 +17,7 @@ CERTS_PATH = os.path.join(RESULT_PATH, "./Testing/certs/")
CONF_PATH = os.path.join(RESULT_PATH, "./Testing/conf/") CONF_PATH = os.path.join(RESULT_PATH, "./Testing/conf/")
LOGS_PATH = os.path.join(RESULT_PATH, "./Testing/logs/") LOGS_PATH = os.path.join(RESULT_PATH, "./Testing/logs/")
REQUEST = os.path.join(FILES_PATH, "./jreq.tsq") REQUEST = os.path.join(FILES_PATH, "./jreq.tsq")
RESPONS = os.path.join(FILES_PATH, "./jresp.tsr") RESPONSE = os.path.join(FILES_PATH, "./jresp.tsr")
OPENSSL_CONF = os.path.join(CONF_PATH, "./openssl_tsa.cnf") OPENSSL_CONF = os.path.join(CONF_PATH, "./openssl_tsa.cnf")
SERVER_LOG = os.path.join(LOGS_PATH, "./server.log") SERVER_LOG = os.path.join(LOGS_PATH, "./server.log")
URL_LOG = os.path.join(LOGS_PATH, "./url.log") URL_LOG = os.path.join(LOGS_PATH, "./url.log")
@ -26,7 +26,7 @@ OPENSSL_TS = ["openssl", "ts",
"-reply", "-config", OPENSSL_CONF, "-reply", "-config", OPENSSL_CONF,
"-passin", "pass:passme", "-passin", "pass:passme",
"-queryfile", REQUEST, "-queryfile", REQUEST,
"-out", RESPONS] "-out", RESPONSE]
class ThreadingHTTPServer(ThreadingMixIn, HTTPServer): class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
@ -86,7 +86,7 @@ class RequestHandler(SimpleHTTPRequestHandler):
self.send_header("Content-type", "application/timestamp-reply") self.send_header("Content-type", "application/timestamp-reply")
self.end_headers() self.end_headers()
resp_data = b'' resp_data = b''
with open(RESPONS, mode="rb") as file: with open(RESPONSE, mode="rb") as file:
resp_data = file.read() resp_data = file.read()
self.wfile.write(resp_data) self.wfile.write(resp_data)

View File

@ -16,7 +16,7 @@ CERTS_PATH = os.path.join(RESULT_PATH, "./Testing/certs/")
CONF_PATH = os.path.join(RESULT_PATH, "./Testing/conf/") CONF_PATH = os.path.join(RESULT_PATH, "./Testing/conf/")
LOGS_PATH = os.path.join(RESULT_PATH, "./Testing/logs/") LOGS_PATH = os.path.join(RESULT_PATH, "./Testing/logs/")
REQUEST = os.path.join(FILES_PATH, "./jreq.tsq") REQUEST = os.path.join(FILES_PATH, "./jreq.tsq")
RESPONS = os.path.join(FILES_PATH, "./jresp.tsr") RESPONSE = os.path.join(FILES_PATH, "./jresp.tsr")
OPENSSL_CONF = os.path.join(CONF_PATH, "./openssl_tsa.cnf") OPENSSL_CONF = os.path.join(CONF_PATH, "./openssl_tsa.cnf")
SERVER_LOG = os.path.join(LOGS_PATH, "./server.log") SERVER_LOG = os.path.join(LOGS_PATH, "./server.log")
URL_LOG = os.path.join(LOGS_PATH, "./url.log") URL_LOG = os.path.join(LOGS_PATH, "./url.log")
@ -26,7 +26,7 @@ OPENSSL_TS = ["openssl", "ts",
"-reply", "-config", OPENSSL_CONF, "-reply", "-config", OPENSSL_CONF,
"-passin", "pass:passme", "-passin", "pass:passme",
"-queryfile", REQUEST, "-queryfile", REQUEST,
"-out", RESPONS] "-out", RESPONSE]
class RequestHandler(SimpleHTTPRequestHandler): class RequestHandler(SimpleHTTPRequestHandler):
@ -82,7 +82,7 @@ class RequestHandler(SimpleHTTPRequestHandler):
self.send_header("Content-type", "application/timestamp-reply") self.send_header("Content-type", "application/timestamp-reply")
self.end_headers() self.end_headers()
resp_data = b'' resp_data = b''
with open(RESPONS, mode="rb") as file: with open(RESPONSE, mode="rb") as file:
resp_data = file.read() resp_data = file.read()
self.wfile.write(resp_data) self.wfile.write(resp_data)
except Exception as err: # pylint: disable=broad-except except Exception as err: # pylint: disable=broad-except