Skip to content

Commit 5043ece

Browse files
Merge pull request #6648 from DimitriPapadopoulos/codespell
Fix typos found by codespell
2 parents a785c39 + 6d9c85a commit 5043ece

15 files changed

Lines changed: 39 additions & 39 deletions

File tree

IDE/SimplicityStudio/user_settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ extern "C" {
173173
/* use heap allocation for ECC points */
174174
#define ALT_ECC_SIZE
175175

176-
/* wolfSSL will compute the FP_MAX_BITS_ECC, but it can be overriden */
176+
/* wolfSSL will compute the FP_MAX_BITS_ECC, but it can be overridden */
177177
//#define FP_MAX_BITS_ECC (256 * 2)
178178
#endif
179179

IDE/apple-universal/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ In order to add the framework to any Xcode project, you can simply drag-and-drop
5656
# Technical Details
5757

5858
## Cross compilation
59-
If you are developing on a macOS machine and want to compile wolfSSL to run on macOS, then you can simply use `configure` without further customisation. However, if you wish to build wolfSSL to run on a different Apple device, then you need to cross-compile wolfSSL. Thankfully, `configure` makes cross compilation relatively straightforward by using the `--host` argument to pass the "[target triple](https://wiki.osdev.org/Target_Triplet)" describing the platform of the system on which you wish the binary to run, as well as a few other options which will are described below. For more details on cross-compilation, please see the [GNU cross-compilation documentation](https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html) and the [wolfSSL manual page on cross-compiling with configure](https://www.wolfssl.com/documentation/manuals/wolfssl/chapter02.html#building-with-configure-with-cross-compile). Note that `clang` is the default compiler on macOS (symlinked to `/usr/bin/gcc`) and natively supports cross compilation for all Apple devices without requiring you to download a separate compiler. This means you do not need to overide the system `CC`/`AR`/`RANLIB` etc. when using configure.
59+
If you are developing on a macOS machine and want to compile wolfSSL to run on macOS, then you can simply use `configure` without further customisation. However, if you wish to build wolfSSL to run on a different Apple device, then you need to cross-compile wolfSSL. Thankfully, `configure` makes cross compilation relatively straightforward by using the `--host` argument to pass the "[target triple](https://wiki.osdev.org/Target_Triplet)" describing the platform of the system on which you wish the binary to run, as well as a few other options which will are described below. For more details on cross-compilation, please see the [GNU cross-compilation documentation](https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html) and the [wolfSSL manual page on cross-compiling with configure](https://www.wolfssl.com/documentation/manuals/wolfssl/chapter02.html#building-with-configure-with-cross-compile). Note that `clang` is the default compiler on macOS (symlinked to `/usr/bin/gcc`) and natively supports cross compilation for all Apple devices without requiring you to download a separate compiler. This means you do not need to override the system `CC`/`AR`/`RANLIB` etc. when using configure.
6060

6161
The generic `configure` invocation required to cross compile a static library for an Apple device is as follows:
6262

doc/QUIC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The separation of HTTP/3 and QUIC is natural when you think about the relationsh
5757

5858
The separation of QUIC's "crypto" parts from its other protocol enabling functions is a matter of security. In its experimental beginnings, QUIC had its own security design. With the emerging TLSv1.3 and all it improvements, plus decades of experience, it seemed rather unwise to have something separate in QUIC.
5959

60-
Therefore, the complete TLSv1.3 handshake became part of the QUIC protocol, with some restrictions and simplifications (UDP based QUIC does not accommodate broken TCP middle boxes). With the need for a complete TLSv1.3 stack, QUIC implementors happily make use of existing TLS libraries.
60+
Therefore, the complete TLSv1.3 handshake became part of the QUIC protocol, with some restrictions and simplifications (UDP based QUIC does not accommodate broken TCP middle boxes). With the need for a complete TLSv1.3 stack, QUIC implementers happily make use of existing TLS libraries.
6161

6262
## wolfSSL API
6363

src/internal.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6309,7 +6309,7 @@ static void InitSuites_EitherSide(Suites* suites, ProtocolVersion pv, int keySz,
63096309
word16 haveFalconSig, word16 haveDilithiumSig, word16 haveAnon,
63106310
int side)
63116311
{
6312-
/* make sure server has DH parms, and add PSK if there */
6312+
/* make sure server has DH params, and add PSK if there */
63136313
if (side == WOLFSSL_SERVER_END) {
63146314
InitSuites(suites, pv, keySz, haveRSA, havePSK, haveDH, haveECDSAsig,
63156315
haveECC, TRUE, haveStaticECC, haveFalconSig,
@@ -6939,7 +6939,7 @@ int InitHandshakeHashesAndCopy(WOLFSSL* ssl, HS_Hashes* source,
69396939
return ret;
69406940
}
69416941

6942-
/* called if user attempts to re-use WOLFSSL object for a new session.
6942+
/* called if user attempts to reuse WOLFSSL object for a new session.
69436943
* For example wolfSSL_clear() is called then wolfSSL_connect or accept */
69446944
int ReinitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
69456945
{
@@ -26430,7 +26430,7 @@ int PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, word32 hashSigAlgoSz)
2643026430
if (hashAlgo < ssl->options.hashAlgo)
2643126431
break;
2643226432
#else
26433-
/* Is hash algorithm stonger than last chosen? */
26433+
/* Is hash algorithm stronger than last chosen? */
2643426434
if (ret == 0 && hashAlgo > ssl->options.hashAlgo)
2643526435
break;
2643626436
#endif
@@ -27252,7 +27252,7 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
2725227252
*
2725327253
* @param [in] sigAlgo Signature algorithm.
2725427254
* @return 1 when caching required.
27255-
* @return 0 when cacheing not required.
27255+
* @return 0 when caching not required.
2725627256
*/
2725727257
static int SigAlgoCachesMsgs(int sigAlgo)
2725827258
{

src/pk.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7955,10 +7955,10 @@ void wolfSSL_DH_get0_pqg(const WOLFSSL_DH *dh, const WOLFSSL_BIGNUM **p,
79557955
* free'd with a call to wolfSSL_DH_free -- not individually.
79567956
*
79577957
* @param [in, out] dh DH key to set.
7958-
* @parma [in] p Prime value to set. May be NULL when value already
7958+
* @param [in] p Prime value to set. May be NULL when value already
79597959
* present.
7960-
* @parma [in] q Order value to set. May be NULL.
7961-
* @parma [in] g Generator value to set. May be NULL when value already
7960+
* @param [in] q Order value to set. May be NULL.
7961+
* @param [in] g Generator value to set. May be NULL when value already
79627962
* present.
79637963
* @return 1 on success.
79647964
* @return 0 on failure.
@@ -8258,7 +8258,7 @@ int wolfSSL_DH_check(const WOLFSSL_DH *dh, int *codes)
82588258
/* Generate DH parameters.
82598259
*
82608260
* @param [in] prime_len Length of prime in bits.
8261-
* @param [in] generator Gnerator value to use.
8261+
* @param [in] generator Generator value to use.
82628262
* @param [in] callback Called with progress information. Unused.
82638263
* @param [in] cb_arg User callback argument. Unused.
82648264
* @return NULL on failure.
@@ -8293,7 +8293,7 @@ WOLFSSL_DH *wolfSSL_DH_generate_parameters(int prime_len, int generator,
82938293
*
82948294
* @param [in] dh DH key to generate parameters into.
82958295
* @param [in] prime_len Length of prime in bits.
8296-
* @param [in] generator Gnerator value to use.
8296+
* @param [in] generator Generator value to use.
82978297
* @param [in] callback Called with progress information. Unused.
82988298
* @param [in] cb_arg User callback argument. Unused.
82998299
* @return 0 on failure.
@@ -10464,7 +10464,7 @@ int wolfSSL_EC_POINT_set_affine_coordinates_GFp(const WOLFSSL_EC_GROUP* group,
1046410464
/* Add two points on the same together.
1046510465
*
1046610466
* @param [in] curveIdx Index of curve in ecc_set.
10467-
* @oaram [out] r Result point.
10467+
* @param [out] r Result point.
1046810468
* @param [in] p1 First point to add.
1046910469
* @param [in] p2 Second point to add.
1047010470
* @return 1 on success.
@@ -13446,7 +13446,7 @@ int wolfSSL_i2d_ECDSA_SIG(const WOLFSSL_ECDSA_SIG *sig, unsigned char **pp)
1344613446
return (int)len;
1344713447
}
1344813448

13449-
/* Get the pointer to the feilds of the ECDSA signature.
13449+
/* Get the pointer to the fields of the ECDSA signature.
1345013450
*
1345113451
* r and s untouched when sig is NULL.
1345213452
*

src/ssl.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4481,7 +4481,7 @@ int wolfSSL_shutdown(WOLFSSL* ssl)
44814481
}
44824482

44834483
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
4484-
/* reset WOLFSSL structure state for possible re-use */
4484+
/* reset WOLFSSL structure state for possible reuse */
44854485
if (ret == WOLFSSL_SUCCESS) {
44864486
if (wolfSSL_clear(ssl) != WOLFSSL_SUCCESS) {
44874487
WOLFSSL_MSG("could not clear WOLFSSL");
@@ -12079,7 +12079,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1207912079
WOLFSSL_ENTER("wolfSSL_connect");
1208012080

1208112081
/* make sure this wolfSSL object has arrays and rng setup. Protects
12082-
* case where the WOLFSSL object is re-used via wolfSSL_clear() */
12082+
* case where the WOLFSSL object is reused via wolfSSL_clear() */
1208312083
if ((ret = ReinitSSL(ssl, ssl->ctx, 0)) != 0) {
1208412084
return ret;
1208512085
}
@@ -12567,7 +12567,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
1256712567
WOLFSSL_ENTER("wolfSSL_accept");
1256812568

1256912569
/* make sure this wolfSSL object has arrays and rng setup. Protects
12570-
* case where the WOLFSSL object is re-used via wolfSSL_clear() */
12570+
* case where the WOLFSSL object is reused via wolfSSL_clear() */
1257112571
if ((ret = ReinitSSL(ssl, ssl->ctx, 0)) != 0) {
1257212572
return ret;
1257312573
}
@@ -14358,7 +14358,7 @@ int AddSessionToCache(WOLFSSL_CTX* ctx, WOLFSSL_SESSION* addSession,
1435814358
cacheSession->peer = NULL;
1435914359
#endif
1436014360
#ifdef HAVE_SESSION_TICKET
14361-
/* If we can re-use the existing buffer in cacheSession then we won't touch
14361+
/* If we can reuse the existing buffer in cacheSession then we won't touch
1436214362
* ticBuff at all making it a very cheap malloc/free. The page on a modern
1436314363
* OS will most likely not even be allocated to the process. */
1436414364
if (ticBuff != NULL && cacheSession->ticketLenAlloc < ticLen) {
@@ -20142,8 +20142,8 @@ static int wolfSSL_DupSessionEx(const WOLFSSL_SESSION* input,
2014220142
}
2014320143
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_TICKET_NONCE_MALLOC) && \
2014420144
(!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
20145-
/* free the data, it would be better to re-use the buffer but this
20146-
* maintain the code simpler. A smart allocator should re-use the free'd
20145+
/* free the data, it would be better to reuse the buffer but this
20146+
* maintain the code simpler. A smart allocator should reuse the free'd
2014720147
* buffer in the next malloc without much performance penalties. */
2014820148
if (output->ticketNonce.data != output->ticketNonce.dataStatic) {
2014920149

src/ssl_certman.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void wolfSSL_CertManagerFree(WOLFSSL_CERT_MANAGER* cm)
188188
#ifdef HAVE_CRL
189189
/* Dispose of CRL handler. */
190190
if (cm->crl != NULL) {
191-
/* Dispose of CRL object - indicating dynamicly allocated. */
191+
/* Dispose of CRL object - indicating dynamically allocated. */
192192
FreeCRL(cm->crl, 1);
193193
}
194194
#endif
@@ -618,7 +618,7 @@ int CM_VerifyBuffer_ex(WOLFSSL_CERT_MANAGER* cm, const unsigned char* buff,
618618
if (ret == 0)
619619
#endif
620620
{
621-
/* Reset fields of decoded certifcate. */
621+
/* Reset fields of decoded certificate. */
622622
XMEMSET(cert, 0, sizeof(DecodedCert));
623623

624624
if (format == WOLFSSL_FILETYPE_PEM) {
@@ -1590,7 +1590,7 @@ int wolfSSL_CertManagerEnableCRL(WOLFSSL_CERT_MANAGER* cm, int options)
15901590
/* Initialize CRL object. */
15911591
if (InitCRL(cm->crl, cm) != 0) {
15921592
WOLFSSL_MSG("Init CRL failed");
1593-
/* Dispose of CRL object - indicating dynamicly allocated.
1593+
/* Dispose of CRL object - indicating dynamically allocated.
15941594
*/
15951595
FreeCRL(cm->crl, 1);
15961596
cm->crl = NULL;
@@ -1707,7 +1707,7 @@ int wolfSSL_CertManagerFreeCRL(WOLFSSL_CERT_MANAGER* cm)
17071707
}
17081708
/* Check whether CRL object exists. */
17091709
if ((ret == WOLFSSL_SUCCESS) && (cm->crl != NULL)) {
1710-
/* Dispose of CRL object - indicating dynamicly allocated. */
1710+
/* Dispose of CRL object - indicating dynamically allocated. */
17111711
FreeCRL(cm->crl, 1);
17121712
cm->crl = NULL;
17131713
}
@@ -1943,7 +1943,7 @@ int wolfSSL_CertManagerEnableOCSP(WOLFSSL_CERT_MANAGER* cm, int options)
19431943
}
19441944
#else
19451945
if (ret == WOLFSSL_SUCCESS) {
1946-
/* Check wheter OCSP object is available. */
1946+
/* Check whether OCSP object is available. */
19471947
if (cm->ocsp == NULL) {
19481948
/* Allocate memory for OCSP object. */
19491949
cm->ocsp = (WOLFSSL_OCSP*)XMALLOC(sizeof(WOLFSSL_OCSP), cm->heap,
@@ -1957,7 +1957,7 @@ int wolfSSL_CertManagerEnableOCSP(WOLFSSL_CERT_MANAGER* cm, int options)
19571957
/* Initialize the OCSP object. */
19581958
if (InitOCSP(cm->ocsp, cm) != 0) {
19591959
WOLFSSL_MSG("Init OCSP failed");
1960-
/* Dispose of OCSP object - indicating dynamicly allocated.
1960+
/* Dispose of OCSP object - indicating dynamically allocated.
19611961
*/
19621962
FreeOCSP(cm->ocsp, 1);
19631963
cm->ocsp = NULL;
@@ -2048,7 +2048,7 @@ int wolfSSL_CertManagerEnableOCSPStapling(WOLFSSL_CERT_MANAGER* cm)
20482048
#else
20492049
#ifndef NO_WOLFSSL_SERVER
20502050
if (ret == WOLFSSL_SUCCESS) {
2051-
/* Check wheter OCSP object is available. */
2051+
/* Check whether OCSP object is available. */
20522052
if (cm->ocsp_stapling == NULL) {
20532053
/* Allocate memory for OCSP stapling object. */
20542054
cm->ocsp_stapling = (WOLFSSL_OCSP*)XMALLOC(sizeof(WOLFSSL_OCSP),
@@ -2062,7 +2062,7 @@ int wolfSSL_CertManagerEnableOCSPStapling(WOLFSSL_CERT_MANAGER* cm)
20622062
/* Initialize the OCSP stapling object. */
20632063
if (InitOCSP(cm->ocsp_stapling, cm) != 0) {
20642064
WOLFSSL_MSG("Init OCSP failed");
2065-
/* Dispose of OCSP stapling object - indicating dynamicly
2065+
/* Dispose of OCSP stapling object - indicating dynamically
20662066
* allocated. */
20672067
FreeOCSP(cm->ocsp_stapling, 1);
20682068
cm->ocsp_stapling = NULL;

tests/api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7746,7 +7746,7 @@ static int test_wolfSSL_reuse_WOLFSSLobj(void)
77467746
#if defined(OPENSSL_EXTRA) && !defined(NO_SESSION_CACHE) && \
77477747
!defined(WOLFSSL_NO_TLS12)
77487748
/* The unit test for session resumption by re-using WOLFSSL object.
7749-
* WOLFSSL object is not cleared after first session. It re-use the object
7749+
* WOLFSSL object is not cleared after first session. It reuse the object
77507750
* for second connection.
77517751
*/
77527752
tcp_ready ready;
@@ -51728,7 +51728,7 @@ static int test_wolfssl_EVP_aes_gcm_AAD_2_parts(void)
5172851728

5172951729
ExpectIntEQ(XMEMCMP(decryptBuf, cleartext, len), 0);
5173051730

51731-
/* Test AAD re-use */
51731+
/* Test AAD reuse */
5173251732
EVP_CIPHER_CTX_free(ctx);
5173351733
#endif
5173451734
return EXPECT_RESULT();
@@ -62888,7 +62888,7 @@ static int test_dtls_ipv6_check(void)
6288862888

6288962889
ExpectIntEQ(wolfSSL_dtls_set_peer(ssl_s, &fake_addr6, sizeof(fake_addr6)),
6289062890
WOLFSSL_SUCCESS);
62891-
/* re-use the socket */
62891+
/* reuse the socket */
6289262892
ExpectIntEQ(wolfSSL_set_fd(ssl_c, sockfd), WOLFSSL_SUCCESS);
6289362893
wolfSSL_dtls_set_using_nonblock(ssl_s, 1);
6289462894
ExpectIntNE(wolfSSL_accept(ssl_s), WOLFSSL_SUCCESS);

testsuite/testsuite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ void join_thread(THREAD_TYPE thread)
724724
/* Create SHA-256 hash of the file based on filename.
725725
*
726726
* @param [in] file Name of file.
727-
* @parma [out] check Buffer to hold SHA-256 hash.
727+
* @param [out] check Buffer to hold SHA-256 hash.
728728
*/
729729
void file_test(const char* file, byte* check)
730730
{

wolfcrypt/src/asn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18265,7 +18265,7 @@ static int DecodeAltNames(const byte* input, word32 sz, DecodedCert* cert)
1826518265
rid->name[strLen] = '\0';
1826618266

1826718267
if (GenerateDNSEntryRIDString(rid, cert->heap) != 0) {
18268-
WOLFSSL_MSG("\tOut of Memory for registerd Id string");
18268+
WOLFSSL_MSG("\tOut of Memory for registered Id string");
1826918269
XFREE(rid->name, cert->heap, DYNAMIC_TYPE_ALTNAME);
1827018270
XFREE(rid, cert->heap, DYNAMIC_TYPE_ALTNAME);
1827118271
return MEMORY_E;

0 commit comments

Comments
 (0)