Fix minor line length and spelling.

This commit is contained in:
David Garske
2021-06-21 15:09:39 -07:00
parent b59c60db8a
commit 716237c5dd
3 changed files with 30 additions and 16 deletions

View File

@@ -1156,7 +1156,8 @@ static const char* client_usage_msg[][68] = {
" ln -s ca-cert.pem `openssl x509 -in ca-cert.pem -hash -noout`.0\n", " ln -s ca-cert.pem `openssl x509 -in ca-cert.pem -hash -noout`.0\n",
/* 67 */ /* 67 */
#endif #endif
#if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) #if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && \
!defined(WOLFSENTRY_NO_JSON)
"--wolfsentry-config <file> Path for JSON wolfSentry config\n", "--wolfsentry-config <file> Path for JSON wolfSentry config\n",
/* 68 */ /* 68 */
#endif #endif
@@ -1346,7 +1347,8 @@ static const char* client_usage_msg[][68] = {
" ln -s ca-cert.pem `openssl x509 -in ca-cert.pem -hash -noout`.0\n", " ln -s ca-cert.pem `openssl x509 -in ca-cert.pem -hash -noout`.0\n",
/* 67 */ /* 67 */
#endif #endif
#if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) #if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && \
!defined(WOLFSENTRY_NO_JSON)
"--wolfsentry-config <file> wolfSentry コンフィグファイル\n", "--wolfsentry-config <file> wolfSentry コンフィグファイル\n",
/* 68 */ /* 68 */
#endif #endif
@@ -1528,7 +1530,8 @@ static void Usage(void)
!defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR) !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
printf("%s", msg[++msgid]); /* -9 */ printf("%s", msg[++msgid]); /* -9 */
#endif #endif
#if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) #if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && \
!defined(WOLFSENTRY_NO_JSON)
printf("%s", msg[++msgid]); /* --wolfsentry-config */ printf("%s", msg[++msgid]); /* --wolfsentry-config */
#endif #endif
} }
@@ -1563,7 +1566,8 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
#ifndef WOLFSSL_VXWORKS #ifndef WOLFSSL_VXWORKS
int ch; int ch;
static const struct mygetopt_long_config long_options[] = { static const struct mygetopt_long_config long_options[] = {
#if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) #if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && \
!defined(WOLFSENTRY_NO_JSON)
{ "wolfsentry-config", 1, 256 }, { "wolfsentry-config", 1, 256 },
#endif #endif
{ "help", 0, 257 }, { "help", 0, 257 },
@@ -2563,14 +2567,17 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
#ifdef WOLFSSL_WOLFSENTRY_HOOKS #ifdef WOLFSSL_WOLFSENTRY_HOOKS
if (wolfsentry_setup(&wolfsentry, wolfsentry_config_path, WOLFSENTRY_ROUTE_FLAG_DIRECTION_OUT) < 0) if (wolfsentry_setup(&wolfsentry, wolfsentry_config_path,
WOLFSENTRY_ROUTE_FLAG_DIRECTION_OUT) < 0) {
err_sys("unable to initialize wolfSentry"); err_sys("unable to initialize wolfSentry");
}
if (wolfSSL_CTX_set_ConnectFilter( if (wolfSSL_CTX_set_ConnectFilter(
ctx, ctx,
(NetworkFilterCallback_t)wolfSentry_NetworkFilterCallback, (NetworkFilterCallback_t)wolfSentry_NetworkFilterCallback,
wolfsentry) < 0) wolfsentry) < 0) {
err_sys("unable to install wolfSentry_NetworkFilterCallback"); err_sys("unable to install wolfSentry_NetworkFilterCallback");
}
#endif #endif
if (cipherList && !useDefCipherList) { if (cipherList && !useDefCipherList) {

View File

@@ -1099,7 +1099,8 @@ static void Usage(void)
!defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR) !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
printf("%s", msg[++msgId]); /* -9 */ printf("%s", msg[++msgId]); /* -9 */
#endif #endif
#if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) #if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && \
!defined(WOLFSENTRY_NO_JSON)
printf("%s", msg[++msgId]); /* --wolfsentry-config */ printf("%s", msg[++msgId]); /* --wolfsentry-config */
#endif #endif
} }
@@ -1123,7 +1124,8 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
#ifndef WOLFSSL_VXWORKS #ifndef WOLFSSL_VXWORKS
int ch; int ch;
static const struct mygetopt_long_config long_options[] = { static const struct mygetopt_long_config long_options[] = {
#if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) #if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && \
!defined(WOLFSENTRY_NO_JSON)
{ "wolfsentry-config", 1, 256 }, { "wolfsentry-config", 1, 256 },
#endif #endif
{ "help", 0, 257 }, { "help", 0, 257 },
@@ -1979,15 +1981,18 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
err_sys_ex(catastrophic, "unable to get ctx"); err_sys_ex(catastrophic, "unable to get ctx");
#ifdef WOLFSSL_WOLFSENTRY_HOOKS #ifdef WOLFSSL_WOLFSENTRY_HOOKS
if (wolfsentry_setup(&wolfsentry, wolfsentry_config_path, WOLFSENTRY_ROUTE_FLAG_DIRECTION_IN) < 0) if (wolfsentry_setup(&wolfsentry, wolfsentry_config_path,
WOLFSENTRY_ROUTE_FLAG_DIRECTION_IN) < 0) {
err_sys("unable to initialize wolfSentry"); err_sys("unable to initialize wolfSentry");
}
if (wolfSSL_CTX_set_AcceptFilter( if (wolfSSL_CTX_set_AcceptFilter(
ctx, ctx,
(NetworkFilterCallback_t)wolfSentry_NetworkFilterCallback, (NetworkFilterCallback_t)wolfSentry_NetworkFilterCallback,
wolfsentry) < 0) wolfsentry) < 0) {
err_sys_ex(catastrophic, err_sys_ex(catastrophic,
"unable to install wolfSentry_NetworkFilterCallback"); "unable to install wolfSentry_NetworkFilterCallback");
}
#endif #endif
if (simulateWantWrite) if (simulateWantWrite)

View File

@@ -663,7 +663,8 @@ struct mygetopt_long_config {
* present. * present.
* @return Option letter in argument * @return Option letter in argument
*/ */
static WC_INLINE int mygetopt_long(int argc, char** argv, const char* optstring, const struct mygetopt_long_config *longopts, int *longindex) static WC_INLINE int mygetopt_long(int argc, char** argv, const char* optstring,
const struct mygetopt_long_config *longopts, int *longindex)
{ {
static char* next = NULL; static char* next = NULL;
@@ -1374,7 +1375,7 @@ static int wolfsentry_setup(
fprintf(stderr, "wolfsentry_config_json_init() returned " fprintf(stderr, "wolfsentry_config_json_init() returned "
WOLFSENTRY_ERROR_FMT "\n", WOLFSENTRY_ERROR_FMT "\n",
WOLFSENTRY_ERROR_FMT_ARGS(ret)); WOLFSENTRY_ERROR_FMT_ARGS(ret));
err_sys("error while initlalizing wolfSentry config parser"); err_sys("error while initializing wolfSentry config parser");
} }
for (;;) { for (;;) {
@@ -1400,7 +1401,7 @@ static int wolfsentry_setup(
} }
} else } else
#endif /* !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) */ #endif /* !NO_FILESYSTEM && !WOLFSENTRY_NO_JSON */
{ {
struct wolfsentry_route_table *table; struct wolfsentry_route_table *table;
@@ -1611,7 +1612,8 @@ static WC_INLINE int tcp_connect_with_wolfSentry(
return WOLFSSL_SUCCESS; return WOLFSSL_SUCCESS;
} }
#define tcp_connect(sockfd, ip, port, udp, sctp, ssl) tcp_connect_with_wolfSentry(sockfd, ip, port, udp, sctp, ssl, wolfsentry) #define tcp_connect(sockfd, ip, port, udp, sctp, ssl) \
tcp_connect_with_wolfSentry(sockfd, ip, port, udp, sctp, ssl, wolfsentry)
#else /* !WOLFSSL_WOLFSENTRY_HOOKS */ #else /* !WOLFSSL_WOLFSENTRY_HOOKS */