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",
/* 67 */
#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",
/* 68 */
#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",
/* 67 */
#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",
/* 68 */
#endif
@@ -1528,7 +1530,8 @@ static void Usage(void)
!defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
printf("%s", msg[++msgid]); /* -9 */
#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 */
#endif
}
@@ -1563,7 +1566,8 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
#ifndef WOLFSSL_VXWORKS
int ch;
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 },
#endif
{ "help", 0, 257 },
@@ -2563,14 +2567,17 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
#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");
}
if (wolfSSL_CTX_set_ConnectFilter(
ctx,
(NetworkFilterCallback_t)wolfSentry_NetworkFilterCallback,
wolfsentry) < 0)
wolfsentry) < 0) {
err_sys("unable to install wolfSentry_NetworkFilterCallback");
}
#endif
if (cipherList && !useDefCipherList) {

View File

@@ -1099,7 +1099,8 @@ static void Usage(void)
!defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
printf("%s", msg[++msgId]); /* -9 */
#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 */
#endif
}
@@ -1123,7 +1124,8 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
#ifndef WOLFSSL_VXWORKS
int ch;
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 },
#endif
{ "help", 0, 257 },
@@ -1979,15 +1981,18 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
err_sys_ex(catastrophic, "unable to get ctx");
#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");
}
if (wolfSSL_CTX_set_AcceptFilter(
ctx,
(NetworkFilterCallback_t)wolfSentry_NetworkFilterCallback,
wolfsentry) < 0)
wolfsentry) < 0) {
err_sys_ex(catastrophic,
"unable to install wolfSentry_NetworkFilterCallback");
}
#endif
if (simulateWantWrite)

View File

@@ -663,7 +663,8 @@ struct mygetopt_long_config {
* present.
* @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;
@@ -1374,7 +1375,7 @@ static int wolfsentry_setup(
fprintf(stderr, "wolfsentry_config_json_init() returned "
WOLFSENTRY_ERROR_FMT "\n",
WOLFSENTRY_ERROR_FMT_ARGS(ret));
err_sys("error while initlalizing wolfSentry config parser");
err_sys("error while initializing wolfSentry config parser");
}
for (;;) {
@@ -1400,7 +1401,7 @@ static int wolfsentry_setup(
}
} else
#endif /* !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) */
#endif /* !NO_FILESYSTEM && !WOLFSENTRY_NO_JSON */
{
struct wolfsentry_route_table *table;
@@ -1559,7 +1560,7 @@ static WC_INLINE int tcp_connect_with_wolfSentry(
&wolfsentry_data->local,
wolfsentry_data->flags,
NULL /* event_label */,
0 /* event_label_len */,
0 /* event_label_len */,
NULL /* caller_context */,
NULL /* id */,
NULL /* inexact_matches */,
@@ -1592,7 +1593,7 @@ static WC_INLINE int tcp_connect_with_wolfSentry(
decision,
decision == WOLFSSL_NETFILTER_REJECT ? "REJECT" :
decision == WOLFSSL_NETFILTER_ACCEPT ? "ACCEPT" :
decision == WOLFSSL_NETFILTER_PASS ? "PASS" :
decision == WOLFSSL_NETFILTER_PASS ? "PASS" :
"???");
if (decision == WOLFSSL_NETFILTER_REJECT)
@@ -1611,7 +1612,8 @@ static WC_INLINE int tcp_connect_with_wolfSentry(
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 */