diff --git a/tests/api.c b/tests/api.c index c6c6cc90b..d4ded8bd5 100644 --- a/tests/api.c +++ b/tests/api.c @@ -1156,7 +1156,7 @@ static int test_dual_alg_support(void) SSL_FILETYPE_ASN1), WOLFSSL_SUCCESS); ExpectIntEQ(wolfSSL_CertManagerVerifyBuffer(cm, server, serverSz, SSL_FILETYPE_ASN1), WOLFSSL_SUCCESS); - /* There is only 1 unknown exension (1.2.3.4.5). The other ones are known + /* There is only 1 unknown extension (1.2.3.4.5). The other ones are known * because they are for the dual alg extensions. */ ExpectIntEQ(extCount, 1); wolfSSL_CertManagerFree(cm); diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 1367be546..61e51a36e 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -1378,9 +1378,9 @@ static const char* bench_result_words3[][5] = { /* unsigned int max = 4,294,967,295 */ uint64_t thisVal = 0; /* CPU counter, "this current value" as read. */ uint64_t thisIncrement = 0; /* The adjusted increment amount. */ - uint64_t expected_diff = 0; /* FreeRTOS esimated expected CPU diff. */ + uint64_t expected_diff = 0; /* FreeRTOS estimated expected CPU diff.*/ #ifdef DEBUG_WOLFSSL_BENCHMARK_TIMING - uint32_t tickCount = 0; /* Currrent rtos tick counter. */ + uint32_t tickCount = 0; /* Current rtos tick counter. */ uint32_t tickDiff = 0; /* Tick difference from last check. */ uint32_t tickBeginDiff = 0; /* Tick difference from beginning. */ #endif @@ -1459,7 +1459,7 @@ static const char* bench_result_words3[][5] = { if (expected_diff > UINT_MAX) { /* The number of cycles expected from FreeRTOS ticks is * greater than the maximum size of an unsigned 32-bit - * integer, meaning multiple overflows occured. */ + * integer, meaning multiple overflows occurred. */ #ifdef DEBUG_WOLFSSL_BENCHMARK_TIMING ESP_LOGW(TAG, "expected_diff > UINT_MAX (%u)", UINT_MAX); #endif @@ -1538,7 +1538,7 @@ static const char* bench_result_words3[][5] = { _esp_cpu_count_last = esp_cpu_get_cycle_count(); #else /* TODO: Why doesn't esp_cpu_get_cycle_count work for Xtensa - * when resetting CPU cycle counter? FreeRTOS tick collison? + * when resetting CPU cycle counter? FreeRTOS tick collision? * thisVal = esp_cpu_get_cycle_count(); See also, above * or thisVal = xthal_get_ccount(); */ #if ESP_IDF_VERSION_MAJOR < 5 diff --git a/wolfcrypt/src/dilithium.c b/wolfcrypt/src/dilithium.c index f8968c561..6543155a7 100644 --- a/wolfcrypt/src/dilithium.c +++ b/wolfcrypt/src/dilithium.c @@ -290,7 +290,7 @@ int wc_dilithium_init_id(dilithium_key* key, const unsigned char* id, int len, key->idLen = len; } - /* Set the maxiumum level here */ + /* Set the maximum level here */ wc_dilithium_set_level(key, 5); return ret; @@ -317,7 +317,7 @@ int wc_dilithium_init_label(dilithium_key* key, const char* label, void* heap, key->labelLen = labelLen; } - /* Set the maxiumum level here */ + /* Set the maximum level here */ wc_dilithium_set_level(key, 5); return ret; diff --git a/wolfcrypt/src/falcon.c b/wolfcrypt/src/falcon.c index 2645db639..ac6135463 100644 --- a/wolfcrypt/src/falcon.c +++ b/wolfcrypt/src/falcon.c @@ -282,7 +282,7 @@ int wc_falcon_init_id(falcon_key* key, const unsigned char* id, int len, key->idLen = len; } - /* Set the maxiumum level here */ + /* Set the maximum level here */ wc_falcon_set_level(key, 5); return ret; @@ -309,7 +309,7 @@ int wc_falcon_init_label(falcon_key* key, const char* label, void* heap, key->labelLen = labelLen; } - /* Set the maxiumum level here */ + /* Set the maximum level here */ wc_falcon_set_level(key, 5); return ret; diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index 997fd4f06..96a39f3a5 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -2517,7 +2517,7 @@ static int wc_PKCS7_EncodeContentStreamHelper(PKCS7* pkcs7, int cipherType, } -/* Used for encoding the content, potentially one octet chunck at a time if +/* Used for encoding the content, potentially one octet chunk at a time if * in streaming mode with IO callbacks set. * Can handle the cipher types: * - WC_CIPHER_NONE, used for encoding signed bundle where no encryption is @@ -9746,7 +9746,7 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz) StreamOctetString(NULL, encryptedOutSz, NULL, &streamSz, &tmpIdx); totalSz += (streamSz - encryptedOutSz); - /* resize encrytped content buffer */ + /* resize encrypted content buffer */ if (encryptedContent != NULL) { XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7); encryptedContent = (byte*)XMALLOC(streamSz, pkcs7->heap, diff --git a/wolfcrypt/src/port/Espressif/esp32_mp.c b/wolfcrypt/src/port/Espressif/esp32_mp.c index 1afda2b83..58925626b 100644 --- a/wolfcrypt/src/port/Espressif/esp32_mp.c +++ b/wolfcrypt/src/port/Espressif/esp32_mp.c @@ -413,7 +413,7 @@ static int esp_mp_hw_lock(void) { /* Note these names are different from those in the documentation! * - * Documenation lists the same names as the ESP32-C3: + * Documentation lists the same names as the ESP32-C3: * * DPORT_REG_SET_BIT((volatile void *)(SYSTEM_PERIP_CLK_EN1_REG), * SYSTEM_CRYPTO_RSA_CLK_EN ); diff --git a/wolfcrypt/src/port/Espressif/esp32_sha.c b/wolfcrypt/src/port/Espressif/esp32_sha.c index 332c532a6..a2244af17 100644 --- a/wolfcrypt/src/port/Espressif/esp32_sha.c +++ b/wolfcrypt/src/port/Espressif/esp32_sha.c @@ -128,7 +128,7 @@ static const char* TAG = "wolf_hw_sha"; #ifdef WOLFSSL_DEBUG_MUTEX static portMUX_TYPE sha_crit_sect = portMUX_INITIALIZER_UNLOCKED; WC_ESP32SHA* stray_ctx; - /* each ctx keeps track of the intializer for HW. when debugging + /* each ctx keeps track of the initializer for HW. when debugging * we'll have a global variable to indicate which has the lock. */ static int _sha_lock_count = 0; static int _sha_call_count = 0; @@ -1130,7 +1130,7 @@ int esp_sha_release_unfinished_lock(WC_ESP32SHA* ctx) #ifdef WOLFSSL_DEBUG_MUTEX ESP_LOGE(TAG, "\n>>>> esp_sha_release_unfinished_lock %x\n", ret); #endif - /* unlock only if this ctx is the intializer of the lock */ + /* unlock only if this ctx is the initializer of the lock */ #ifdef SINGLE_THREADED { ret = esp_sha_hw_unlock(ctx); diff --git a/wolfcrypt/src/port/Espressif/esp32_util.c b/wolfcrypt/src/port/Espressif/esp32_util.c index 829afa4a6..03e973ee3 100644 --- a/wolfcrypt/src/port/Espressif/esp32_util.c +++ b/wolfcrypt/src/port/Espressif/esp32_util.c @@ -76,7 +76,7 @@ static int esp_ShowMacroStatus_need_header = 0; #include #include -/* big nums can be very long, perhaps unitialized, so limit displayed words */ +/* big nums can be very long, perhaps uninitialized, so limit displayed words */ #define MAX_WORDS_ESP_SHOW_MP 32 /* diff --git a/wolfcrypt/src/port/autosar/crypto.c b/wolfcrypt/src/port/autosar/crypto.c index e124b3ca5..f7812f190 100644 --- a/wolfcrypt/src/port/autosar/crypto.c +++ b/wolfcrypt/src/port/autosar/crypto.c @@ -431,7 +431,7 @@ Std_ReturnType Crypto_ProcessJob(uint32 objectId, Crypto_JobType* job) break; default: - WOLFSSL_MSG("Unsuported Crypto service"); + WOLFSSL_MSG("Unsupported Crypto service"); ret = E_NOT_OK; break; } diff --git a/wolfcrypt/src/port/liboqs/liboqs.c b/wolfcrypt/src/port/liboqs/liboqs.c index f04cab02c..46733cbbf 100644 --- a/wolfcrypt/src/port/liboqs/liboqs.c +++ b/wolfcrypt/src/port/liboqs/liboqs.c @@ -60,7 +60,7 @@ static void wolfSSL_liboqsGetRandomData(uint8_t* buffer, size_t numOfBytes) ret = wc_RNG_GenerateBlock(liboqsCurrentRNG, buffer, numOfBytes_word32); if (ret != 0) { - /* ToDo: liboqs exits programm if RNG fails, + /* ToDo: liboqs exits program if RNG fails, * not sure what to do here */ WOLFSSL_MSG_EX( diff --git a/wolfcrypt/src/wc_kyber_poly.c b/wolfcrypt/src/wc_kyber_poly.c index fe140f402..a95d812db 100644 --- a/wolfcrypt/src/wc_kyber_poly.c +++ b/wolfcrypt/src/wc_kyber_poly.c @@ -50,7 +50,7 @@ static word32 cpuid_flags = 0; /* Used in Barrett Reduction: * r = a mod q * => r = a - ((V * a) >> 26) * q), as V based on 2^26 - * V is the mulitplier that gets the quotient after shifting. + * V is the multiplier that gets the quotient after shifting. */ #define KYBER_V (((1U << 26) + (KYBER_Q / 2)) / KYBER_Q) diff --git a/wolfssl/internal.h b/wolfssl/internal.h index cb5b73eca..588c96efb 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -2865,7 +2865,7 @@ typedef enum { TLSX_KEY_QUIC_TP_PARAMS = 0x0039, /* RFC 9001, ch. 8.2 */ #endif #ifdef WOLFSSL_DUAL_ALG_CERTS - TLSX_CKS = 0xff92, /* X9.146; ff indcates personal + TLSX_CKS = 0xff92, /* X9.146; ff indicates personal * use and 92 is hex for 146. */ #endif #endif diff --git a/wolfssl/wolfcrypt/asn_public.h b/wolfssl/wolfcrypt/asn_public.h index 0f58152df..d3df2a076 100644 --- a/wolfssl/wolfcrypt/asn_public.h +++ b/wolfssl/wolfcrypt/asn_public.h @@ -516,7 +516,7 @@ typedef struct Cert { #endif #ifdef WOLFSSL_DUAL_ALG_CERTS /* These will not point to managed buffers. They will point to buffers that - * are managed by others. No cleanup neccessary. */ + * are managed by others. No cleanup necessary. */ /* Subject Alternative Public Key Info */ byte *sapkiDer; int sapkiLen;