Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ CLAUDE.md
/index.txt
/serial-file-test
/rand-file-test
manpages/*.1.gz
67 changes: 63 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,40 @@ EXTRA_DIST+= wolfclu.sln
EXTRA_DIST+= wolfCLU.vcxproj
EXTRA_DIST+= wolfCLU.vcxproj.filters

man_MANS+= manpages/wolfCLU_benchmark.1
man_MANS+= manpages/wolfCLU_decrypt.1
man_MANS+= manpages/wolfCLU_encrypt.1
man_MANS+= manpages/wolfCLU_hash.1
if ENABLE_MANPAGES
man_MANS+= manpages/wolfssl.1
man_MANS+= manpages/wolfssl-bench.1
man_MANS+= manpages/wolfssl-decrypt.1
man_MANS+= manpages/wolfssl-encrypt.1
man_MANS+= manpages/wolfssl-hash.1
man_MANS+= manpages/wolfssl-enc.1
man_MANS+= manpages/wolfssl-ca.1
man_MANS+= manpages/wolfssl-x509.1
man_MANS+= manpages/wolfssl-req.1
man_MANS+= manpages/wolfssl-verify.1
man_MANS+= manpages/wolfssl-crl.1
man_MANS+= manpages/wolfssl-genkey.1
man_MANS+= manpages/wolfssl-pkey.1
man_MANS+= manpages/wolfssl-rsa.1
man_MANS+= manpages/wolfssl-ecparam.1
man_MANS+= manpages/wolfssl-dsaparam.1
man_MANS+= manpages/wolfssl-dhparam.1
man_MANS+= manpages/wolfssl-pkcs7.1
man_MANS+= manpages/wolfssl-pkcs8.1
man_MANS+= manpages/wolfssl-pkcs12.1
man_MANS+= manpages/wolfssl-dgst.1
man_MANS+= manpages/wolfssl-sign_verify.1
man_MANS+= manpages/wolfssl-rand.1
man_MANS+= manpages/wolfssl-base64.1
man_MANS+= manpages/wolfssl-s_client.1
man_MANS+= manpages/wolfssl-s_server.1
man_MANS+= manpages/wolfssl-ocsp.1
man_MANS+= manpages/wolfssl-md5.1
man_MANS+= manpages/wolfssl-sha256.1
man_MANS+= manpages/wolfssl-sha384.1
man_MANS+= manpages/wolfssl-sha512.1
man_MANS+= manpages/wolfssl-version.1
endif

include src/include.am
include wolfclu/include.am
Expand Down Expand Up @@ -84,9 +113,39 @@ TESTS += $(check_SCRIPTS)
# When tests live in the source tree (no VPATH), those files land in tests/,
# where EXTRA_DIST+=tests would otherwise sweep them into the tarball and
# break `make distcheck` via stale VPATH lookups.
# Generate the compressed manpages into the tarball from their .1 sources,
# so the .gz copies are never hand-maintained in git. These ship in the release
# tarball for downstream packaging; they are intentionally not installed
# (man_MANS installs the .1 files, and distros compress man pages themselves).
# -n keeps the output byte-reproducible across dist runs (no embedded
# filename/mtime). Only done if manpages are enabled.
dist-hook:
find $(distdir)/tests -name '*.log' -delete
find $(distdir)/tests -name '*.trs' -delete
if ENABLE_MANPAGES
for f in $(distdir)/manpages/*.1; do gzip -nc "$$f" > "$$f.gz"; done
endif

if ENABLE_MANPAGES
# On-demand regeneration of the compressed manpages from their .1 sources.
# Run `make manpages-gz` after editing any .1; thanks to the prerequisite
# only the pages whose source actually changed are rebuilt. These .gz are
# gitignored and NOT installed (man_MANS installs the .1 files) -- the
# release tarball gets its own fresh copies via the dist-hook above, so this
# target is purely a local convenience (preview/packaging). It is not wired
# into `all` on purpose: writing into the source tree during a normal build
# would break `make distcheck`, which builds against a read-only srcdir.
# -n keeps the output byte-reproducible (no embedded filename/mtime).
MAN_GZ = $(man_MANS:.1=.1.gz)

.PHONY: manpages-gz
manpages-gz: $(MAN_GZ)

%.1.gz: %.1
gzip -nc "$<" > "$@"

CLEANFILES += $(MAN_GZ)
endif

test: check
#DISTCLEANFILES+= wolfssl-config
Expand Down
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,54 @@ sudo make install

If wolfSSL was recently installed run `sudo ldconfig` to update the linker cache.

#### Build Options

You can customize the build with configure flags:

```
./configure --disable-manpages # Skip manpage installation (useful for embedded builds)
./configure --with-wolfssl=PATH # Specify wolfSSL installation path
```

Now, you should be able to use wolfCLU:

```
wolfssl -h
```

If everything worked, you should see the wolfCLU help message.
If everything worked, you should see the wolfCLU help message. The manpages are also automatically installed during `make install`, so you can view them immediately:

```
man wolfssl
man wolfssl-genkey
man wolfssl-encrypt
```

For instuctions on how to build windows, see [here](ide/winvs/README.md).

## Contributing to Documentation

### Manpage Building

Manpages are automatically generated and installed as part of the normal build process (unless disabled with `--disable-manpages`). When you run `make install`, the `.1` source files in the `manpages/` directory are automatically installed to `/usr/share/man/man1/`, making them immediately accessible via the `man` command.

For developers actively editing manpage files (`.1` files in the `manpages/` directory), you can test changes locally without running the full build:

```bash
mkdir -p ~/.local/share/man/man1
cp manpages/*.1 ~/.local/share/man/man1/
man wolfssl-base64
```

Alternatively, generate compressed versions and view them directly (only available if manpages are enabled):

```bash
make manpages-gz
man -l manpages/wolfssl-base64.1
```

**Important:** Only commit the `.1` source files to the repository. The `.1.gz` compressed versions are generated on-demand during build and distribution—they are gitignored and should never be tracked in git.

## Examples

### Key Generation
Expand Down
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ then
AM_CFLAGS="$AM_CFLAGS -DWOLFCLU_NO_FILESYSTEM"
fi

# Manpages Build
ENABLED_MANPAGES_DEFAULT=yes
AC_ARG_ENABLE([manpages],
[AS_HELP_STRING([--disable-manpages],[Disable manpage installation (default: enabled)])],
[ ENABLED_MANPAGES=$enableval ],
[ ENABLED_MANPAGES=$ENABLED_MANPAGES_DEFAULT ]
)

AM_CONDITIONAL([ENABLE_MANPAGES], [test "$ENABLED_MANPAGES" = "yes"])


#wolfssl
AC_MSG_CHECKING([for wolfSSL])
Expand Down
5 changes: 0 additions & 5 deletions manpages/gzip_all.sh

This file was deleted.

34 changes: 0 additions & 34 deletions manpages/wolfCLU_benchmark.1

This file was deleted.

Binary file removed manpages/wolfCLU_benchmark.1.gz
Binary file not shown.
Binary file removed manpages/wolfCLU_decrypt.1.gz
Binary file not shown.
Binary file removed manpages/wolfCLU_encrypt.1.gz
Binary file not shown.
37 changes: 0 additions & 37 deletions manpages/wolfCLU_hash.1

This file was deleted.

Binary file removed manpages/wolfCLU_hash.1.gz
Binary file not shown.
31 changes: 31 additions & 0 deletions manpages/wolfssl-base64.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.\" Manpage for wolfssl base64.
.\" Contact info@wolfssl.com to correct errors or typos.
.TH wolfSSL SSL1 "June 2026" "0.2.0" "wolfssl base64 man page"
.SH NAME
base64 \- base64 encode or decode data
.SH SYNOPSIS
wolfssl base64 [-in file] [-out file] [-d]
.SH DESCRIPTION
Base64-encodes or decodes data. Defaults to reading from standard input
and writing to standard output when -in/-out are not given.
.SH OPTIONS
-in file input file to encode/decode.
.br
.LP
-out file output file for the encoded/decoded data.
.br
.LP
-d decode the input (default is to encode).
.SH NOTES
Available only when wolfSSL is built with filesystem support and encoding
support (not NO_CODING).
.SH SEE ALSO
.BR wolfssl-enc(1) ", " wolfssl-hash(1)
.SH BUGS
No known bugs at this time.
.SH AUTHOR
wolfSSL, Inc. (info@wolfssl.com)
.SH COPYRIGHT
Copyright 2026 wolfSSL Inc. All rights reserved.
.SH REPORTING BUGS
Report wolfssl bugs to support@wolfssl.com
53 changes: 53 additions & 0 deletions manpages/wolfssl-bench.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.\" Manpage for wolfCLU_benchmark.
.\" Contact info@wolfssl.com to correct errors or typos.
.TH wolfSSL SSL1 "June 2026" "0.2.0" "wolfssl benchmark man page"
.SH NAME
bench \- benchmark cryptographic algorithms
.SH SYNOPSIS
wolfssl bench {aes-cbc|aes-ctr|3des|camellia|md5|sha|sha256|sha384|sha512|blake2b|...} [-time <seconds>]
.br
wolfssl bench -all [-time <seconds>]
.SH DESCRIPTION
Benchmarks the performance of various cryptographic algorithms, measuring how fast they encrypt, decrypt, or hash data. Useful for understanding the speed and efficiency of different algorithms on your system.
.SH TESTS
-aes-cbc
-aes-ctr*
-3des*
-camellia*
-md5
-sha
-sha256
-sha384*
-sha512*
-blake2b*
*(NOTE: Only available through ./configure options)
.SH OPTIONS
-time <sec> time for each of the tests in seconds
.br
.LP
-all runs all available tests
.SH EXAMPLES
Benchmark AES-CBC encryption for 5 seconds:
.RS
wolfssl bench aes-cbc -time 5
.RE
.TP
Benchmark SHA-256 hashing for 10 seconds:
.RS
wolfssl bench sha256 -time 10
.RE
.TP
Run all available benchmarks:
.RS
wolfssl bench -all -time 5
.RE
.SH SEE ALSO
.BR wolfssl-encrypt(1) ", " wolfssl-hash(1) ", " wolfssl(1)
.SH BUGS
No known bugs at this time.
.SH AUTHOR
wolfSSL, Inc. (info@wolfssl.com)
.SH COPYRIGHT
Copyright 2026 wolfSSL Inc. All rights reserved.
.SH REPORTING BUGS
Report wolfssl bugs to support@wolfssl.com
Loading
Loading