From e2d49865275dcccc35ccaee24367841394b1df4c Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Thu, 29 Jan 2026 15:00:31 +0900 Subject: [PATCH 1/4] Add missing command documentation Add documentation for commands that were listed but had no docs: - s_server: SSL/TLS test server command - version: Display version information - ecc: ECC sign/verify command - ed25519: Ed25519 sign/verify command Both English and Japanese versions added. Updated mkdocs.yml and mkdocs-ja.yml navigation. Co-Authored-By: Claude Opus 4.5 --- wolfCLU/mkdocs-ja.yml | 4 ++++ wolfCLU/mkdocs.yml | 4 ++++ wolfCLU/src-ja/ecc.md | 33 +++++++++++++++++++++++++++++++++ wolfCLU/src-ja/ed25519.md | 33 +++++++++++++++++++++++++++++++++ wolfCLU/src-ja/s_server.md | 35 +++++++++++++++++++++++++++++++++++ wolfCLU/src-ja/version.md | 16 ++++++++++++++++ wolfCLU/src/ecc.md | 33 +++++++++++++++++++++++++++++++++ wolfCLU/src/ed25519.md | 33 +++++++++++++++++++++++++++++++++ wolfCLU/src/s_server.md | 35 +++++++++++++++++++++++++++++++++++ wolfCLU/src/version.md | 16 ++++++++++++++++ 10 files changed, 242 insertions(+) create mode 100644 wolfCLU/src-ja/ecc.md create mode 100644 wolfCLU/src-ja/ed25519.md create mode 100644 wolfCLU/src-ja/s_server.md create mode 100644 wolfCLU/src-ja/version.md create mode 100644 wolfCLU/src/ecc.md create mode 100644 wolfCLU/src/ed25519.md create mode 100644 wolfCLU/src/s_server.md create mode 100644 wolfCLU/src/version.md diff --git a/wolfCLU/mkdocs-ja.yml b/wolfCLU/mkdocs-ja.yml index f91da117..71ff4418 100644 --- a/wolfCLU/mkdocs-ja.yml +++ b/wolfCLU/mkdocs-ja.yml @@ -14,7 +14,9 @@ nav: - "DSAPARAM コマンド": dsaparam.md - "DGST コマンド": dgst.md - "DHPARAM コマンド": dhparam.md + - "ECC コマンド": ecc.md - "ECPARAM コマンド": ecparam.md + - "ED25519 コマンド": ed25519.md - "ENC コマンド": enc.md - "GENKEY コマンド": genkey.md - "HASH コマンド": hash.md @@ -28,7 +30,9 @@ nav: - "RSA コマンド": rsa.md - "SHA コマンド": sha.md - "S_CLIENT コマンド": s_client.md + - "S_SERVER コマンド": s_server.md - "VERIFY コマンド": verify.md + - "VERSION コマンド": version.md - "X509 コマンド": x509.md - "BASE64 コマンド": base64.md - "付録": diff --git a/wolfCLU/mkdocs.yml b/wolfCLU/mkdocs.yml index 8711f8fc..939de348 100644 --- a/wolfCLU/mkdocs.yml +++ b/wolfCLU/mkdocs.yml @@ -14,7 +14,9 @@ nav: - "DSAPARAM Command": dsaparam.md - "DGST Command": dgst.md - "DHPARAM Command": dhparam.md + - "ECC Command": ecc.md - "ECPARAM Command": ecparam.md + - "ED25519 Command": ed25519.md - "ENC Command": enc.md - "GENKEY Command": genkey.md - "HASH Command": hash.md @@ -28,7 +30,9 @@ nav: - "RSA Command": rsa.md - "SHA Command": sha.md - "S_CLIENT Command": s_client.md + - "S_SERVER Command": s_server.md - "VERIFY Command": verify.md + - "VERSION Command": version.md - "X509 Command": x509.md - "BASE64 Command": base64.md - "Appendix": diff --git a/wolfCLU/src-ja/ecc.md b/wolfCLU/src-ja/ecc.md new file mode 100644 index 00000000..d4418b0c --- /dev/null +++ b/wolfCLU/src-ja/ecc.md @@ -0,0 +1,33 @@ +### ECC コマンド + +ECC(楕円曲線暗号)鍵を使用してデータの署名・検証を行います。 + +引数: + +- [-sign] 署名操作 +- [-verify] 検証操作 +- [-inkey] 入力鍵ファイル +- [-in] 署名または検証する入力ファイル +- [-out] 署名の出力ファイル(署名操作時) +- [-sigfile] 署名ファイル(検証操作時) +- [-pubin] 入力鍵が公開鍵であることを指定(検証操作時) + +使用例: + +ECC秘密鍵でファイルに署名: + +``` +wolfssl ecc -sign -inkey ecc-priv.pem -in file.txt -out file.sig +``` + +ECC公開鍵で署名を検証: + +``` +wolfssl ecc -verify -inkey ecc-pub.pem -sigfile file.sig -in file.txt -pubin +``` + +ECC秘密鍵で署名を検証: + +``` +wolfssl ecc -verify -inkey ecc-priv.pem -sigfile file.sig -in file.txt +``` diff --git a/wolfCLU/src-ja/ed25519.md b/wolfCLU/src-ja/ed25519.md new file mode 100644 index 00000000..d7327b2a --- /dev/null +++ b/wolfCLU/src-ja/ed25519.md @@ -0,0 +1,33 @@ +### ED25519 コマンド + +Ed25519鍵を使用してデータの署名・検証を行います。 + +引数: + +- [-sign] 署名操作 +- [-verify] 検証操作 +- [-inkey] 入力鍵ファイル +- [-in] 署名または検証する入力ファイル +- [-out] 署名の出力ファイル(署名操作時) +- [-sigfile] 署名ファイル(検証操作時) +- [-pubin] 入力鍵が公開鍵であることを指定(検証操作時) + +使用例: + +Ed25519秘密鍵でファイルに署名: + +``` +wolfssl ed25519 -sign -inkey ed25519-priv.pem -in file.txt -out file.sig +``` + +Ed25519公開鍵で署名を検証: + +``` +wolfssl ed25519 -verify -inkey ed25519-pub.pem -sigfile file.sig -in file.txt -pubin +``` + +Ed25519秘密鍵で署名を検証: + +``` +wolfssl ed25519 -verify -inkey ed25519-priv.pem -sigfile file.sig -in file.txt +``` diff --git a/wolfCLU/src-ja/s_server.md b/wolfCLU/src-ja/s_server.md new file mode 100644 index 00000000..c988a2e7 --- /dev/null +++ b/wolfCLU/src-ja/s_server.md @@ -0,0 +1,35 @@ +### S_SERVER コマンド + +テスト用のシンプルなSSL/TLSサーバーです。指定したポートでリッスンし、SSL/TLS接続を処理します。 + +引数: + +- [-port] リッスンするポート番号 +- [-key] 秘密鍵ファイル(PEM形式) +- [-cert] 証明書ファイル(PEM形式) +- [-noVerify] クライアント証明書の検証を無効化 +- [-CAfile] クライアント検証用のCA証明書ファイル(PEM形式) +- [-version] SSL/TLSバージョン: 0=SSLv3, 1=TLS1.0, 2=TLS1.1, 3=TLS1.2, 4=TLS1.3 +- [-naccept] 受け付ける接続数(デフォルト: 1) +- [-www] HTTPレスポンスをHTML形式で送信 +- [-readyFile] 外部モニタリング用のreadyファイルを作成 + +使用例: + +ポート4433でシンプルなTLSサーバーを起動: + +``` +wolfssl s_server -port 4433 -cert server-cert.pem -key server-key.pem +``` + +クライアント証明書検証付きでサーバーを起動: + +``` +wolfssl s_server -port 4433 -cert server-cert.pem -key server-key.pem -CAfile ca-cert.pem +``` + +複数接続を受け付けHTTPレスポンスを返すサーバーを起動: + +``` +wolfssl s_server -port 4433 -cert server-cert.pem -key server-key.pem -naccept 10 -www +``` diff --git a/wolfCLU/src-ja/version.md b/wolfCLU/src-ja/version.md new file mode 100644 index 00000000..033e056d --- /dev/null +++ b/wolfCLU/src-ja/version.md @@ -0,0 +1,16 @@ +### VERSION コマンド + +wolfCLUとリンクされたwolfSSLライブラリのバージョン情報を表示します。 + +使用例: + +``` +wolfssl version +``` + +出力例: + +``` +You are using version 0.1.9 of the wolfssl Command Line Utility. +Linked to wolfSSL version 5.8.4 +``` diff --git a/wolfCLU/src/ecc.md b/wolfCLU/src/ecc.md new file mode 100644 index 00000000..704a61a4 --- /dev/null +++ b/wolfCLU/src/ecc.md @@ -0,0 +1,33 @@ +### ECC Command + +Sign and verify data using ECC (Elliptic Curve Cryptography) keys. + +Arguments: + +- [-sign] Sign operation +- [-verify] Verify operation +- [-inkey] Input key file +- [-in] Input file to sign or verify +- [-out] Output file for signature (sign operation) +- [-sigfile] Signature file (verify operation) +- [-pubin] Input key is a public key (for verify operation) + +Usage Examples: + +Sign a file with ECC private key: + +``` +wolfssl ecc -sign -inkey ecc-priv.pem -in file.txt -out file.sig +``` + +Verify a signature with ECC public key: + +``` +wolfssl ecc -verify -inkey ecc-pub.pem -sigfile file.sig -in file.txt -pubin +``` + +Verify a signature with ECC private key: + +``` +wolfssl ecc -verify -inkey ecc-priv.pem -sigfile file.sig -in file.txt +``` diff --git a/wolfCLU/src/ed25519.md b/wolfCLU/src/ed25519.md new file mode 100644 index 00000000..53d99377 --- /dev/null +++ b/wolfCLU/src/ed25519.md @@ -0,0 +1,33 @@ +### ED25519 Command + +Sign and verify data using Ed25519 keys. + +Arguments: + +- [-sign] Sign operation +- [-verify] Verify operation +- [-inkey] Input key file +- [-in] Input file to sign or verify +- [-out] Output file for signature (sign operation) +- [-sigfile] Signature file (verify operation) +- [-pubin] Input key is a public key (for verify operation) + +Usage Examples: + +Sign a file with Ed25519 private key: + +``` +wolfssl ed25519 -sign -inkey ed25519-priv.pem -in file.txt -out file.sig +``` + +Verify a signature with Ed25519 public key: + +``` +wolfssl ed25519 -verify -inkey ed25519-pub.pem -sigfile file.sig -in file.txt -pubin +``` + +Verify a signature with Ed25519 private key: + +``` +wolfssl ed25519 -verify -inkey ed25519-priv.pem -sigfile file.sig -in file.txt +``` diff --git a/wolfCLU/src/s_server.md b/wolfCLU/src/s_server.md new file mode 100644 index 00000000..e637fa91 --- /dev/null +++ b/wolfCLU/src/s_server.md @@ -0,0 +1,35 @@ +### S_SERVER Command + +A simple SSL/TLS server for testing. Listens on a specified port and handles incoming SSL/TLS connections. + +Arguments: + +- [-port] Port number to listen on +- [-key] Private key file (PEM format) +- [-cert] Certificate file (PEM format) +- [-noVerify] Disable client certificate verification +- [-CAfile] CA certificate file for client verification (PEM format) +- [-version] SSL/TLS version: 0=SSLv3, 1=TLS1.0, 2=TLS1.1, 3=TLS1.2, 4=TLS1.3 +- [-naccept] Number of connections to accept (default: 1) +- [-www] Send HTTP response in HTML format +- [-readyFile] Create a ready file for external monitoring + +Usage Examples: + +Start a simple TLS server on port 4433: + +``` +wolfssl s_server -port 4433 -cert server-cert.pem -key server-key.pem +``` + +Start server with client certificate verification: + +``` +wolfssl s_server -port 4433 -cert server-cert.pem -key server-key.pem -CAfile ca-cert.pem +``` + +Start server accepting multiple connections with HTTP response: + +``` +wolfssl s_server -port 4433 -cert server-cert.pem -key server-key.pem -naccept 10 -www +``` diff --git a/wolfCLU/src/version.md b/wolfCLU/src/version.md new file mode 100644 index 00000000..258576a0 --- /dev/null +++ b/wolfCLU/src/version.md @@ -0,0 +1,16 @@ +### VERSION Command + +Displays version information for wolfCLU and the linked wolfSSL library. + +Usage: + +``` +wolfssl version +``` + +Example Output: + +``` +You are using version 0.1.9 of the wolfssl Command Line Utility. +Linked to wolfSSL version 5.8.4 +``` From 8b6aa2733eec8835dba64f448d4c52ab913cb1bd Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Thu, 29 Jan 2026 15:11:26 +0900 Subject: [PATCH 2/4] Update Makefile to include all command docs and Appendix Add missing sources for PDF generation: - ecc.md, ed25519.md, s_server.md, version.md - config.md (Appendix) Co-Authored-By: Claude Opus 4.5 --- wolfCLU/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/wolfCLU/Makefile b/wolfCLU/Makefile index add73469..834b7d78 100644 --- a/wolfCLU/Makefile +++ b/wolfCLU/Makefile @@ -8,12 +8,14 @@ SOURCES = Intro.md \ command_list.md \ bench.md \ ca.md \ - crl.md \ + crl.md \ dsaparam.md \ - dgst.md \ + dgst.md \ dhparam.md \ - ecparam.md \ - enc.md \ + ecc.md \ + ecparam.md \ + ed25519.md \ + enc.md \ genkey.md \ hash.md \ md5.md \ @@ -26,9 +28,12 @@ SOURCES = Intro.md \ rsa.md \ sha.md \ s_client.md \ + s_server.md \ verify.md \ + version.md \ x509.md \ - base64.md + base64.md \ + config.md ifeq ($(DOC_LANG),JA) PDF = wolfCLU-Manual-jp.pdf From 2719257ba7c9918c421ce68d3a79504b3beea34b Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Thu, 29 Jan 2026 15:15:07 +0900 Subject: [PATCH 3/4] Fix limitation description: serial file works, -out path issue Corrected the limitations section: - Serial number file configuration works correctly - The actual bug is -out path concatenation with new_certs_dir - Added workaround: use relative path for -out option Updated both English and Japanese versions of ca.md and config.md. Co-Authored-By: Claude Opus 4.5 --- wolfCLU/src-ja/ca.md | 5 ++++- wolfCLU/src-ja/config.md | 9 ++++++++- wolfCLU/src/ca.md | 5 ++++- wolfCLU/src/config.md | 9 ++++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/wolfCLU/src-ja/ca.md b/wolfCLU/src-ja/ca.md index 3e7b09b3..42a0deb5 100644 --- a/wolfCLU/src-ja/ca.md +++ b/wolfCLU/src-ja/ca.md @@ -79,4 +79,7 @@ wolfssl ca -config ca.conf -extensions v3_ca -in server.csr -out server-signed.p ### 制限事項 -設定ファイルを使用しない場合、wolfCLUは署名された各証明書にランダムなシリアル番号を生成します。設定ファイルベースのシリアル番号管理とその現在の制限事項については、[設定ファイル - 制限事項](config.md#制限事項)を参照してください。 +- 設定ファイルを使用しない場合、wolfCLUは署名された各証明書にランダムなシリアル番号を生成します。 +- 設定ファイルの`new_certs_dir`と`-out`を併用する場合、`-out`には**相対パス**を使用してください。絶対パスはv0.1.9までのバージョンで正しく処理されません。 + +詳細は[設定ファイル - 制限事項](config.md#制限事項)を参照してください。 diff --git a/wolfCLU/src-ja/config.md b/wolfCLU/src-ja/config.md index d5925459..a070c671 100644 --- a/wolfCLU/src-ja/config.md +++ b/wolfCLU/src-ja/config.md @@ -274,6 +274,13 @@ wolfssl req -new -config simple.conf -key server.priv -out server.csr ## 制限事項 +### new_certs_dirと-outオプションのパス処理 + +設定ファイルの`new_certs_dir`と`-out`オプションを同時に使用する場合、v0.1.9までのバージョンでパス処理のバグがあります: + +- `-out`に**絶対パス**(例:`/tmp/output/signed.pem`)を指定すると、`new_certs_dir`と不正に結合され、無効なパスになります。 +- **回避策:** `-out`には**相対パス**(例:`signed.pem`)を使用してください。相対パスは`new_certs_dir`ディレクトリ内に正しく配置されます。 + ### シリアル番号ファイル `serial` ディレクティブは、16進形式のシリアル番号を含むファイルを指定します: @@ -282,4 +289,4 @@ wolfssl req -new -config simple.conf -key server.priv -out server.csr 01 ``` -**注意:** 現在のバージョン(v0.1.8)では、設定ファイルベースのシリアル番号管理にパス処理の問題があります。この問題が解決されるまで、コマンドライン引数を直接使用することを推奨します。設定ファイルを使用しない場合、wolfCLUは署名された各証明書にランダムなシリアル番号を生成します。 +シリアル番号は証明書が署名されるたびにインクリメントされます。シリアルファイルを指定する設定ファイルを使用しない場合、wolfCLUは署名された各証明書にランダムなシリアル番号を生成します。 diff --git a/wolfCLU/src/ca.md b/wolfCLU/src/ca.md index 4738c5d3..8bafc325 100644 --- a/wolfCLU/src/ca.md +++ b/wolfCLU/src/ca.md @@ -79,4 +79,7 @@ wolfssl ca -config ca.conf -extensions v3_ca -in server.csr -out server-signed.p ### Limitations -Without a configuration file, wolfCLU generates a random serial number for each signed certificate. See [Configuration File - Limitations](config.md#limitations) for details on config file-based serial number management and its current limitations. +- Without a configuration file, wolfCLU generates a random serial number for each signed certificate. +- When using `-out` with `new_certs_dir` in the config file, use a **relative path** for `-out`. Absolute paths are not handled correctly in versions up to v0.1.9. + +See [Configuration File - Limitations](config.md#limitations) for more details. diff --git a/wolfCLU/src/config.md b/wolfCLU/src/config.md index 82f25c7b..9e3e1bb5 100644 --- a/wolfCLU/src/config.md +++ b/wolfCLU/src/config.md @@ -274,6 +274,13 @@ wolfssl req -new -config simple.conf -key server.priv -out server.csr ## Limitations +### Output Path Handling with new_certs_dir + +When using the `-out` option together with `new_certs_dir` in the configuration file, there is a path handling bug in versions up to v0.1.9: + +- If `-out` specifies an **absolute path** (e.g., `/tmp/output/signed.pem`), it is incorrectly concatenated with `new_certs_dir`, resulting in an invalid path. +- **Workaround:** Use a relative path for `-out` (e.g., `signed.pem`), which will be correctly placed in the `new_certs_dir` directory. + ### Serial Number File The `serial` directive specifies a file containing the serial number in hexadecimal format: @@ -282,4 +289,4 @@ The `serial` directive specifies a file containing the serial number in hexadeci 01 ``` -**Note:** In the current version (v0.1.8), the configuration file-based serial number management has known issues with path handling. It is recommended to use command-line arguments directly until this is resolved. Without a configuration file, wolfCLU generates a random serial number for each signed certificate. +The serial number is incremented after each certificate is signed. Without a configuration file specifying a serial file, wolfCLU generates a random serial number for each signed certificate. From 17607ce27c07f0f092edea83c95c9b3f69b607c0 Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Thu, 29 Jan 2026 15:17:48 +0900 Subject: [PATCH 4/4] Remove limitation section - bug has been fixed The -out path handling issue with new_certs_dir has been resolved. Removed limitation descriptions from ca.md and config.md (EN/JA). Co-Authored-By: Claude Opus 4.5 --- wolfCLU/src-ja/ca.md | 6 ------ wolfCLU/src-ja/config.md | 11 +---------- wolfCLU/src/ca.md | 6 ------ wolfCLU/src/config.md | 11 +---------- 4 files changed, 2 insertions(+), 32 deletions(-) diff --git a/wolfCLU/src-ja/ca.md b/wolfCLU/src-ja/ca.md index 42a0deb5..b3d43c58 100644 --- a/wolfCLU/src-ja/ca.md +++ b/wolfCLU/src-ja/ca.md @@ -77,9 +77,3 @@ DNS.2 = www.example.com wolfssl ca -config ca.conf -extensions v3_ca -in server.csr -out server-signed.pem -keyfile ca.priv -cert ca.pem -days 365 -md sha256 ``` -### 制限事項 - -- 設定ファイルを使用しない場合、wolfCLUは署名された各証明書にランダムなシリアル番号を生成します。 -- 設定ファイルの`new_certs_dir`と`-out`を併用する場合、`-out`には**相対パス**を使用してください。絶対パスはv0.1.9までのバージョンで正しく処理されません。 - -詳細は[設定ファイル - 制限事項](config.md#制限事項)を参照してください。 diff --git a/wolfCLU/src-ja/config.md b/wolfCLU/src-ja/config.md index a070c671..8c9d9982 100644 --- a/wolfCLU/src-ja/config.md +++ b/wolfCLU/src-ja/config.md @@ -272,16 +272,7 @@ commonName = myserver wolfssl req -new -config simple.conf -key server.priv -out server.csr ``` -## 制限事項 - -### new_certs_dirと-outオプションのパス処理 - -設定ファイルの`new_certs_dir`と`-out`オプションを同時に使用する場合、v0.1.9までのバージョンでパス処理のバグがあります: - -- `-out`に**絶対パス**(例:`/tmp/output/signed.pem`)を指定すると、`new_certs_dir`と不正に結合され、無効なパスになります。 -- **回避策:** `-out`には**相対パス**(例:`signed.pem`)を使用してください。相対パスは`new_certs_dir`ディレクトリ内に正しく配置されます。 - -### シリアル番号ファイル +## シリアル番号ファイル `serial` ディレクティブは、16進形式のシリアル番号を含むファイルを指定します: diff --git a/wolfCLU/src/ca.md b/wolfCLU/src/ca.md index 8bafc325..a784950a 100644 --- a/wolfCLU/src/ca.md +++ b/wolfCLU/src/ca.md @@ -77,9 +77,3 @@ Sign CSR with extensions from config: wolfssl ca -config ca.conf -extensions v3_ca -in server.csr -out server-signed.pem -keyfile ca.priv -cert ca.pem -days 365 -md sha256 ``` -### Limitations - -- Without a configuration file, wolfCLU generates a random serial number for each signed certificate. -- When using `-out` with `new_certs_dir` in the config file, use a **relative path** for `-out`. Absolute paths are not handled correctly in versions up to v0.1.9. - -See [Configuration File - Limitations](config.md#limitations) for more details. diff --git a/wolfCLU/src/config.md b/wolfCLU/src/config.md index 9e3e1bb5..a8021131 100644 --- a/wolfCLU/src/config.md +++ b/wolfCLU/src/config.md @@ -272,16 +272,7 @@ Usage: wolfssl req -new -config simple.conf -key server.priv -out server.csr ``` -## Limitations - -### Output Path Handling with new_certs_dir - -When using the `-out` option together with `new_certs_dir` in the configuration file, there is a path handling bug in versions up to v0.1.9: - -- If `-out` specifies an **absolute path** (e.g., `/tmp/output/signed.pem`), it is incorrectly concatenated with `new_certs_dir`, resulting in an invalid path. -- **Workaround:** Use a relative path for `-out` (e.g., `signed.pem`), which will be correctly placed in the `new_certs_dir` directory. - -### Serial Number File +## Serial Number File The `serial` directive specifies a file containing the serial number in hexadecimal format: