Browse Source

Merge pull request #6454 from philljj/spelling_cleanup

Used codespell and fixed obvious typos in src and wolfssl.
JacobBarthelmeh 1 year ago
parent
commit
ca2ca4f739
10 changed files with 15 additions and 15 deletions
  1. 2 2
      src/internal.c
  2. 3 3
      src/ssl_asn1.c
  3. 3 3
      src/ssl_bn.c
  4. 1 1
      src/tls13.c
  5. 1 1
      src/wolfio.c
  6. 1 1
      src/x509.c
  7. 1 1
      wolfssl/internal.h
  8. 1 1
      wolfssl/test.h
  9. 1 1
      wolfssl/wolfcrypt/asn_public.h
  10. 1 1
      wolfssl/wolfcrypt/settings.h

+ 2 - 2
src/internal.c

@@ -33335,7 +33335,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
                 if (alertType != invalid_alert) {
                     int err;
 
-                    /* propogate socket errors to avoid re-calling send alert */
+                    /* propagate socket errors to avoid re-calling send alert */
                     err = SendAlert(ssl, alert_fatal, alertType);
                     if (err == SOCKET_ERROR_E)
                         ret = SOCKET_ERROR_E;
@@ -34871,7 +34871,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
             byte bogusID[ID_LEN];
             byte bogusIDSz = ssl->session->sessionIDSz;
             XMEMCPY(bogusID, ssl->session->sessionID, ID_LEN);
-            /* Failure here should not interupt the resumption. We already have
+            /* Failure here should not interrupt the resumption. We already have
              * all the cipher material we need in `it` */
             WOLFSSL_MSG("Copying in session from passed in arg");
             (void)wolfSSL_DupSession(sess, ssl->session, 1);

+ 3 - 3
src/ssl_asn1.c

@@ -2382,7 +2382,7 @@ char* wolfSSL_i2s_ASN1_STRING(WOLFSSL_v3_ext_method *method,
         }
     }
     else {
-        /* Convert unreadable strings to hexdecimal. */
+        /* Convert unreadable strings to hexadecimal. */
         ret = wolfssl_asn1_string_to_hex_chars(s);
     }
 
