Skip to content

Commit 260a0de

Browse files
committed
examples/client/client.c: fix numbering annotations, and fix string literal grouping for "-H".
1 parent 0d5d05d commit 260a0de

1 file changed

Lines changed: 61 additions & 61 deletions

File tree

examples/client/client.c

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ static int ClientWriteRead(WOLFSSL* ssl, const char* msg, int msgSz,
11241124
/* 4. add the same message into Japanese section */
11251125
/* (will be translated later) */
11261126
/* 5. add printf() into suitable position of Usage() */
1127-
static const char* client_usage_msg[][78] = {
1127+
static const char* client_usage_msg[][77] = {
11281128
/* English */
11291129
{
11301130
" NOTE: All files relative to wolfSSL home dir\n", /* 0 */
@@ -1244,11 +1244,11 @@ static const char* client_usage_msg[][78] = {
12441244
" With 'm' at end indicates MUST staple\n", /* 42 */
12451245
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_TLS_OCSP_MULTI)
12461246
" -W 1 -v 4, Perform multi OCSP stapling for TLS13\n",
1247-
/* 43 */
1247+
/* 43 */
12481248
#endif
12491249
#endif
12501250
#if defined(ATOMIC_USER) && !defined(WOLFSSL_AEAD_ONLY)
1251-
"-U Atomic User Record Layer Callbacks\n", /* 45 */
1251+
"-U Atomic User Record Layer Callbacks\n", /* 44 */
12521252
#endif
12531253
#ifdef HAVE_PK_CALLBACKS
12541254
"-P Public Key Callbacks\n", /* 45 */
@@ -1266,92 +1266,92 @@ static const char* client_usage_msg[][78] = {
12661266
"-q <file> Whitewood config file, defaults\n", /* 49 */
12671267
#endif
12681268
"-H <arg> Internal tests"
1269-
" [defCipherList, exitWithRet, verifyFail, useSupCurve,\n", /* 50 */
1270-
" loadSSL, disallowETM]\n", /* 51 */
1269+
" [defCipherList, exitWithRet, verifyFail, useSupCurve,\n"
1270+
" loadSSL, disallowETM]\n", /* 50 */
12711271
#ifdef WOLFSSL_TLS13
1272-
"-J Use HelloRetryRequest to choose group for KE\n", /* 52 */
1273-
"-K Key Exchange for PSK not using (EC)DHE\n", /* 53 */
1274-
"-I Update keys and IVs before sending data\n", /* 54 */
1272+
"-J Use HelloRetryRequest to choose group for KE\n", /* 51 */
1273+
"-K Key Exchange for PSK not using (EC)DHE\n", /* 52 */
1274+
"-I Update keys and IVs before sending data\n", /* 53 */
12751275
#ifndef NO_DH
1276-
"-y Key Share with FFDHE named groups only\n", /* 55 */
1276+
"-y Key Share with FFDHE named groups only\n", /* 54 */
12771277
#endif
12781278
#ifdef HAVE_ECC
1279-
"-Y Key Share with ECC named groups only\n", /* 56 */
1279+
"-Y Key Share with ECC named groups only\n", /* 55 */
12801280
#endif
12811281
#endif /* WOLFSSL_TLS13 */
12821282
#ifdef HAVE_CURVE25519
1283-
"-t Use X25519 for key exchange\n", /* 57 */
1283+
"-t Use X25519 for key exchange\n", /* 56 */
12841284
#endif
12851285
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH)
1286-
"-Q Support requesting certificate post-handshake\n", /* 58 */
1286+
"-Q Support requesting certificate post-handshake\n", /* 57 */
12871287
#endif
12881288
#ifdef WOLFSSL_EARLY_DATA
1289-
"-0 Early data sent to server (0-RTT handshake)\n", /* 59 */
1289+
"-0 Early data sent to server (0-RTT handshake)\n", /* 58 */
12901290
#endif
12911291
#ifdef WOLFSSL_MULTICAST
1292-
"-3 <grpid> Multicast, grpid < 256\n", /* 60 */
1292+
"-3 <grpid> Multicast, grpid < 256\n", /* 59 */
12931293
#endif
12941294
"-1 <num> Display a result by specified language.\n"
1295-
" 0: English, 1: Japanese\n", /* 61 */
1295+
" 0: English, 1: Japanese\n", /* 60 */
12961296
#if !defined(NO_DH) && !defined(HAVE_FIPS) && \
12971297
!defined(HAVE_SELFTEST) && !defined(WOLFSSL_OLD_PRIME_CHECK)
1298-
"-2 Disable DH Prime check\n", /* 62 */
1298+
"-2 Disable DH Prime check\n", /* 61 */
12991299
#endif
13001300
#ifdef HAVE_SECURE_RENEGOTIATION
1301-
"-4 Use resumption for renegotiation\n", /* 63 */
1301+
"-4 Use resumption for renegotiation\n", /* 62 */
13021302
#endif
13031303
#ifdef HAVE_TRUSTED_CA
1304-
"-5 Use Trusted CA Key Indication\n", /* 64 */
1304+
"-5 Use Trusted CA Key Indication\n", /* 63 */
13051305
#endif
1306-
"-6 Simulate WANT_WRITE errors on every other IO send\n",
1306+
"-6 Simulate WANT_WRITE errors on every other IO send\n", /* 64 */
13071307
#ifdef HAVE_CURVE448
13081308
"-8 Use X448 for key exchange\n", /* 65 */
13091309
#endif
13101310
#if defined(OPENSSL_ALL) && defined(WOLFSSL_CERT_GEN) && \
13111311
(defined(WOLFSSL_CERT_REQ) || defined(WOLFSSL_CERT_EXT)) && \
13121312
!defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
13131313
"-9 Use hash dir look up for certificate loading\n"
1314-
" loading from <wolfSSL home>/certs folder\n"
1315-
" files in the folder would have the form \"hash.N\" file name\n"
1316-
" e.g symbolic link to the file at certs folder\n"
1317-
" ln -s ca-cert.pem `openssl x509 -in ca-cert.pem -hash -noout`.0\n",
1318-
/* 67 */
1314+
" loading from <wolfSSL home>/certs folder\n"
1315+
" files in the folder would have the form \"hash.N\" file name\n"
1316+
" e.g symbolic link to the file at certs folder\n"
1317+
" ln -s ca-cert.pem `openssl x509 -in ca-cert.pem -hash -noout`.0\n",
1318+
/* 66 */
13191319
#endif
13201320
#if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && \
13211321
!defined(WOLFSENTRY_NO_JSON)
13221322
"--wolfsentry-config <file> Path for JSON wolfSentry config\n",
1323-
/* 68 */
1323+
/* 67 */
13241324
#endif
13251325
#ifndef WOLFSSL_TLS13
13261326
"-7 Set minimum downgrade protocol version [0-3] "
13271327
" SSLv3(0) - TLS1.2(3)\n",
13281328
#else
13291329
"-7 Set minimum downgrade protocol version [0-4] "
1330-
" SSLv3(0) - TLS1.3(4)\n", /* 69 */
1330+
" SSLv3(0) - TLS1.3(4)\n", /* 68 */
13311331
#endif
13321332
#ifdef HAVE_PQC
13331333
"--pqc <alg> Key Share with specified post-quantum algorithm only [KYBER_LEVEL1, KYBER_LEVEL3,\n"
1334-
" KYBER_LEVEL5, P256_KYBER_LEVEL1, P384_KYBER_LEVEL3, P521_KYBER_LEVEL5]\n", /* 70 */
1334+
" KYBER_LEVEL5, P256_KYBER_LEVEL1, P384_KYBER_LEVEL3, P521_KYBER_LEVEL5]\n", /* 69 */
13351335
#endif
13361336
#ifdef WOLFSSL_SRTP
1337-
"--srtp <profile> (default is SRTP_AES128_CM_SHA1_80)\n", /* 71 */
1337+
"--srtp <profile> (default is SRTP_AES128_CM_SHA1_80)\n", /* 70 */
13381338
#endif
13391339
#ifdef WOLFSSL_SYS_CA_CERTS
1340-
"--sys-ca-certs Load system CA certs for server cert verification\n", /* 72 */
1340+
"--sys-ca-certs Load system CA certs for server cert verification\n", /* 71 */
13411341
#endif
13421342
#ifdef HAVE_SUPPORTED_CURVES
1343-
"--onlyPskDheKe Must use DHE key exchange with PSK\n", /* 73 */
1343+
"--onlyPskDheKe Must use DHE key exchange with PSK\n", /* 72 */
13441344
#endif
13451345
#ifndef NO_PSK
1346-
"--openssl-psk Use TLS 1.3 PSK callback compatible with OpenSSL\n", /* 74 */
1346+
"--openssl-psk Use TLS 1.3 PSK callback compatible with OpenSSL\n", /* 73 */
13471347
#endif
13481348
#ifdef HAVE_RPK
1349-
"--rpk Use RPK for the defined certificates\n", /* 75 */
1349+
"--rpk Use RPK for the defined certificates\n", /* 74 */
13501350
#endif
1351-
"--files-are-der Specified files are in DER, not PEM format\n", /* 76 */
1351+
"--files-are-der Specified files are in DER, not PEM format\n", /* 75 */
13521352
"\n"
13531353
"For simpler wolfSSL TLS client examples, visit\n"
1354-
"https://github.com/wolfSSL/wolfssl-examples/tree/master/tls\n", /* 77 */
1354+
"https://github.com/wolfSSL/wolfssl-examples/tree/master/tls\n", /* 76 */
13551355
NULL,
13561356
},
13571357
#ifndef NO_MULTIBYTE_PRINT
@@ -1499,45 +1499,45 @@ static const char* client_usage_msg[][78] = {
14991499
"-q <file> Whitewood コンフィグファイル, 既定値\n", /* 49 */
15001500
#endif
15011501
"-H <arg> 内部テスト"
1502-
" [defCipherList, exitWithRet, verifyFail, useSupCurve,\n", /* 50 */
1503-
" loadSSL, disallowETM]\n", /* 51 */
1502+
" [defCipherList, exitWithRet, verifyFail, useSupCurve,\n"
1503+
" loadSSL, disallowETM]\n", /* 50 */
15041504
#ifdef WOLFSSL_TLS13
1505-
"-J HelloRetryRequestをKEのグループ選択に使用する\n", /* 52 */
1506-
"-K 鍵交換にPSKを使用、(EC)DHEは使用しない\n", /* 53 */
1507-
"-I データ送信前に、鍵とIVを更新する\n", /* 54 */
1505+
"-J HelloRetryRequestをKEのグループ選択に使用する\n", /* 51 */
1506+
"-K 鍵交換にPSKを使用、(EC)DHEは使用しない\n", /* 52 */
1507+
"-I データ送信前に、鍵とIVを更新する\n", /* 53 */
15081508
#ifndef NO_DH
1509-
"-y FFDHE名前付きグループとの鍵共有のみ\n", /* 55 */
1509+
"-y FFDHE名前付きグループとの鍵共有のみ\n", /* 54 */
15101510
#endif
15111511
#ifdef HAVE_ECC
1512-
"-Y ECC名前付きグループとの鍵共有のみ\n", /* 56 */
1512+
"-Y ECC名前付きグループとの鍵共有のみ\n", /* 55 */
15131513
#endif
15141514
#endif /* WOLFSSL_TLS13 */
15151515
#ifdef HAVE_CURVE25519
1516-
"-t X25519を鍵交換に使用する\n", /* 57 */
1516+
"-t X25519を鍵交換に使用する\n", /* 56 */
15171517
#endif
15181518
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH)
1519-
"-Q ポストハンドシェークの証明要求をサポートする\n", /* 58 */
1519+
"-Q ポストハンドシェークの証明要求をサポートする\n", /* 57 */
15201520
#endif
15211521
#ifdef WOLFSSL_EARLY_DATA
15221522
"-0 Early data をサーバーへ送信する"
1523-
"(0-RTTハンドシェイク)\n", /* 59 */
1523+
"(0-RTTハンドシェイク)\n", /* 58 */
15241524
#endif
15251525
#ifdef WOLFSSL_MULTICAST
1526-
"-3 <grpid> マルチキャスト, grpid < 256\n", /* 60 */
1526+
"-3 <grpid> マルチキャスト, grpid < 256\n", /* 59 */
15271527
#endif
15281528
"-1 <num> 指定された言語で結果を表示します。\n"
1529-
" 0: 英語、 1: 日本語\n", /* 61 */
1529+
" 0: 英語、 1: 日本語\n", /* 60 */
15301530
#if !defined(NO_DH) && !defined(HAVE_FIPS) && \
15311531
!defined(HAVE_SELFTEST) && !defined(WOLFSSL_OLD_PRIME_CHECK)
1532-
"-2 DHプライム番号チェックを無効にする\n", /* 62 */
1532+
"-2 DHプライム番号チェックを無効にする\n", /* 61 */
15331533
#endif
15341534
#ifdef HAVE_SECURE_RENEGOTIATION
1535-
"-4 再交渉に再開を使用\n", /* 63 */
1535+
"-4 再交渉に再開を使用\n", /* 62 */
15361536
#endif
15371537
#ifdef HAVE_TRUSTED_CA
1538-
"-5 信頼できる認証局の鍵表示を使用する\n", /* 64 */
1538+
"-5 信頼できる認証局の鍵表示を使用する\n", /* 63 */
15391539
#endif
1540-
"-6 WANT_WRITE エラーを全てのIO 送信でシミュレートします\n",
1540+
"-6 WANT_WRITE エラーを全てのIO 送信でシミュレートします\n", /* 64 */
15411541
#ifdef HAVE_CURVE448
15421542
"-8 鍵交換に X448 を使用する\n", /* 65 */
15431543
#endif
@@ -1549,44 +1549,44 @@ static const char* client_usage_msg[][78] = {
15491549
" フォルダー中のファイルは、\"hash.N\"[N:0-9]名である必要があります\n"
15501550
" 以下の例ではca-cert.pemにシンボリックリンクを設定します\n"
15511551
" ln -s ca-cert.pem `openssl x509 -in ca-cert.pem -hash -noout`.0\n",
1552-
/* 67 */
1552+
/* 66 */
15531553
#endif
15541554
#if defined(WOLFSSL_WOLFSENTRY_HOOKS) && !defined(NO_FILESYSTEM) && \
15551555
!defined(WOLFSENTRY_NO_JSON)
15561556
"--wolfsentry-config <file> wolfSentry コンフィグファイル\n",
1557-
/* 68 */
1557+
/* 67 */
15581558
#endif
15591559
#ifndef WOLFSSL_TLS13
15601560
"-7 最小ダウングレード可能なプロトコルバージョンを設定します [0-3] "
15611561
" SSLv3(0) - TLS1.2(3)\n",
15621562
#else
15631563
"-7 最小ダウングレード可能なプロトコルバージョンを設定します [0-4] "
1564-
" SSLv3(0) - TLS1.3(4)\n", /* 69 */
1564+
" SSLv3(0) - TLS1.3(4)\n", /* 68 */
15651565
#endif
15661566
#ifdef HAVE_PQC
15671567
"--pqc <alg> post-quantum 名前付きグループとの鍵共有のみ [KYBER_LEVEL1, KYBER_LEVEL3,\n"
1568-
" KYBER_LEVEL5, P256_KYBER_LEVEL1, P384_KYBER_LEVEL3, P521_KYBER_LEVEL5]\n", /* 70 */
1568+
" KYBER_LEVEL5, P256_KYBER_LEVEL1, P384_KYBER_LEVEL3, P521_KYBER_LEVEL5]\n", /* 69 */
15691569
#endif
15701570
#ifdef WOLFSSL_SRTP
1571-
"--srtp <profile> (デフォルトは SRTP_AES128_CM_SHA1_80)\n", /* 71 */
1571+
"--srtp <profile> (デフォルトは SRTP_AES128_CM_SHA1_80)\n", /* 70 */
15721572
#endif
15731573
#ifdef WOLFSSL_SYS_CA_CERTS
1574-
"--sys-ca-certs Load system CA certs for server cert verification\n", /* 72 */
1574+
"--sys-ca-certs Load system CA certs for server cert verification\n", /* 71 */
15751575
#endif
15761576
#ifdef HAVE_SUPPORTED_CURVES
1577-
"--onlyPskDheKe Must use DHE key exchange with PSK\n", /* 73 */
1577+
"--onlyPskDheKe Must use DHE key exchange with PSK\n", /* 72 */
15781578
#endif
15791579
#ifndef NO_PSK
1580-
"--openssl-psk Use TLS 1.3 PSK callback compatible with OpenSSL\n", /* 74 */
1580+
"--openssl-psk Use TLS 1.3 PSK callback compatible with OpenSSL\n", /* 73 */
15811581
#endif
15821582
#ifdef HAVE_RPK
1583-
"--rpk Use RPK for the defined certificates\n", /* 75 */
1583+
"--rpk Use RPK for the defined certificates\n", /* 74 */
15841584
#endif
1585-
"--files-are-der Specified files are in DER, not PEM format\n", /* 76 */
1585+
"--files-are-der Specified files are in DER, not PEM format\n", /* 75 */
15861586
"\n"
15871587
"より簡単なwolfSSL TLS クライアントの例については"
15881588
"下記にアクセスしてください\n"
1589-
"https://github.com/wolfSSL/wolfssl-examples/tree/master/tls\n", /* 77 */
1589+
"https://github.com/wolfSSL/wolfssl-examples/tree/master/tls\n", /* 76 */
15901590
NULL,
15911591
},
15921592
#endif

0 commit comments

Comments
 (0)