Commit Graph

88 Commits

Author SHA1 Message Date
James Wilson
c6bf88e25f Add James Wilson to AUTHORS (#80) 2022-05-24 17:21:53 +02:00
Jonas Stein
aeab6f03de add author and reformat 2022-05-23 22:29:04 +02:00
James Wilson
490251f101 Fix incorrect radix printing (#78) 2022-05-19 09:08:51 +02:00
James Wilson
d2b7363769 clang-format run (#77)
* pull updated template .clang-format with `clang-format-14 --style=llvm --dump-config`, move to base directory so it is shared between `src` and `tests`
* tweak to match existing style a little (e.g. K&R style for function braces)
* run on all sources
2022-05-18 23:48:31 +02:00
James Wilson
86cca0804c Print algorithm information in detail output (#75)
* Print algorithm information in detail output
* Update documentation with information about algorithm listing
2022-05-18 22:28:37 +02:00
James Wilson
a7a7c4750c Do media checks on getting next block encryption status (#74)
* Do media check before getting NBES and allow getting status without media
* Supress error from BLANK CHECK sense when querying next block encryption status
2022-05-18 22:27:11 +02:00
James Wilson
8caaf85fbb Cleanup & reorganization (#73)
scsi::get_des & others should take a non-const buffer since they modify it
Reorder functions in main.cpp to declare internal functions static
Fix compile error in newer GCC (Compilation error #72) with more explicit cast
Remove some unused constants
Add KAD type enum
Pass key vector by reference instead of copying

Closes: https://github.com/scsitape/stenc/issues/72
2022-05-16 02:05:14 +02:00
James Wilson
f5856d7591 Test for key_from_hex_chars (#70) 2022-05-13 23:17:53 +02:00
James Wilson
eeb7d72686 Introduce portable, endian-clean structures using shifts and masks instead of bitfields (#66)
* Introduce portable, endian-clean structures using shifts and masks instead of bitfields
* Modernize SCSIExecute with RAII and exceptions
* Convert SP-IN calls to use the new portable SCSI structures and functions
* Convert SP-OUT code to use the new portable SCSI structures and functions
* Delete bitfield-based code and remove runtime endian check
Closes: https://github.com/scsitape/stenc/issues/63
2022-05-13 22:43:58 +02:00
James Wilson
1508f432ad Remove getuid root check (#68)
Closes: https://github.com/scsitape/stenc/discussions/64
2022-05-12 06:25:29 +02:00
Jonas Stein
08bd10230f add SCSI-Programming-HOWTO 2022-05-12 00:50:15 +02:00
James Wilson
13cf62cf8b Add unit test coverage of stenc output (#67)
using stream in functions instead of directly writing to cout
2022-05-12 00:40:39 +02:00
James Wilson
8ebccddc50 Small cleanup: (#65)
- pass string arguments by reference
- replace macros with constexpr where possible
- move command strings out of global scope
- use standard library strerror instead of custom printer readIOError
2022-05-10 19:20:55 +02:00
Paweł Marciniak
ebabc39c3e Fix missing manpage header (#62)
Closes: https://github.com/scsitape/stenc/issues/58
Co-authored-by: Paweł Marciniak <sunwire+git@gmail.com>
2022-05-10 00:42:39 +02:00
James Wilson
88975cc9ed Use CAM and the pass(4) device instead of the optional sg(4) device on FreeBSD (#30) 2022-05-09 11:53:49 +02:00
Jonas Stein
8b7e99556a note on drop of AIX support 2022-05-09 11:48:57 +02:00
James Wilson
44603e4884 Remove key generation (#60)
Closes: https://github.com/scsitape/stenc/issues/3
Closes: https://github.com/scsitape/stenc/issues/32
2022-05-09 11:43:59 +02:00
Jonas Stein
859c1a0757 Update ChangeLog 2022-05-09 01:13:37 +02:00
James Wilson
e6ac5fa3f0 Remove AIX support (#59) 2022-05-09 01:11:07 +02:00
James Wilson
f893ee93cc Use standard syslog facilities for logging (#47)
Closes: https://github.com/scsitape/stenc/issues/31
Co-authored-by: Jonas Stein <news@jonasstein.de>
2022-05-09 01:00:18 +02:00
James Wilson
fbba173a1f Remove device renaming and select default device (#48) 2022-05-09 00:52:07 +02:00
Jonas Stein
8078a346d1 Update ChangeLog 2022-05-08 21:39:47 +02:00
James Wilson
13f09ea5aa Remove KeyInfo and use standard library to parse hex strings (#46)
* Remove KeyInfo and use standard library to parse hex strings

* One declaration per line, more useful name of key_from_hex_chars
2022-05-08 21:07:58 +02:00
Jonas Stein
030c674fbc Indent run: 2022-04-30 21:17:37 +02:00
Jonas Stein
1e26d47230 add spaces 2022-04-30 21:12:40 +02:00
Jonas Stein
fe4cf3c00d Remove duplicate line 2022-04-30 20:41:57 +02:00
Paweł Marciniak
c5f8c9e73e Add distclean rule to satisfy distcheck (#53)
* Update c-cpp.yml

* Add distclean rule to satisfy distcheck

* Revert "Update c-cpp.yml"

This reverts commit 6a9628d533.

Co-authored-by: Paweł Marciniak <sunwire+git@gmail.com>
2022-04-30 20:29:16 +02:00
Jonas Stein
41b8baec2a Try to fix CI
Bug: https://github.com/scsitape/stenc/issues/52
2022-04-30 19:41:14 +02:00
Jonas Stein
fb588dda64 Fix version number
Closes: https://github.com/scsitape/stenc/issues/50
2022-04-30 16:38:09 +02:00
Paweł Marciniak
1ece43b1cb Add pandoc to makefile (#51)
* Add check for pandoc
* Generate the man page from reStructuredText
* Install man page after generation by pandoc

Closes: https://github.com/scsitape/stenc/issues/44
Co-authored-by: Paweł Marciniak <sunwire+git@gmail.com>
2022-04-30 16:34:51 +02:00
Jonas Stein
20edbdcb3d Update man
Remove Authors from man. We use now the AUTHORS file as single source.
Bugs go to github.
Compiled now with pandoc.
Closes: https://github.com/scsitape/stenc/issues/45
2022-04-27 15:11:02 +02:00
Jonas Stein
6c7492046b .rst file as source for man page
Added a human readable .rst file to generate man pages with pandoc
Usage:
pandoc --from rst --to man --file stenc.rst -o stenc.1
2022-04-25 21:13:07 +02:00
Jonas Stein
88b0bccea1 Add usage example 2022-04-25 01:32:10 +02:00
Jonas Stein
708932b383 Version bump 1.1.1
Version 1.1.1
1.1.1
2022-04-25 01:14:02 +02:00
Jonas Stein
226c5bcef0 remove duplicate test
Closes: https://github.com/scsitape/stenc/issues/41
2022-04-24 22:00:05 +02:00
Jonas Stein
4a7b143d50 Add tests to README 2022-04-24 21:19:57 +02:00
James Wilson
ff413aac3e Add unit tests and add const 2022-04-24 20:09:08 +02:00
Paweł Marciniak
f1a36eba42 Reintroduce HEX macro as fix
Co-authored-by: Paweł Marciniak <sunwire+git@gmail.com>
2022-04-24 16:35:52 +02:00
Paweł Marciniak
844306dbe4 cast to proper type (#38)
Co-authored-by: Paweł Marciniak <sunwire+git@gmail.com>
2022-04-24 12:52:30 +02:00
Jonas Stein
8ff2e4c4eb Codecleanup, Version bump 1.1.0 1.1.0 2022-04-22 00:47:33 +02:00
Jonas Stein
0ad0a208d5 Drop AC_CHECK_INCLUDES_DEFAULT
AC_CHECK_INCLUDES_DEFAULT requires autoconf at least version 2.70
Bug: https://github.com/scsitape/stenc/issues/33
2022-04-21 22:44:41 +02:00
Jonas Stein
59d5c6c0fa ignore temporary files 2022-04-21 22:24:51 +02:00
Jonas Stein
35b852cfeb add .clang-cormat
Add .clang-cormat config file to src folder for unified formatting.
1.0.9
2022-04-20 01:00:40 +02:00
Jonas Stein
88a507932e reformat and cleanup more
reformat the source in an unified way.
(improve later with clang-format config)
fix order of includes
use proper delete[] operator
2022-04-20 00:24:59 +02:00
Jonas Stein
aa2244308d cleaned code
removed std namespace
initialized variables
cleaned endl
added const for constants
tagged new version 1.0.8
2022-04-20 00:12:52 +02:00
Paweł Marciniak
e1e3676660 Use /dev/random to create a key (#22)
Co-authored-by: Paweł Marciniak <sunwire+git@gmail.com>
2022-04-19 22:16:37 +02:00
Jonas Stein
d4ffed77ab Create c-cpp.yml 2022-04-07 20:16:55 +02:00
Jonas Stein
82aca41962 do not make distbuilds anymore 2022-04-07 20:13:00 +02:00
Jonas Stein
b6b7cd90c0 Add LGTM Codeanalysis 2022-04-05 21:31:16 +02:00
John Coleman
e92ccb49ff Merge pull request #17 from fpiecka/patch-1
Remove duplicate zeroing
2020-11-13 20:11:27 -07:00