@@ -2833,7 +2833,7 @@ static int wolfssl_asn1_string_dump_hex(WOLFSSL_BIO *bio,
         /* Calculate end of string. */
         end = str->data + str->length - 1;
         for (p = str->data; p <= end; p++) {
-            /* Encode string characther as hex into temporary. */
+            /* Encode string character as hex into temporary. */
             ByteToHexStr((byte)*p, hex_tmp);
             /* Update count of written characters. */
             str_len += 2;
@@ -2853,7 +2853,7 @@ static int wolfssl_asn1_string_dump_hex(WOLFSSL_BIO *bio,
  * @param [in] c    Character to check for.
  * @param [in] str  String to check.
  * @return  1 when character found.
- * @return  0 when characther not found.
+ * @return  0 when character not found.
  */
 static int wolfssl_check_esc_char(char c)
 {

+ 3 - 3
src/ssl_bn.c

@@ -1777,7 +1777,7 @@ int wolfSSL_BN_mod_add(WOLFSSL_BIGNUM *r, const WOLFSSL_BIGNUM *a,
         ret = 0;
     }
 
-    /* Perfom operation with wolfCrypt. */
+    /* Perform operation with wolfCrypt. */
     if ((ret == 1) && (mp_addmod((mp_int*)a->internal, (mp_int*)b->internal,
             (mp_int*)m->internal, (mp_int*)r->internal) != MP_OKAY)) {
         WOLFSSL_MSG("mp_add_d error");
@@ -1973,7 +1973,7 @@ int wolfSSL_BN_gcd(WOLFSSL_BIGNUM* r, WOLFSSL_BIGNUM* a, WOLFSSL_BIGNUM* b,
  * @param [in]      top      Whether top bits must be set.
  *                           Valid values: WOLFSSL_BN_RAND_TOP_ANY,
  *                           WOLFSSL_BN_RAND_TOP_ONE, WOLFSSL_BN_RAND_TOP_TWO.
- * @param [in]      botttom  Whether bottom bit must be set.
+ * @param [in]      bottom   Whether bottom bit must be set.
  *                           Valid values: WOLFSSL_BN_RAND_BOTTOM_ANY,
                              WOLFSSL_BN_RAND_BOTTOM_ODD.
  * @return  1 on success.
@@ -2081,7 +2081,7 @@ int wolfSSL_BN_rand(WOLFSSL_BIGNUM* bn, int bits, int top, int bottom)
  * @param [in]      top      Whether top bits must be set.
  *                           Valid values: WOLFSSL_BN_RAND_TOP_ANY,
  *                           WOLFSSL_BN_RAND_TOP_ONE, WOLFSSL_BN_RAND_TOP_TWO.
- * @param [in]      botttom  Whether bottom bit must be set.
+ * @param [in]      bottom   Whether bottom bit must be set.
  *                           Valid values: WOLFSSL_BN_RAND_BOTTOM_ANY,
                              WOLFSSL_BN_RAND_BOTTOM_ODD.
  * @return  1 on success.

+ 1 - 1
src/tls13.c

@@ -2165,7 +2165,7 @@ static void AddTls13HandShakeHeader(byte* output, word32 length,
     (void)ssl;
 
 #ifdef WOLFSSL_DTLS13
-    /* message_hash type is used for a syntetic message that replaces the first
+    /* message_hash type is used for a synthetic message that replaces the first
        ClientHello in the hash transcript when using HelloRetryRequest. It will
        never be transmitted and, as the DTLS-only fields must not be considered
        when computing the hash transcript, we can avoid to use the DTLS

+ 1 - 1
src/wolfio.c

@@ -57,7 +57,7 @@ Possible IO enable options:
  * indefinetely. If not enabled EmbedReceiveFrom will return timeout after
  * DTLS_RECEIVEFROM_MAX_INVALID_PEER number of packets from invalid peers. When
  * enabled, without a timer, EmbedReceivefrom can't check if the timeout is
- * expired and it may never return under a continous flow of invalid packets.
+ * expired and it may never return under a continuous flow of invalid packets.
  *                                                                default: off
  */
 

+ 1 - 1
src/x509.c

@@ -9500,7 +9500,7 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref(
 
                 if (ret == WOLFSSL_SUCCESS) {
                     for (idx = 0; idx < req->customExtCount; idx++) {
-                        /* Note that ownership is NOT transfered.
+                        /* Note that ownership is NOT transferred.
                          * req->custom_exts buffers still need to be cleaned
                          * up. */
                         cert->customCertExt[idx] = req->custom_exts[idx];

+ 1 - 1
wolfssl/internal.h

@@ -3182,7 +3182,7 @@ typedef struct KeyShareEntry {
     byte*                 pubKey;    /* Public key                        */
     word32                pubKeyLen; /* Public key length                 */
 #if !defined(NO_DH) || defined(HAVE_PQC)
-    byte*                 privKey;   /* Private key - DH ond PQ KEMs only */
+    byte*                 privKey;   /* Private key - DH and PQ KEMs only */
 #endif
 #ifdef WOLFSSL_ASYNC_CRYPT
     int                   lastRet;

+ 1 - 1
wolfssl/test.h

@@ -3767,7 +3767,7 @@ static WC_INLINE int myEccSharedSecret(WOLFSSL* ssl, ecc_key* otherKey,
     #endif
         pubKey = otherKey;
 
-        /* TLS v1.2 and older we must generate a key here for the client ony.
+        /* TLS v1.2 and older we must generate a key here for the client only.
          * TLS v1.3 calls key gen early with key share */
         if (wolfSSL_GetVersion(ssl) < WOLFSSL_TLSV1_3) {
             ret = myEccKeyGen(ssl, privKey, 0, otherKey->dp->id, ctx);

+ 1 - 1
wolfssl/wolfcrypt/asn_public.h

@@ -985,7 +985,7 @@ typedef struct Asn1 {
     Asn1Item         item;
     /* Current depth of ASN.1 item. */
     unsigned char    depth;
-    /* End indeces of ASN.1 items at different depths. */
+    /* End indices of ASN.1 items at different depths. */
     word32           end_idx[ASN_MAX_DEPTH];
 
     /* Buffer to print. */

+ 1 - 1
wolfssl/wolfcrypt/settings.h

@@ -1855,7 +1855,7 @@ extern void uITRON4_free(void *p) ;
         #define WOLFSSL_CAAM_HASH
     #endif
     #if defined(WOLFSSL_DEVCRYPTO_HMAC)
-        /* HMAC is throught the devcrypto calls */
+        /* HMAC is through the devcrypto calls */
         #define WOLFSSL_CAAM_HMAC
     #endif