Skip to content

Commit

Permalink
typographic cleanup: fix whitespace, remove unneeded UTF-8, convert C…
Browse files Browse the repository at this point in the history
…++ comment constructs to C.
  • Loading branch information
douzzer committed Nov 8, 2021
1 parent 8f121e7 commit 0b4f34d
Show file tree
Hide file tree
Showing 89 changed files with 1,603 additions and 1,616 deletions.
6 changes: 3 additions & 3 deletions examples/client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

/* For simpler wolfSSL TLS client examples, visit
* https://github.com/wolfSSL/wolfssl-examples/tree/master/tls
* https://github.com/wolfSSL/wolfssl-examples/tree/master/tls
*/

#ifdef HAVE_CONFIG_H
Expand Down Expand Up @@ -1708,7 +1708,7 @@ static void Usage(void)
printf("%s", msg[++msgid]); /* --wolfsentry-config */
#endif
printf("%s", msg[++msgid]); /* -7 */
printf("%s", msg[++msgid]); /* Examples repo link */
printf("%s", msg[++msgid]); /* Examples repo link */
#ifdef HAVE_LIBOQS
printf("%s", msg[++msgid]); /* --oqs */
printf("%s", msg[++msgid]); /* --oqs options */
Expand Down Expand Up @@ -2987,7 +2987,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
if (useCertFolder) {
WOLFSSL_X509_STORE *store;
WOLFSSL_X509_LOOKUP *lookup;

store = wolfSSL_CTX_get_cert_store(ctx);
if (store == NULL) {
wolfSSL_CTX_free(ctx); ctx = NULL;
Expand Down
2 changes: 1 addition & 1 deletion examples/configs/user_settings_min_ecc.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ extern "C" {

/* Optional Feature Disables */
#define NO_SIG_WRAPPER
//#define NO_ECC_KEY_EXPORT
//#define NO_ECC_KEY_EXPORT
//#define NO_ECC_DHE
//#define NO_ECC_SIGN
//#define NO_ECC_VERIFY
Expand Down
12 changes: 6 additions & 6 deletions examples/configs/user_settings_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/

/* STM32 Cube Sample Configuration File
/* STM32 Cube Sample Configuration File
* Generated automatically using `default_conf.ftl` template
*
* Included automatically when USE_HAL_DRIVER is defined
* Included automatically when USE_HAL_DRIVER is defined
* (and not WOLFSSL_USER_SETTINGS or HAVE_CONF_H).
*/

Expand Down Expand Up @@ -476,12 +476,12 @@
/* Sha3 */
#undef WOLFSSL_SHA3
#if defined(WOLF_CONF_SHA3) && WOLF_CONF_SHA3 == 1
#define WOLFSSL_SHA3
#define WOLFSSL_SHA3
#endif

/* MD5 */
#if defined(WOLF_CONF_MD5) && WOLF_CONF_MD5 == 1
/* enabled */
/* enabled */
#else
#define NO_MD5
#endif
Expand All @@ -504,8 +504,8 @@
#if 0
#define USE_WOLFSSL_MEMORY
#define WOLFSSL_TRACK_MEMORY
#define WOLFSSL_DEBUG_MEMORY
#define WOLFSSL_DEBUG_MEMORY_PRINT
#define WOLFSSL_DEBUG_MEMORY
#define WOLFSSL_DEBUG_MEMORY_PRINT
#endif
#else
//#define NO_WOLFSSL_MEMORY
Expand Down
12 changes: 6 additions & 6 deletions examples/configs/user_settings_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ extern "C" {
/* reduce stack use. For variables over 100 bytes allocate from heap */
#define WOLFSSL_SMALL_STACK

/* disable the built-in socket support and use the IO callbacks.
* Set with wolfSSL_CTX_SetIORecv/wolfSSL_CTX_SetIOSend
/* disable the built-in socket support and use the IO callbacks.
* Set with wolfSSL_CTX_SetIORecv/wolfSSL_CTX_SetIOSend
*/
#define WOLFSSL_USER_IO
#endif
Expand All @@ -78,14 +78,14 @@ extern "C" {
#define WOLFSSL_HAVE_SP_ECC
//#define WOLFSSL_SP_4096 /* Enable RSA/RH 4096-bit support */
//#define WOLFSSL_SP_384 /* Enable ECC 384-bit SECP384R1 support */

//#define WOLFSSL_SP_CACHE_RESISTANT
#define WOLFSSL_SP_MATH /* only SP math - disables integer.c/tfm.c */
#define WOLFSSL_SP_MATH_ALL /* use SP math for all key sizes and curves */

//#define WOLFSSL_SP_NO_MALLOC
//#define WOLFSSL_SP_DIV_32 /* do not use 64-bit divides */

#ifdef TARGET_EMBEDDED
/* use smaller version of code */
#define WOLFSSL_SP_SMALL
Expand Down Expand Up @@ -117,7 +117,7 @@ extern "C" {

/* Enables blinding mode, to prevent timing attacks */
#define WC_RSA_BLINDING

/* RSA PSS Support */
#define WC_RSA_PSS
#else
Expand Down Expand Up @@ -199,7 +199,7 @@ extern "C" {
/* AES */
#undef NO_AES
#if 1
#define HAVE_AES_CBC
#define HAVE_AES_CBC

/* GCM Method: GCM_TABLE_4BIT, GCM_SMALL, GCM_WORD32 or GCM_TABLE */
#define HAVE_AESGCM
Expand Down
12 changes: 6 additions & 6 deletions examples/server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

/* For simpler wolfSSL TLS server examples, visit
* https://github.com/wolfSSL/wolfssl-examples/tree/master/tls
* https://github.com/wolfSSL/wolfssl-examples/tree/master/tls
*/

#ifdef HAVE_CONFIG_H
Expand Down Expand Up @@ -1411,8 +1411,8 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
#endif

#ifdef WOLFSSL_STATIC_MEMORY
/* Note: Actual memory used is much less, this is the entire buffer buckets,
* which is partitioned into pools of common sizes. To adjust the buckets
/* Note: Actual memory used is much less, this is the entire buffer buckets,
* which is partitioned into pools of common sizes. To adjust the buckets
* sizes see WOLFMEM_BUCKETS in memory.h */
#if (defined(HAVE_ECC) && !defined(ALT_ECC_SIZE)) \
|| defined(SESSION_CERTS)
Expand Down Expand Up @@ -2181,7 +2181,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
#endif /* WOLFSSL_STATIC_MEMORY */
if (ctx == NULL)
err_sys_ex(catastrophic, "unable to get ctx");

if (minVersion != SERVER_INVALID_VERSION) {
wolfSSL_CTX_SetMinVersion(ctx, minVersion);
}
Expand Down Expand Up @@ -2221,7 +2221,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
#endif

#if defined(WOLFSSL_SNIFFER) && defined(WOLFSSL_STATIC_EPHEMERAL)
/* used for testing only to set a static/fixed ephemeral key
/* used for testing only to set a static/fixed ephemeral key
for use with the sniffer */
#if defined(HAVE_ECC) && !defined(NO_ECC_SECP) && \
(!defined(NO_ECC256) || defined(HAVE_ALL_CURVES))
Expand Down Expand Up @@ -2443,7 +2443,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
if (useCertFolder) {
WOLFSSL_X509_STORE *store;
WOLFSSL_X509_LOOKUP *lookup;

store = wolfSSL_CTX_get_cert_store(ctx);
if (store == NULL) {
wolfSSL_CTX_free(ctx); ctx = NULL;
Expand Down
4 changes: 2 additions & 2 deletions mcapi/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

if BUILD_MCAPI
check_PROGRAMS += mcapi/test
noinst_PROGRAMS += mcapi/test
noinst_PROGRAMS += mcapi/test
mcapi_test_SOURCES = mcapi/crypto.c \
mcapi/mcapi_test.c
mcapi_test_LDADD = src/libwolfssl.la
mcapi_test_LDADD = src/libwolfssl.la
mcapi_test_DEPENDENCIES = src/libwolfssl.la
endif

Expand Down
2 changes: 1 addition & 1 deletion resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Used by wolfssl.rc

// Next default values for new objects
//
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
Expand Down
6 changes: 3 additions & 3 deletions src/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ int wolfSSL_BIO_read(WOLFSSL_BIO* bio, void* buf, int len)
break;
case WOLFSSL_BIO_SOCKET:
#ifdef USE_WOLFSSL_IO
/* BIO requires built-in socket support
/* BIO requires built-in socket support
* (cannot be used with WOLFSSL_USER_IO) */
ret = wolfIO_Recv(bio->num, (char*)buf, len, 0);
#else
Expand Down Expand Up @@ -659,12 +659,12 @@ int wolfSSL_BIO_write(WOLFSSL_BIO* bio, const void* data, int len)
break;
case WOLFSSL_BIO_SOCKET:
#ifdef USE_WOLFSSL_IO
/* BIO requires built-in socket support
/* BIO requires built-in socket support
* (cannot be used with WOLFSSL_USER_IO) */
ret = wolfIO_Send(bio->num, (char*)data, len, 0);
#else
ret = NOT_COMPILED_IN;
#endif
#endif
break;
} /* switch */
}
Expand Down
10 changes: 5 additions & 5 deletions src/crl.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ int CheckCertCRL(WOLFSSL_CRL* crl, DecodedCert* cert)
/* When not set the folder or not use hash_dir, do nothing. */
if ((foundEntry == 0) && (ret != OCSP_WANT_READ)) {
if (crl->cm->x509_store_p != NULL) {
ret = LoadCertByIssuer(crl->cm->x509_store_p,
ret = LoadCertByIssuer(crl->cm->x509_store_p,
(WOLFSSL_X509_NAME*)cert->issuerName, X509_LU_CRL);
if (ret == WOLFSSL_SUCCESS) {
/* try again */
Expand Down Expand Up @@ -1350,10 +1350,10 @@ int LoadCRL(WOLFSSL_CRL* crl, const char* path, int type, int monitor)
#else
int LoadCRL(WOLFSSL_CRL* crl, const char* path, int type, int monitor)
{
(void)crl;
(void)path;
(void)type;
(void)monitor;
(void)crl;
(void)path;
(void)type;
(void)monitor;

/* stub for scenario where file system is not supported */
return NOT_COMPILED_IN;
Expand Down
Loading

0 comments on commit 0b4f34d

Please sign in to comment.