diff --git a/README.md b/README.md index 17666249..f8e094d3 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ make This directory contains examples for securing a Bluetooth Low Energy Link (BTLE). BTLE packets are small and throughput is low, so these examples demonstrate a way -to exchange data securley without BTLE pariing. +to exchange data securely without BTLE pairing. ## Notes diff --git a/SGX_Linux/trusted/Wolfssl_Enclave.c b/SGX_Linux/trusted/Wolfssl_Enclave.c index 0c529579..b162582f 100644 --- a/SGX_Linux/trusted/Wolfssl_Enclave.c +++ b/SGX_Linux/trusted/Wolfssl_Enclave.c @@ -1,3 +1,24 @@ +/* Wolfssl_Enclave.c + * + * Copyright (C) 2006-2020 wolfSSL Inc. + * + * This file is part of wolfSSL. + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include /* vsnprintf */ @@ -7,7 +28,7 @@ #if defined(XMALLOC_USER) || defined(XMALLOC_OVERRIDE) - #warning verfication of heap hint pointers needed when overriding default malloc/free + #warning verification of heap hint pointers needed when overriding default malloc/free #endif @@ -158,7 +179,7 @@ long enc_wolfTLSv1_2_server_method(void) } -/* returns method releated to id */ +/* returns method related to id */ static WOLFSSL_METHOD* GetMethod(long id) { switch (id) { diff --git a/SGX_Linux/trusted/Wolfssl_Enclave.h b/SGX_Linux/trusted/Wolfssl_Enclave.h index 3693c470..9f7d7f30 100644 --- a/SGX_Linux/trusted/Wolfssl_Enclave.h +++ b/SGX_Linux/trusted/Wolfssl_Enclave.h @@ -1,3 +1,24 @@ +/* Wolfssl_Enclave.h + * + * Copyright (C) 2006-2020 wolfSSL Inc. + * + * This file is part of wolfSSL. + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #ifndef _BENCHMARK_ENCLAVE_H_ #define _BENCHMARK_ENCLAVE_H_ diff --git a/SGX_Linux/untrusted/client-tls.c b/SGX_Linux/untrusted/client-tls.c index cb715640..2ca5dc29 100644 --- a/SGX_Linux/untrusted/client-tls.c +++ b/SGX_Linux/untrusted/client-tls.c @@ -18,6 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + #include "client-tls.h" #include @@ -44,7 +45,7 @@ int client_connect(sgx_enclave_id_t id) long ssl; - /* data to send to the server, data recieved from the server */ + /* data to send to the server, data received from the server */ char sendBuff[] = "Hello WolfSSL!"; char rcvBuff[MAXDATASIZE] = {0}; @@ -155,7 +156,7 @@ int client_connect(sgx_enclave_id_t id) printf("Read error. Error: %i\n", ret); return EXIT_FAILURE; } - printf("Recieved: \t%s\n", rcvBuff); + printf("Received: \t%s\n", rcvBuff); /* frees all data before client termination */ enc_wolfSSL_free(id, ssl); diff --git a/SGX_Linux/untrusted/server-tls.c b/SGX_Linux/untrusted/server-tls.c index 6e8715d7..4a1e9c82 100644 --- a/SGX_Linux/untrusted/server-tls.c +++ b/SGX_Linux/untrusted/server-tls.c @@ -112,7 +112,7 @@ int server_connect(sgx_enclave_id_t id) /* Initialize the server address struct with zeros */ memset(&servAddr, 0, sizeof(servAddr)); -/* Fill in the server address */ + /* Fill in the server address */ servAddr.sin_family = AF_INET; /* using IPv4 */ servAddr.sin_port = htons(DEFAULT_PORT); /* on DEFAULT_PORT */ servAddr.sin_addr.s_addr = INADDR_ANY; /* from anywhere */ diff --git a/btle/ecc-server.c b/btle/ecc-server.c index b0325cf4..9e1f00f3 100644 --- a/btle/ecc-server.c +++ b/btle/ecc-server.c @@ -106,7 +106,7 @@ int main(int argc, char** argv) printf("wc_ecc_export_x963 failed %d\n", ret); goto cleanup; } - /* TODO: Server should hash and sign this public key with a trust ceritifcate (already exchanged) */ + /* TODO: Server should hash and sign this public key with a trust certificate (already exchanged) */ /* ECC signature is about 65 bytes */ diff --git a/certfields/extract-pubkey-from-certfile/README.md b/certfields/extract-pubkey-from-certfile/README.md index 6f1d8bf0..a9b1f5a5 100644 --- a/certfields/extract-pubkey-from-certfile/README.md +++ b/certfields/extract-pubkey-from-certfile/README.md @@ -5,7 +5,7 @@ public key and subject name information. ## Compiling and Running the Example -To compile, first build wolfSSL with the OpenSSL compatibilty layer enabled: +To compile, first build wolfSSL with the OpenSSL compatibility layer enabled: ``` $ cd wolfssl-X.X.X diff --git a/certfields/extract-pubkey-from-certfile/main.c b/certfields/extract-pubkey-from-certfile/main.c index 1dcf3642..9ca2c74a 100644 --- a/certfields/extract-pubkey-from-certfile/main.c +++ b/certfields/extract-pubkey-from-certfile/main.c @@ -67,7 +67,7 @@ int main(void) printf("Failed to decode public key from pubKeyTmp, abort!\n"); return ret; } - printf("Succesfully decoded public key\n"); + printf("Successfully decoded public key\n"); printf("PUBLIC KEY:\n"); for (i = 0; i < pubKeyTmp->pkey_sz; i++) { diff --git a/certgen/certgen_example.c b/certgen/certgen_example.c index 8a80da0a..18431ec9 100644 --- a/certgen/certgen_example.c +++ b/certgen/certgen_example.c @@ -1,3 +1,24 @@ +/* certgen_example.c + * + * Copyright (C) 2006-2020 wolfSSL Inc. + * + * This file is part of wolfSSL. + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA + */ + #include #include #include diff --git a/certgen/certgen_with_altnames.c b/certgen/certgen_with_altnames.c index 0e184c75..9e9a0450 100644 --- a/certgen/certgen_with_altnames.c +++ b/certgen/certgen_with_altnames.c @@ -1,3 +1,24 @@ +/* certgen_with_altnames.c + * + * Copyright (C) 2006-2020 wolfSSL Inc. + * + * This file is part of wolfSSL. + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA + */ + #include #include #include @@ -144,7 +165,7 @@ int main(void) { /* Add some alt names to our cert: */ char myAltNames[] = { - /* SEQUENCE (1 element with 3 segements. Entire length is 41 + /* SEQUENCE (1 element with 3 segments. Entire length is 41 * (0x29 in hex)) */ 0x30, 0x29, diff --git a/certgen/csr_w_ed25519_example.c b/certgen/csr_w_ed25519_example.c index c4f3e65f..8cea985f 100644 --- a/certgen/csr_w_ed25519_example.c +++ b/certgen/csr_w_ed25519_example.c @@ -1,3 +1,24 @@ +/* csr_w_ed25519_example.c + * + * Copyright (C) 2006-2020 wolfSSL Inc. + * + * This file is part of wolfSSL. + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA + */ + #include #include #include diff --git a/crypto/camellia/camellia-encrypt.c b/crypto/camellia/camellia-encrypt.c index 374c25cd..e80a7099 100644 --- a/crypto/camellia/camellia-encrypt.c +++ b/crypto/camellia/camellia-encrypt.c @@ -31,7 +31,7 @@ #define SALT_SIZE 8 /* - * Makes a cryptographically secure key by stretMDMching a user entered key + * Makes a cryptographically secure key by stretching a user entered key */ int GenerateKey(RNG* rng, byte* key, int size, byte* salt, int pad) { diff --git a/custom-io-callbacks/README.md b/custom-io-callbacks/README.md index 60eaf2b9..c3aa8c0e 100644 --- a/custom-io-callbacks/README.md +++ b/custom-io-callbacks/README.md @@ -1,52 +1,54 @@ -This is an example to demonstrate how the custom IO callbacks can be used to
-facilitate a TLS connection using any medium. Here we chose the medium: "File System".
+# Custom IO Callback Example -Other mediums might be:
-USB Serial connection
-Bluetooth
-RFID
-Wifi
-Ethernet
-
-Just to name a few.
-
-These examples use the wolfSSL Custom IO Callbacks to read and write to the file
-system and perform a successful handshake.
-
-The configuration used for these examples was:
-./configure --enable-debug
-
-Debug was enabled in case a user wishes to use the verbose flag to see what is
-happening in real time:
-
-Usage examples:
-
-From the file-server directory:
-./start-server
-./start-server -v
-./start-server -verbose
-
-From the file-client directory:
-./start-client
-./start-client -v
-./start-client -verbose
-
-(-v and -verbose accomplish the same thing)
-
-
-SCRIPTS: The scripts provided attempt to make testing easier.
-
-file-server/check.sh
- - starts the server in a background shell and runs the client
-
-USAGE:
- ./check.sh
- ./check.sh -v
- ./check.sh -verbose
-
-file-client/clean-io-files.sh
- - If something happens and there is leftover junk in the io files run this
- script to quickly cleanup before next round of testing.
-USAGE:
- ./clean-io-files.sh
-
+This is an example to demonstrate how the custom IO callbacks can be used to +facilitate a TLS connection using any medium. Here we chose the medium: "File System". + +Other transports might be: +* USB Serial connection +* Bluetooth +* RFID +* Wifi +* Ethernet + +These examples use the wolfSSL Custom IO Callbacks to read and write to the file +system and perform a successful handshake. + +The configuration used for these examples: + +`./configure --enable-debug` + +Debug was enabled in case a user wishes to use the verbose flag to see what is +happening in real time: + +Usage examples: + +From the file-server directory: +./start-server +./start-server -v +./start-server -verbose + +From the file-client directory: +./start-client +./start-client -v +./start-client -verbose + +(-v and -verbose accomplish the same thing) + +## SCRIPTS + +The scripts provided attempt to make testing easier. + +* file-server/check.sh + - starts the server in a background shell and runs the client + +USAGE: + ./check.sh + ./check.sh -v + ./check.sh -verbose + +* file-client/clean-io-files.sh + - If something happens and there is leftover junk in the io files run this + script to quickly cleanup before next round of testing. + +USAGE: + ./clean-io-files.sh diff --git a/custom-io-callbacks/file-client/file-client.c b/custom-io-callbacks/file-client/file-client.c index d67630de..a61b5a7c 100644 --- a/custom-io-callbacks/file-client/file-client.c +++ b/custom-io-callbacks/file-client/file-client.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA * - * EXAMPLE DEFINIITON: + * EXAMPLE DEFINITION: * * Instead of using sockets we will show how it is possible * to deliver TLS handshake and packet exchange through the use of diff --git a/custom-io-callbacks/file-server/file-server.c b/custom-io-callbacks/file-server/file-server.c index 1b74dbf0..aad2f3bf 100644 --- a/custom-io-callbacks/file-server/file-server.c +++ b/custom-io-callbacks/file-server/file-server.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA * - * EXAMPLE DEFINIITON: + * EXAMPLE DEFINITION: * * Instead of using sockets we will show how it is possible * to deliver TLS handshake and packet exchange through the use of @@ -241,7 +241,7 @@ int main(int argc, char** argv) printf("Server send successful\n"); break; } else { - printf("Unkown error occured, shutting down\n"); + printf("Unkown error occurred, shutting down\n"); break; } } diff --git a/dtls/client-dtls-ipv6.c b/dtls/client-dtls-ipv6.c index 523fb43c..f5f3e5a2 100644 --- a/dtls/client-dtls-ipv6.c +++ b/dtls/client-dtls-ipv6.c @@ -1,5 +1,5 @@ /* - * client-dtls.c + * client-dtls-ipv6.c * * Copyright (C) 2006-2020 wolfSSL Inc. * diff --git a/dtls/client-dtls-nonblocking.c b/dtls/client-dtls-nonblocking.c index b7d4cd46..a7b61a64 100644 --- a/dtls/client-dtls-nonblocking.c +++ b/dtls/client-dtls-nonblocking.c @@ -178,7 +178,7 @@ int main (int argc, char** argv) } if (ret != SSL_SUCCESS) { - printf("SSL_connectrfailed with"); + printf("SSL_connect failed with"); } /* */ /*****************************************************************************/ diff --git a/dtls/server-dtls-ipv6.c b/dtls/server-dtls-ipv6.c index 997cd209..aa3f4aed 100644 --- a/dtls/server-dtls-ipv6.c +++ b/dtls/server-dtls-ipv6.c @@ -1,4 +1,4 @@ -/* server-dtls.c +/* server-dtls-ipv6.c * * Copyright (C) 2006-2015 wolfSSL Inc. * diff --git a/dtls/server-udp.c b/dtls/server-udp.c index 9a509a96..c452e425 100644 --- a/dtls/server-udp.c +++ b/dtls/server-udp.c @@ -38,7 +38,7 @@ int main (void) { int sockfd; /* Initialize our socket */ - int recvLen; /* number of bytes recieved */ + int recvLen; /* number of bytes received */ int msgNum = 0; /* number of msg received */ unsigned char buf[MSGLEN]; /* the incoming message */ struct sockaddr_in servAddr; /* our server's address */ diff --git a/ecc/ecc-key-decode.c b/ecc/ecc-key-decode.c index dcf8572f..59663c07 100644 --- a/ecc/ecc-key-decode.c +++ b/ecc/ecc-key-decode.c @@ -104,7 +104,7 @@ static void check_ret(char* call, int ret) int main(void) { - printf("Not compiled in: Must build wolfSSL using ./confgiure --enable-opensslextra or ./configure CFLAGS=-DWOLFSSL_TEST_CERT\n"); + printf("Not compiled in: Must build wolfSSL using ./configure --enable-opensslextra or ./configure CFLAGS=-DWOLFSSL_TEST_CERT\n"); return 0; } diff --git a/ecc/ecc-key-export.c b/ecc/ecc-key-export.c index 259eddb8..989b69e6 100644 --- a/ecc/ecc-key-export.c +++ b/ecc/ecc-key-export.c @@ -100,7 +100,7 @@ int main(void) fp = fopen("./" XSTRINGIFY(TEST_ECC_KEY_CURVE) ".der", "wb"); if (!fp) { - printf("Error openening %s for write\n", + printf("Error opening %s for write\n", "./" XSTRINGIFY(TEST_ECC_KEY_CURVE) ".der"); return -1; } @@ -121,7 +121,7 @@ int main(void) fp = fopen("./" XSTRINGIFY(TEST_ECC_KEY_CURVE) ".pem", "wb"); if (!fp) { - printf("Error openening %s for write\n", + printf("Error opening %s for write\n", "./" XSTRINGIFY(TEST_ECC_KEY_CURVE) ".pem"); return -1; } @@ -142,7 +142,7 @@ int main(void) fp = fopen("./" XSTRINGIFY(TEST_ECC_KEY_CURVE) "_pub.der", "wb"); if (!fp) { - printf("Error openening %s for write\n", + printf("Error opening %s for write\n", "./" XSTRINGIFY(TEST_ECC_KEY_CURVE) "_pub.der"); return -1; } @@ -167,7 +167,7 @@ int main(void) fp = fopen("./" XSTRINGIFY(TEST_ECC_KEY_CURVE) "_pub.pem", "wb"); if (!fp) { - printf("Error openening %s for write\n", + printf("Error opening %s for write\n", "./" XSTRINGIFY(TEST_ECC_KEY_CURVE) "_pub.pem"); return -1; } diff --git a/pk/ecdh_generate_secret/ecdh_gen_secret.c b/pk/ecdh_generate_secret/ecdh_gen_secret.c index 9db21775..00786792 100644 --- a/pk/ecdh_generate_secret/ecdh_gen_secret.c +++ b/pk/ecdh_generate_secret/ecdh_gen_secret.c @@ -1,3 +1,24 @@ +/* ecdh_gen_secret.c + * + * Copyright (C) 2006-2020 wolfSSL Inc. + * + * This file is part of wolfSSL. (formerly known as CyaSSL) + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include diff --git a/pk/ed25519_gen/gen_key_files.c b/pk/ed25519_gen/gen_key_files.c index f904aae8..72a1f910 100644 --- a/pk/ed25519_gen/gen_key_files.c +++ b/pk/ed25519_gen/gen_key_files.c @@ -1,3 +1,24 @@ +/* gen_key_files.c + * + * Copyright (C) 2006-2020 wolfSSL Inc. + * + * This file is part of wolfSSL. (formerly known as CyaSSL) + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include diff --git a/pk/ed25519_gen/sign_and_verify.c b/pk/ed25519_gen/sign_and_verify.c index d9f17964..447ed1db 100644 --- a/pk/ed25519_gen/sign_and_verify.c +++ b/pk/ed25519_gen/sign_and_verify.c @@ -1,3 +1,24 @@ +/* sign_and_verify.c + * + * Copyright (C) 2006-2020 wolfSSL Inc. + * + * This file is part of wolfSSL. (formerly known as CyaSSL) + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include diff --git a/pk/rsa/rsa-nb.c b/pk/rsa/rsa-nb.c index 095e2c90..beb90d20 100644 --- a/pk/rsa/rsa-nb.c +++ b/pk/rsa/rsa-nb.c @@ -1,4 +1,4 @@ -/* rsa-pss.c +/* rsa-nb.c * * Copyright (C) 2006-2020 wolfSSL Inc. * diff --git a/pk/srp/srp.c b/pk/srp/srp.c index 16c589f1..210399f1 100644 --- a/pk/srp/srp.c +++ b/pk/srp/srp.c @@ -51,7 +51,7 @@ static int client_init(Srp** srp) return ret; } -/* Calcuate the client's public key */ +/* Calculate the client's public key */ static int client_calc_public(Srp* srp, const char* username, char* password, byte* salt, word32 saltSz, byte* pubKey, word32* pubKeySz) @@ -115,7 +115,7 @@ static int server_init(Srp** srp) return ret; } -/* Calcuate the server's public key */ +/* Calculate the server's public key */ static int server_calc_public(Srp* srp, const char* username, byte* salt, word32 saltSz, byte* verifier, word32 vSz, byte* pubKey, word32* pubKeySz) diff --git a/psk/README.md b/psk/README.md index 997c9c2b..0ed7e2e9 100644 --- a/psk/README.md +++ b/psk/README.md @@ -265,7 +265,7 @@ Session resumption allows a client/server pair to re-use previously generated cr 3. Change all calls from write() or send() to wolfSSL_write(), in the simple server ``write(sockfd, sendline, strlen(sendline))`` becomes ``wolfSSL_write(ssl, sendline, strlen(sendline))`` -4. Run the wolfSSL method to initalize wolfSSL +4. Run the wolfSSL method to initialize wolfSSL ``wolfSSL_Init()`` 5. Create a ctx pointer that contains a server method using the following process. The server method wolfSSLv23_server_method() diff --git a/psk/client-psk-bio-custom.c b/psk/client-psk-bio-custom.c index d6216c06..549959fc 100644 --- a/psk/client-psk-bio-custom.c +++ b/psk/client-psk-bio-custom.c @@ -225,7 +225,7 @@ int main(int argc, char **argv) /* set up pre shared keys */ wolfSSL_CTX_set_psk_client_callback(ctx, My_Psk_Client_Cb); - /* creat wolfssl object after each tcp connct */ + /* creat wolfssl object after each tcp connect */ if ( (ssl = wolfSSL_new(ctx)) == NULL) { fprintf(stderr, "wolfSSL_new error.\n"); goto exit; diff --git a/psk/client-psk.c b/psk/client-psk.c index d0bfa70d..bcd858f5 100644 --- a/psk/client-psk.c +++ b/psk/client-psk.c @@ -111,7 +111,7 @@ int main(int argc, char **argv) /* set up pre shared keys */ wolfSSL_CTX_set_psk_client_callback(ctx, My_Psk_Client_Cb); - /* creat wolfssl object after each tcp connct */ + /* creat wolfssl object after each tcp connect */ if ( (ssl = wolfSSL_new(ctx)) == NULL) { fprintf(stderr, "wolfSSL_new error.\n"); return 1; diff --git a/psk/client-tcp.c b/psk/client-tcp.c index 3d4f2c52..d8f01ad7 100644 --- a/psk/client-tcp.c +++ b/psk/client-tcp.c @@ -35,7 +35,7 @@ /* * this function will send the inputted string to the server and then - * recieve the string from the server outputing it to the termial + * receive the string from the server outputing it to the terminal */ int main(int argc, char **argv) diff --git a/signature/README.md b/signature/README.md index 92900309..2b24229c 100644 --- a/signature/README.md +++ b/signature/README.md @@ -31,7 +31,7 @@ ED25519 directory contains: formatted files. 2. genkeybuffers.pl - a perl script to write the header file "test_keys.h" using - the .der formatted files output from applicaton "gen_key_files.c" + the .der formatted files output from application "gen_key_files.c" 3. App "sign_and_verify.c" to use the "test_keys.h" header file buffers for importing the public and private keys. App will then sign a msg with the diff --git a/tls/README.md b/tls/README.md index 90c84993..68ba9908 100644 --- a/tls/README.md +++ b/tls/README.md @@ -9,7 +9,7 @@ connection, but modified to utilize wolfSSL to establish a TLS 1.2 connection. In general, the naming convention of these files mean that if a file is named in the form `X-Y.c`, then it's a copy of `X.c` intended to demonstrate Y. The exceptions being `server-tls.c` and `client-tls.c`, as noted above. -Furthermore, the files is formated such that using a diff tool such as +Furthermore, the files is formatted such that using a diff tool such as `vimdiff` to compare `X-Y.c` to `X.c` should highlight only the relevant changes required to convert `X.c` into `X-Y.c` @@ -261,7 +261,7 @@ socket [...]" block, add these lines: servAddr.sin_addr.s_addr = INADDR_ANY; /* from anywhere */ ``` -That "Initialize the sever address sturuct wit zeros" step is not strictly +That "Initialize the server address struct wit zeros" step is not strictly necessary, but it's usually a good idea, and it doesn't complicate the example too much. @@ -500,7 +500,7 @@ Now we can fill out the address of the server we want to connect to. After the } ``` -Once more, this is quite similar to server code. This time, hovewer, rather +Once more, this is quite similar to server code. This time, however, rather than setting `servAddr.sin_addr.s_addr` to `INADDR_ANY`, we're going to make a call to `inet_pton()` to read `argv[1]` as an IPv4 address and assign it to the right place in `servAddr`. If `argv[1]` is well formed, `inet_pton()` will @@ -1053,7 +1053,7 @@ with zeros" block is a good place. After this, add these lines: And just like that wolfSSL will use our functions to send and receive data. Now when this program is run we should see a number of "my\_OISend: sent" and -"my\_IORecv: recieved" lines in our output. +"my\_IORecv: received" lines in our output. #### Running diff --git a/tls/client-tls-cacb.c b/tls/client-tls-cacb.c index d0c407d0..a0d1a1bd 100644 --- a/tls/client-tls-cacb.c +++ b/tls/client-tls-cacb.c @@ -38,7 +38,7 @@ const char* cert = "../certs/ca-cert.pem"; */ int ClientGreet(int sock, WOLFSSL* ssl) { - /* data to send to the server, data recieved from the server */ + /* data to send to the server, data received from the server */ char sendBuff[MAXDATASIZE], rcvBuff[MAXDATASIZE] = {0}; int ret = 0; /* variable for error checking */ @@ -61,7 +61,7 @@ int ClientGreet(int sock, WOLFSSL* ssl) printf("Read error. Error: %i\n", ret); return EXIT_FAILURE; } - printf("Recieved: \t%s\n", rcvBuff); + printf("Received: \t%s\n", rcvBuff); return ret; } @@ -85,9 +85,9 @@ static void CaCb(unsigned char* der, int sz, int type) int ret; int sz = sizeof(serial); - WOLFSSL_X509_NAME* issureName = wolfSSL_X509_get_issuer_name(x509); + WOLFSSL_X509_NAME* issuerName = wolfSSL_X509_get_issuer_name(x509); WOLFSSL_X509_NAME* subjectName = wolfSSL_X509_get_subject_name(x509); - issuer = wolfSSL_X509_NAME_oneline(issureName, 0, 0); + issuer = wolfSSL_X509_NAME_oneline(issuerName, 0, 0); subject = wolfSSL_X509_NAME_oneline(subjectName, 0, 0); printf("\tIssuer : %s\n\tSubject: %s\n", issuer, subject); @@ -131,7 +131,7 @@ int Security(int sock) wolfSSL_Init(); /* initialize wolfSSL */ - /* create and initiLize WOLFSSL_CTX structure */ + /* create and initialize WOLFSSL_CTX structure */ if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) { printf("SSL_CTX_new error.\n"); return EXIT_FAILURE; diff --git a/tls/client-tls-perf.c b/tls/client-tls-perf.c index cb33bee8..d2dec29d 100644 --- a/tls/client-tls-perf.c +++ b/tls/client-tls-perf.c @@ -114,7 +114,7 @@ typedef struct SSLConnCtx { /* Total time handling resumed connections. */ double resumeTime; #ifdef WOLFSSL_ASYNC_CRYPT - /* Total time handling aynchronous operations. */ + /* Total time handling asynchronous operations. */ double asyncTime; #endif /* Total time handling reading. */ @@ -738,7 +738,7 @@ static void WolfSSLCtx_Final(WOLFSSL_CTX* ctx) #endif } -/* Create a socket to talf to server on and connect. +/* Create a socket to talk to server on and connect. * * port The port the server is listening on. * socketfd The connected socket. diff --git a/tls/server-tls-epoll-perf.c b/tls/server-tls-epoll-perf.c index da633126..6f98bbc0 100644 --- a/tls/server-tls-epoll-perf.c +++ b/tls/server-tls-epoll-perf.c @@ -117,7 +117,7 @@ typedef struct SSLConn_CTX { /* Total time handling accept - resumed connections. */ double resumeTime; #ifdef WOLFSSL_ASYNC_CRYPT - /* Total time handling aynchronous operations. */ + /* Total time handling asynchronous operations. */ double asyncTime; #endif /* Total time handling reading. */ diff --git a/tls/server-tls-epoll-threaded.c b/tls/server-tls-epoll-threaded.c index d8f8053f..714471fc 100644 --- a/tls/server-tls-epoll-threaded.c +++ b/tls/server-tls-epoll-threaded.c @@ -134,7 +134,7 @@ typedef struct SSLConn_CTX { /* Total time handling accepts - resumed connections. */ double resumeTime; #ifdef WOLFSSL_ASYNC_CRYPT - /* Total time handling aynchronous operations. */ + /* Total time handling asynchronous operations. */ double asyncTime; #endif /* Total time handling reading. */ @@ -1228,7 +1228,7 @@ int main(int argc, char* argv[]) for (i = 0; i < numThreads; i++) { if (pthread_create(&sslConnCtx->threadData[i].thread_id, NULL, ThreadHandler, &sslConnCtx->threadData[i]) < 0) { - perror("ERRROR: could not create thread"); + perror("ERROR: could not create thread"); } } @@ -1249,4 +1249,3 @@ int main(int argc, char* argv[]) exit(EXIT_SUCCESS); } -