diff --git a/IDE/GCC-ARM/README.md b/IDE/GCC-ARM/README.md index 353a3c399..2aa29d969 100644 --- a/IDE/GCC-ARM/README.md +++ b/IDE/GCC-ARM/README.md @@ -120,6 +120,6 @@ These settings are located in `Header/user_settings.h`. * `USE_SLOW_SHA512`: Over twice as small, but 50% slower * `USE_CERT_BUFFERS_1024` or `USE_CERT_BUFFERS_2048`: Size of RSA certs / keys to test with. * `BENCH_EMBEDDED`: Define this if using the wolfCrypt test/benchmark and using a low memory target. -* `ECC_USER_CURVES`: Allows user to defines curve sizes to enable. Default is 256-bit on. To enable others use `HAVE_ECC192`, `HAVE_ECC224`, etc.... +* `ECC_USER_CURVES`: Allows user to define curve sizes to enable. Default is 256-bit on. To enable others use `HAVE_ECC192`, `HAVE_ECC224`, etc.... * `TFM_ARM`, `TFM_SSE2`, `TFM_AVR32`, `TFM_PPC32`, `TFM_MIPS`, `TFM_X86` or `TFM_X86_64`: These are assembly optimizations available with USE_FAST_MATH. * Single Precision Math for ARM: See `WOLFSSL_SP`. Optimized math for ARM performance of specific RSA, DH and ECC algorithms. diff --git a/doc/dox_comments/header_files/ed25519.h b/doc/dox_comments/header_files/ed25519.h index c5e09a9dc..73f036232 100644 --- a/doc/dox_comments/header_files/ed25519.h +++ b/doc/dox_comments/header_files/ed25519.h @@ -3,10 +3,10 @@ \brief This function generates a new ed25519_key and stores it in key. - \retrun 0 Returned upon successfully making an ed25519_key - \retrun BAD_FUNC_ARG Returned if rng or key evaluate to NULL, or if the + \return 0 Returned upon successfully making an ed25519_key + \return BAD_FUNC_ARG Returned if rng or key evaluate to NULL, or if the specified key size is not 32 bytes (ed25519 has 32 byte keys) - \retrun MEMORY_E Returned if there is an error allocating memory + \return MEMORY_E Returned if there is an error allocating memory during function execution \param rng pointer to an initialized RNG object with which to diff --git a/src/internal.c b/src/internal.c index 64b16c485..5abb513fe 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1813,7 +1813,7 @@ void SSL_CtxResourceFree(WOLFSSL_CTX* ctx) #ifdef WOLFSSL_STATIC_MEMORY if (ctx->heap != NULL) { #ifdef WOLFSSL_HEAP_TEST - /* avoid derefrencing a test value */ + /* avoid dereferencing a test value */ if (ctx->heap != (void*)WOLFSSL_HEAP_TEST) #endif { @@ -4840,7 +4840,7 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup) WOLFSSL_HEAP_HINT* ssl_hint; WOLFSSL_HEAP_HINT* ctx_hint; - /* avoid derefrencing a test value */ + /* avoid dereferencing a test value */ #ifdef WOLFSSL_HEAP_TEST if (ctx->heap == (void*)WOLFSSL_HEAP_TEST) { ssl->heap = ctx->heap; @@ -5308,7 +5308,7 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey) return NOT_COMPILED_IN; } - /* Allocate memeory for key */ + /* Allocate memory for key */ *pKey = XMALLOC(sz, ssl->heap, type); if (*pKey == NULL) { return MEMORY_E; @@ -6453,10 +6453,10 @@ int DtlsMsgPoolSend(WOLFSSL* ssl, int sendOnlyFirstPacket) } /** - * on server side, retranmission is being triggered only by sending + * on server side, retransmission is being triggered only by sending * first message of given flight, in order to trigger client * to retransmit its whole flight. Sending the whole previous flight - * could lead to retranmission of previous client flight for each + * could lead to retransmission of previous client flight for each * server message from previous flight. Therefore one message should * be enough to do the trick. */ @@ -8313,7 +8313,7 @@ static int BuildFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender) /* Match names with wildcards, each wildcard can represent a single name - component or fragment but not mulitple names, i.e., + component or fragment but not multiple names, i.e., *.z.com matches y.z.com but not x.y.z.com return 1 on success */ @@ -12920,7 +12920,7 @@ int TimingPadVerify(WOLFSSL* ssl, const byte* input, int padLen, int macSz, /* Make ret negative on masking failure. */ ret -= 1 - good; - /* Treat any faulure as verify MAC error. */ + /* Treat any failure as verify MAC error. */ if (ret != 0) ret = VERIFY_MAC_ERROR; @@ -17103,7 +17103,7 @@ int PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, word32 hashSigAlgoSz) } #endif /* For ECDSA the `USE_ECDSA_KEYSZ_HASH_ALGO` build option will choose a hash - * algorithm that matches the ephemeral ECDHE key size or the next higest + * algorithm that matches the ephemeral ECDHE key size or the next highest * available. This workaround resolves issue with some peer's that do not * properly support scenarios such as a P-256 key hashed with SHA512. */ @@ -17268,7 +17268,7 @@ int PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, word32 hashSigAlgoSz) } - /* Add packet name to previsouly added packet info */ + /* Add packet name to previously added packet info */ void AddLateName(const char* name, TimeoutInfo* info) { /* make sure we have a valid previous one */ @@ -17280,7 +17280,7 @@ int PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, word32 hashSigAlgoSz) } } - /* Add record header to previsouly added packet info */ + /* Add record header to previously added packet info */ void AddLateRecordHeader(const RecordLayerHeader* rl, TimeoutInfo* info) { /* make sure we have a valid previous one */ @@ -19649,7 +19649,7 @@ static int NtruSecretDecrypt(QSHKey* key, byte* bufIn, word32 inSz, int QSH_Init(WOLFSSL* ssl) { - /* check so not initialising twice when running DTLS */ + /* check so not initializing twice when running DTLS */ if (ssl->QSH_secret != NULL) return 0; @@ -21568,7 +21568,7 @@ int SetTicket(WOLFSSL* ssl, const byte* ticket, word32 length) ssl->session_ticket_ctx); } /* Create a fake sessionID based on the ticket, this will - * supercede the existing session cache info. */ + * supersede the existing session cache info. */ ssl->options.haveSessionId = 1; #ifdef WOLFSSL_TLS13 if (ssl->options.tls1_3) { @@ -22302,7 +22302,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, goto exit_sske; } - /* get ouput buffer */ + /* get output buffer */ args->output = ssl->buffers.outputBuffer.buffer + ssl->buffers.outputBuffer.length; @@ -22365,7 +22365,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, goto exit_sske; } - /* get ouput buffer */ + /* get output buffer */ args->output = ssl->buffers.outputBuffer.buffer + ssl->buffers.outputBuffer.length; @@ -22641,7 +22641,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, goto exit_sske; } - /* get ouput buffer */ + /* get output buffer */ args->output = ssl->buffers.outputBuffer.buffer + ssl->buffers.outputBuffer.length; @@ -22869,7 +22869,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, goto exit_sske; } - /* get ouput buffer */ + /* get output buffer */ args->output = ssl->buffers.outputBuffer.buffer + ssl->buffers.outputBuffer.length; diff --git a/src/ssl.c b/src/ssl.c index 7770f9498..4d9aeb8d0 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -196,7 +196,7 @@ int wolfSSL_dtls_export(WOLFSSL* ssl, unsigned char* buf, unsigned int* sz) * sequence number, epoch, AEAD state etc. * * buf is the argument to contain the serialized state, if null then set "sz" to - * buffer size required + * buffer size required * sz is the size of the buffer passed in * ssl is the WOLFSSL struct to serialize * returns the size of serialized session on success, 0 on no action, and @@ -479,7 +479,7 @@ void FreeWriteDup(WOLFSSL* ssl) * duplicate existing ssl members into dup needed for writing * * dup write only WOLFSSL - * ssl exisiting WOLFSSL + * ssl existing WOLFSSL * * 0 on success */ @@ -527,10 +527,10 @@ static int DupSSL(WOLFSSL* dup, WOLFSSL* ssl) /* * duplicate a WOLFSSL object post handshake for writing only - * turn exisitng object into read only. Allows concurrent access from two + * turn existing object into read only. Allows concurrent access from two * different threads. * - * ssl exisiting WOLFSSL object + * ssl existing WOLFSSL object * * return dup'd WOLFSSL object on success */ @@ -3447,7 +3447,7 @@ const WOLFSSL_EVP_CIPHER *wolfSSL_EVP_get_cipherbyname(const char *name) * * id cipher NID * - * retrun WOLFSSL_EVP_CIPHER + * return WOLFSSL_EVP_CIPHER */ const WOLFSSL_EVP_CIPHER *wolfSSL_EVP_get_cipherbynid(int id) { @@ -7270,7 +7270,7 @@ void* wolfSSL_X509_get_ext_d2i(const WOLFSSL_X509* x509, obj->dynamic |= WOLFSSL_ASN1_DYNAMIC; obj->dynamic &= ~WOLFSSL_ASN1_DYNAMIC_DATA ; - /* set app derefrenced pointers */ + /* set app dereferenced pointers */ obj->d.ia5_internal.data = dns->name; obj->d.ia5_internal.length = (int)XSTRLEN(dns->name); dns = dns->next; @@ -22940,7 +22940,7 @@ int wolfSSL_RAND_bytes(unsigned char* buf, int num) rng = tmpRNG; initTmpRng = 1; } - + if (rng) { if (wc_RNG_GenerateBlock(rng, buf, num) != 0) WOLFSSL_MSG("Bad wc_RNG_GenerateBlock"); diff --git a/wolfcrypt/src/evp.c b/wolfcrypt/src/evp.c index ab0ce9cda..277fae844 100644 --- a/wolfcrypt/src/evp.c +++ b/wolfcrypt/src/evp.c @@ -23,7 +23,7 @@ #if !defined(WOLFSSL_EVP_INCLUDED) #ifndef WOLFSSL_IGNORE_FILE_WARN - #warning evp.c does not need to be compiled seperatly from ssl.c + #warning evp.c does not need to be compiled separately from ssl.c #endif #else diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index 78b69f6ff..927dfb7b0 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -2897,7 +2897,7 @@ int wc_RsaSSL_Verify(const byte* in, word32 inLen, byte* out, word32 outLen, #ifdef WC_RSA_PSS /* Verify the message signed with RSA-PSS. - * The input buffer is reused for the ouput buffer. + * The input buffer is reused for the output buffer. * Salt length is equal to hash length. * * in Buffer holding encrypted data. @@ -2915,7 +2915,7 @@ int wc_RsaPSS_VerifyInline(byte* in, word32 inLen, byte** out, } /* Verify the message signed with RSA-PSS. - * The input buffer is reused for the ouput buffer. + * The input buffer is reused for the output buffer. * * in Buffer holding encrypted data. * inLen Length of data in buffer. @@ -3066,7 +3066,7 @@ int wc_RsaPSS_CheckPadding_ex(const byte* in, word32 inSz, byte* sig, /* Verify the message signed with RSA-PSS. - * The input buffer is reused for the ouput buffer. + * The input buffer is reused for the output buffer. * Salt length is equal to hash length. * * in Buffer holding encrypted data. diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 9223ae7a7..5407e7353 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -8933,7 +8933,7 @@ int memory_test(void) } if (ret != wolfSSL_StaticBufferSz(buffer, ret, WOLFMEM_GENERAL)) { - return -6510; /* retrun value changed when using suggested value */ + return -6510; /* return value changed when using suggested value */ } ret = wolfSSL_MemoryPaddingSz(); diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index 53aab4992..5624311ca 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -223,7 +223,7 @@ struct WOLFSSL_ASN1_OBJECT { unsigned char dynamic; /* if 1 then obj was dynamiclly created, 0 otherwise */ #define WOLFSSL_ASN1_DYNAMIC 0x1 #define WOLFSSL_ASN1_DYNAMIC_DATA 0x2 - struct d { /* derefrenced */ + struct d { /* dereferenced */ WOLFSSL_ASN1_STRING ia5_internal; WOLFSSL_ASN1_STRING* ia5; /* points to ia5_internal */ WOLFSSL_ASN1_STRING* dNSName;