sdtid: Fix incorrect PINMODE conversions

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
library: Fix off-by-one error copying the ctf string

For a max-length input, we need to leave room for the terminating NUL.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
cli,gui: Make sure copied strings are NUL terminated

This could probably use strlcpy() but that might require libbsd.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
sdtid: Fix a couple of weird input corner cases

This corrects the handling of < > & symbols, and totally empty strings
(no space in the content).

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
sdtid: Don't mangle characters when reading template files

If a template says e.g. "AT&amp;T" we do not want this to be translated
to "AT&amp;;T" in the output sdtid file.  The translation should only
happen when hashing/parsing a real sdtid file.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
sdtid-test.pl: Drop --strict flag and use more aggressive defaults

We will produce pure-ASCII strings up to 32 (mangled) characters long, as
stoken can safely handle this now.

Above 32 characters, things get weird.  For instance, key generation using
the Origin/Dest/SN nodes will use a block of zero bytes and completely
ignore the input data if the input data is >32 chars.  It is possible that
the RSA software may prohibit longer entries to avoid this situation.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
man: Update notes on sdtid BUGS

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
debian: Add stoken.examples file

This intentionally omits the .gitignore file in the same directory, as
it will generate a lintian warning.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Update changelogs

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>