forked from wolfSSL/wolfssl
Merge pull request #7385 from philljj/spelling_cleanup
Used codespell and fixed obvious typos.
This commit is contained in:
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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 );
|
||||
|
@ -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);
|
||||
|
@ -76,7 +76,7 @@ static int esp_ShowMacroStatus_need_header = 0;
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user