From: Dmitry Misharov Date: Tue, 30 Sep 2025 08:44:55 +0000 (+0200) Subject: add codespell pre-commit check and fix found misspellings X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ade36d6b9a36df5a3c073653a65fefef10ac8de;p=thirdparty%2Fopenssl.git add codespell pre-commit check and fix found misspellings Reviewed-by: Saša Nedvědický Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/28436) --- diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000000..8103b70a7e4 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,452 @@ +[codespell] +ignore-regex = \b[a-zA-Z][a-zA-Z]\b + +uri-ignore-words-list = + standarts + +ignore-words-list = + aas, + Aas, + AAS, + abd, + ABD, + accreting, + ADDAD, + addin, + adin, + AFAIR, + afile, + afterAll, + AfterAll, + Ake, + ALine, + allEdges, + alloced, + alloco, + allws, + alo, + Alo, + alow, + ALS, + alsptd, + ang, + ans, + anS, + ANS, + aNULL, + archType, + arithmetics, + assertIn, + ategory, + atLeast, + AtLeast, + atMost, + biom, + bion, + bootup, + BRE, + Buda, + buildd, + bve, + CAF, + cann, + CANN, + cant, + Chang, + checkin, + childs, + ciph, + circularly, + Circularly, + claus, + Claus, + clen, + CLOS, + co-ordinate, + co-ordinates, + Collet, + Collison, + compilability, + compileTime, + CompileTime, + complies, + COMPLIES, + configury, + consumation, + couldn, + crasher, + crashers, + crate, + Crate, + CRATE, + creat, + CREAT, + CrOS, + crypted, + CRYPTED, + currentY, + DAA, + datas, + debbugs, + Debbugs, + DELET, + dependancies, + dependancy, + dependant, + deque, + Deque, + dota, + doubleclick, + doubleClick, + DoubleClick, + dout, + Dout, + DOUT, + dum, + dur, + Dur, + Durin, + ect, + ECT, + ede, + EDE, + endianess, + endin, + engineerr, + ENGINEerr, + equest, + equests, + FileTest, + FILETEST, + filetests, + flate, + Flate, + FLATE, + fpr, + FPR, + FPT, + gord, + gost, + Gost, + GOST, + Hart, + hasTable, + hel, + hist, + HIST, + HSI, + htmp, + ifset, + igest, + iif, + IIF, + implementor, + Implementor, + implementors, + Implementors, + inactivate, + inbrace, + indention, + indx, + ine, + informat, + inh, + inout, + inOut, + InOut, + INOUT, + ISCONNECTION, + isnt, + ist, + IST, + keep-alives, + keypair, + keyPair, + Keypair, + KeyPair, + KEYPAIR, + keypairs, + keyPairs, + Keypairs, + KeyPairs, + keyserver, + LAMDA, + larg, + leapYear, + LOd, + LOD, + Maked, + Manger, + Manuel, + ment, + Merget, + minimise, + mis, + Mis, + MIS, + mitre, + Mitre, + MITRE, + mmaped, + msdos, + MSDOS, + nam, + Nam, + NAM, + nclusion, + Ned, + nin, + Nin, + nmake, + NMake, + NMAKE, + NOo, + notin, + Notin, + NotIn, + numer, + OCE, + offsetp, + ois, + onText, + OnText, + openin, + OptIn, + OPTIO, + origN, + outin, + paeth, + Paeth, + PAETH, + parm, + pARM, + Parm, + PARM, + parms, + pARMS, + Parms, + PARMs, + PARMS, + pass-thru, + passin, + poping, + pres, + Pres, + prevEnd, + pris, + PullRequest, + que, + re-usable, + Re-usable, + re-use, + Re-use, + re-used, + Re-used, + re-uses, + Re-uses, + re-using, + Re-using, + readd, + Readd, + readded, + Readded, + regArg, + regArgs, + requestor, + Requestor, + requestors, + rewinded, + roperties, + sav, + SEH, + ser, + Ser, + SER, + servent, + sHolder, + shouldBe, + shouldnot, + SHS, + siz, + SIZ, + SME, + SOM, + Sorce, + sover, + splitted, + statics, + Statics, + strRange, + succes, + technics, + testss, + therefor, + Therefor, + therefrom, + Thi, + thirdparty, + thirdParty, + Thirdparty, + ThirdParty, + THIRDPARTY, + thru, + Thur, + THUR, + tmplate, + tne, + tolen, + tthe, + ture, + uis, + UIs, + upto, + upTo, + uptodate, + upToDate, + UpToDate, + useable, + Useable, + userA, + UserA, + usign, + varN, + vertexes, + vew, + vor, + WAN, + wasn, + Widgits, + Wirth, + wont, + WRONLY, + WTH + +skip = + [cC]hange.[lL]og*, + [cC]hange[lL]og*, + [cC]hanges, + [cC]hanges[._-]*, + *__*__*.html, + *_8h_source.html, + *_8h.html, + *.asc, + *.bin, + *.crt, + *.css.map, + *.eps, + *.fr.utf-8, + *.git, + *.html.de, + *.html.es, + *.html.fr, + *.html.ko.euc-kr, + *.html.pt-br, + *.info_[0-9], + *.ipynb, + *.ja.utf8, + *.js.map, + *.min.js, + *.pdf, + *.pem, + *.po, + *.ppm, + *.ps, + *.rtf, + *.sum, + *.svg, + *.svn, + *.tr.utf8, + *.xpm, + *.zh-cn.utf8, + *.zlib, + *[._-][cC]hanges, + *[._-]CHANGES, + */.mailmap, + */.versions/*, + */[eE]ncode/*, + */[eE]ncodings/*, + */[lL]ang/*, + */[lL]anguage/*, + */[lL]anguages/*, + */[lL]ocale, + */[mM]ath[jJ]ax/*, + */[tT]hird*[pP]arty/*, + */[tT]ranslation/*, + */[tT]ranslations/*, + */*.desktop, + */*.desktop.in, + */*[^a/]test/*, + */*[^a/]tests/*, + */*[lL]ocal[ei]*/*, + */3rd*[pP]arty/*, + */aspell/*, + */AUTHORS*, + */charsets/*, + */chrtrans/*, + */codepage/*, + */data/*, + */deps/*, + */dict/*, + */dictionaries/*, + */doc*/[a-df-z][a-z]/*, + */doc*/[a-z][a-z][_-][a-zA-Z][a-zA-Z]/*, + */doc*/e[a-mo-z]/*, + */extern/*, + */external/*, + */externals/*, + */help/[a-df-z][a-z]/*, + */help/[a-z][a-z]_[A-Z][A-Z]/*, + */help/es/*, + */i18n/*, + */icu/*, + */info/[a-df-z][a-z]/*, + */info/[a-z][a-z]_[A-Z][A-Z]/*, + */info/es/*, + */intl/*, + */l10n/*, + */langmap/*, + */langs/*, + */LICENSE, + */man*/[a-df-z][a-z]/*, + */man*/[a-z][a-z][_-][a-zA-Z][a-zA-Z]/*, + */man*/e[a-mo-z]/*, + */messages[_./][a-df-z][a-z][_./]*, + */messages[_./][a-z][a-z]_[A-Z][A-Z][_./]*, + */messages[_./]es[_./]*, + */rfc[1-9]*.txt, + */runtime/*, + */searchindex.js, + */test*/*, + */test/danetest.in, + */test/data2.bin, + */test/recipes/30-test_evp_data/evppkey_kas.txt, + */test/recipes/30-test_evp_data/evppkey.txt, + */unicode/*, + */Unicode/*, + */unicore/*, + */vendor/*, + */vendors/*, + */yarn.lock, + *codespell-check.sh, + *lorem-ipsum*, + *man[12345657]/* + /fonts/*, + ABOUT-NLS, + authors.xml, + CHANGE.log*, + CHANGELOG*, + CHANGES, + CHANGES[._-]*, + CONTRIBUTORS*, + CREDITS, + CREDITS.TXT, + DONATIONS, + jquery.js, + jquery.min.map, + localization*-[a-z][a-z]_[a-zA-Z][a-zA-Z].*, + localization*-[a-z][a-z].*, + MAINTAINERS, + NormalizationTest.txt, + package-lock.json, + THANKS*, + UnicodeData.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000000..15e0e754a3d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +ci: + autofix_prs: false +repos: + - repo: "https://github.com/codespell-project/codespell" + rev: "v2.4.1" + hooks: + - id: "codespell" + args: ["--config=.codespellrc", "."] + pass_filenames: false diff --git a/.pre-commit-config.yml b/.pre-commit-config.yml deleted file mode 100644 index 8bf782888a5..00000000000 --- a/.pre-commit-config.yml +++ /dev/null @@ -1,8 +0,0 @@ -ci: - autofix_prs: false -repos: - - repo: "https://github.com/pre-commit/mirrors-clang-format" - rev: "v21.1.0" - hooks: - - id: "clang-format" - types_or: ["c"] diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 469e8b5784a..88136eba514 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -772,7 +772,7 @@ static int add_object(const ASN1_OBJECT *obj, int indirect) /* * Indirect calls leave the NID unspecified, in which case we generate a - * fresh NID here. Direct calls via `OBJ_add_object()` must explicity + * fresh NID here. Direct calls via `OBJ_add_object()` must explicitly * specify the nid, and we then also check against the compile-time bsearch * lists that the indirect calls have checked while holding a read lock. */ diff --git a/doc/man7/EVP_PKEY-ML-DSA.pod b/doc/man7/EVP_PKEY-ML-DSA.pod index 3948fe6a5a4..e87053b0a18 100644 --- a/doc/man7/EVP_PKEY-ML-DSA.pod +++ b/doc/man7/EVP_PKEY-ML-DSA.pod @@ -19,7 +19,7 @@ and the private key I. Each of the different key types has an associated security category. This value is one of 2, 3 or 5 for key types B, B and B respectively, which correspond to security strengths of -128, 192 and 256 repsectively. +128, 192 and 256 respectively. =head2 Keygen Parameters diff --git a/doc/man7/EVP_PKEY-ML-KEM.pod b/doc/man7/EVP_PKEY-ML-KEM.pod index ea9a5f0b411..be12a50ccff 100644 --- a/doc/man7/EVP_PKEY-ML-KEM.pod +++ b/doc/man7/EVP_PKEY-ML-KEM.pod @@ -110,7 +110,7 @@ configuration options programmatically. =item C (B) -When an B key is imported as an explict FIPS 203 B decapsulation +When an B key is imported as an explicit FIPS 203 B decapsulation key, rather than a seed, a pairwise consistency test (PCT) is optionally performed. By default, or when this parameter is set explicitly to C, the PCT diff --git a/doc/man7/EVP_SIGNATURE-ML-DSA.pod b/doc/man7/EVP_SIGNATURE-ML-DSA.pod index 3b6e795f070..c9ccf1aafb8 100644 --- a/doc/man7/EVP_SIGNATURE-ML-DSA.pod +++ b/doc/man7/EVP_SIGNATURE-ML-DSA.pod @@ -17,7 +17,7 @@ L Section 4 Table 1. (The signatures range in size from ~2.5K to ~4.5K depending on the type chosen). There are 3 different security categories also depending on the type. -L can be used to explicitely fetch one of the 3 +L can be used to explicitly fetch one of the 3 algorithms which can then be used with L, L, L, and L to perform one-shot message signing or signature verification. @@ -87,7 +87,7 @@ See L for information related to B keys. =head1 NOTES -For backwards compatability reasons EVP_DigestSignInit_ex(), EVP_DigestSign(), +For backwards compatibility reasons EVP_DigestSignInit_ex(), EVP_DigestSign(), EVP_DigestVerifyInit_ex() and EVP_DigestVerify() may also be used, but the digest passed in I must be NULL. diff --git a/doc/man7/EVP_SIGNATURE-SLH-DSA.pod b/doc/man7/EVP_SIGNATURE-SLH-DSA.pod index de2be646ed6..c1699793ce3 100644 --- a/doc/man7/EVP_SIGNATURE-SLH-DSA.pod +++ b/doc/man7/EVP_SIGNATURE-SLH-DSA.pod @@ -28,7 +28,7 @@ C types have smaller signature sizes, and the C variants are faster, (The signatures range from ~8K to ~50K depending on the type chosen). There are 3 different security categories also depending on the type. -L can be used to explicitely fetch one of the 12 +L can be used to explicitly fetch one of the 12 algorithms which can then be used with L, L, L, and L to perform one-shot message signing or verification. @@ -38,7 +38,7 @@ encodes the message internally as 0x00 || len(ctx) || ctx || message. where B is some optional value of size 0x00..0xFF. OpenSSL also allows the message to not be encoded which is required for testing. OpenSSL does not support Pre Hash SLH-DSA Signature Generation, but this -may be done by the user by doing Pre hash encoding externally and then chosing +may be done by the user by doing Pre hash encoding externally and then choosing the option to not encode the message. =head2 SLH-DSA Signature Parameters diff --git a/doc/man7/openssl-quic-concurrency.pod b/doc/man7/openssl-quic-concurrency.pod index ded22a1e8b9..e79dd2a3a2c 100644 --- a/doc/man7/openssl-quic-concurrency.pod +++ b/doc/man7/openssl-quic-concurrency.pod @@ -196,7 +196,7 @@ Specifying this flag configures the Single-Threaded Concurrency Model (SCM). =item B -Speciyfing this flag configures the Contentive Concurrency Model (CCM) (unless +Specifying this flag configures the Contentive Concurrency Model (CCM) (unless B is also specified). =item B diff --git a/doc/man7/openssl-quic.pod b/doc/man7/openssl-quic.pod index 2379ce7fb99..35661e15b7c 100644 --- a/doc/man7/openssl-quic.pod +++ b/doc/man7/openssl-quic.pod @@ -566,7 +566,7 @@ L. =item L -Accepts a new incoming connection for a listner SSL object. A new SSL object +Accepts a new incoming connection for a listener SSL object. A new SSL object representing the accepted connection is created and returned on success. If no incoming connection is available and the listener SSL object is configured in nonblocking mode, NULL is returned. diff --git a/doc/man7/provider-signature.pod b/doc/man7/provider-signature.pod index f330e2d2ef3..0fc3e8a16ef 100644 --- a/doc/man7/provider-signature.pod +++ b/doc/man7/provider-signature.pod @@ -504,7 +504,7 @@ Generation". The FIPS provider does not support deterministic digital signature generation for DSA. -The FIPS provider supports determinisitic digital signature generation for +The FIPS provider supports deterministic digital signature generation for ECDSA. =item "kat" (B) diff --git a/util/codespell-check.sh b/util/codespell-check.sh deleted file mode 100755 index 657bf8db0da..00000000000 --- a/util/codespell-check.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# Run codespell on the OpenSSL tree. -# If you get a false positive here, the usual fix is to -# add it to the end of the -L list of ignored words, below. -# -# Any arguments provided (such as -w) are added to the -# codespell invocation. -# -# You can add this check to your git pre-commit hooks -# with something akin to the following: -# --------8<---------- -#check_codespell_diff() { -# spelling_mistakes="" -# while read -r -d '' path; do -# spelling_mistakes="`util/codespell-check.sh $path`" -# done -# if [ -n "$spelling_mistakes" ]; then -# cat >&2 <