From d65a2b52862ad0bca1656fed284442e4d481e050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Trojnara?= Date: Thu, 19 Jun 2025 12:50:51 +0200 Subject: [PATCH] Fix various typos --- NEWS.md | 2 +- appx.c | 4 ++-- cab.c | 2 +- msi.c | 4 ++-- osslsigncode.c | 16 ++++++++-------- tests/server_http.py | 6 +++--- tests/server_http.pyw | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/NEWS.md b/NEWS.md index 7962ba3..ad277c3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,7 +6,7 @@ - added PKCS#11 provider support (requires OpenSSL 3.0+) - added support for providers without specifying "-pkcs11module" option (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 '-blobFile' option to specify a file containing the blob content - improved unauthenticated blob support (thanks to Asger Hautop Drewsen) diff --git a/appx.c b/appx.c index cb01643..56aef7d 100644 --- a/appx.c +++ b/appx.c @@ -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 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 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 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); @@ -1908,7 +1908,7 @@ static size_t zipReadFileData(ZIP_FILE *zip, uint8_t **pData, ZIP_CENTRAL_DIRECT OPENSSL_free(compressedData); 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); return 0; /* FAILED */ } else { diff --git a/cab.c b/cab.c index 517d5e9..14c1aea 100644 --- a/cab.c +++ b/cab.c @@ -696,7 +696,7 @@ static CAB_CTX *cab_ctx_get(char *indata, uint32_t filesize) * and consist of 4 bytes (little-endian order) * siglen - additional data size is located at offset 48 (from file beginning) * 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. */ sigpos = GET_UINT32_LE(indata + 44); diff --git a/msi.c b/msi.c index 0ed20af..2e6ddbf 100644 --- a/msi.c +++ b/msi.c @@ -2399,8 +2399,8 @@ static int msi_hash_length_get(FILE_FORMAT_CTX *ctx) /* * Get DigitalSignature and MsiDigitalSignatureEx streams * to check if the signature exists. - * [in, out] ctx: structure holds input and output datafv - * [returns] 0 on error or 1 on successs + * [in, out] ctx: structure holds input and output data + * [returns] 0 on error or 1 on success */ static int msi_check_file(FILE_FORMAT_CTX *ctx) { diff --git a/osslsigncode.c b/osslsigncode.c index 70c0d7d..3bf0a0b 100644 --- a/osslsigncode.c +++ b/osslsigncode.c @@ -2090,7 +2090,7 @@ static X509_CRL *x509_crl_get(FILE_FORMAT_CTX *ctx, char *url) ctx->options->noverifypeer ? NULL : ctx->options->https_crlfile); #endif /* OPENSSL_VERSION_NUMBER<0x30000000L */ 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 */ } 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); 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 crl; /* OK */ @@ -4221,17 +4221,17 @@ static int read_token(GLOBAL_OPTIONS *options, ENGINE *engine) struct { const char *id; X509 *cert; - } parms; + } params; - parms.id = options->p11cert; - parms.cert = NULL; - ENGINE_ctrl_cmd(engine, "LOAD_CERT_CTRL", 0, &parms, NULL, 1); - if (!parms.cert) { + params.id = options->p11cert; + params.cert = NULL; + ENGINE_ctrl_cmd(engine, "LOAD_CERT_CTRL", 0, ¶ms, NULL, 1); + if (!params.cert) { fprintf(stderr, "Failed to load certificate %s\n", options->p11cert); ENGINE_finish(engine); return 0; /* FAILED */ } 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); diff --git a/tests/server_http.py b/tests/server_http.py index 716859b..629494c 100644 --- a/tests/server_http.py +++ b/tests/server_http.py @@ -17,7 +17,7 @@ CERTS_PATH = os.path.join(RESULT_PATH, "./Testing/certs/") CONF_PATH = os.path.join(RESULT_PATH, "./Testing/conf/") LOGS_PATH = os.path.join(RESULT_PATH, "./Testing/logs/") 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") SERVER_LOG = os.path.join(LOGS_PATH, "./server.log") URL_LOG = os.path.join(LOGS_PATH, "./url.log") @@ -26,7 +26,7 @@ OPENSSL_TS = ["openssl", "ts", "-reply", "-config", OPENSSL_CONF, "-passin", "pass:passme", "-queryfile", REQUEST, - "-out", RESPONS] + "-out", RESPONSE] class ThreadingHTTPServer(ThreadingMixIn, HTTPServer): @@ -86,7 +86,7 @@ class RequestHandler(SimpleHTTPRequestHandler): self.send_header("Content-type", "application/timestamp-reply") self.end_headers() resp_data = b'' - with open(RESPONS, mode="rb") as file: + with open(RESPONSE, mode="rb") as file: resp_data = file.read() self.wfile.write(resp_data) diff --git a/tests/server_http.pyw b/tests/server_http.pyw index 31481ee..d955465 100644 --- a/tests/server_http.pyw +++ b/tests/server_http.pyw @@ -16,7 +16,7 @@ CERTS_PATH = os.path.join(RESULT_PATH, "./Testing/certs/") CONF_PATH = os.path.join(RESULT_PATH, "./Testing/conf/") LOGS_PATH = os.path.join(RESULT_PATH, "./Testing/logs/") 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") SERVER_LOG = os.path.join(LOGS_PATH, "./server.log") URL_LOG = os.path.join(LOGS_PATH, "./url.log") @@ -26,7 +26,7 @@ OPENSSL_TS = ["openssl", "ts", "-reply", "-config", OPENSSL_CONF, "-passin", "pass:passme", "-queryfile", REQUEST, - "-out", RESPONS] + "-out", RESPONSE] class RequestHandler(SimpleHTTPRequestHandler): @@ -82,7 +82,7 @@ class RequestHandler(SimpleHTTPRequestHandler): self.send_header("Content-type", "application/timestamp-reply") self.end_headers() resp_data = b'' - with open(RESPONS, mode="rb") as file: + with open(RESPONSE, mode="rb") as file: resp_data = file.read() self.wfile.write(resp_data) except Exception as err: # pylint: disable=broad-except