Commit graph

77 commits

Author SHA1 Message Date
Greg T. Wallace
6363282a75 v0.5.3 2024-06-24 18:24:35 -04:00
Greg T. Wallace
7c1ad8ef43 pkcs15: add some prep for maybe ec key support later 2024-06-24 18:23:05 -04:00
Greg T. Wallace
06f9892501 add rsa 3,072 bit support 2024-06-24 18:23:02 -04:00
Greg T. Wallace
b7026ff906 v0.5.2 2024-06-19 19:57:56 -04:00
Greg T. Wallace
703c26bd27 apcssh: add shell cmd timeout
It was possible for scanner.Scan() to block indefinitely if the UPS never returned the expected prompt regex pattern. This could occur with a UPS using a prompt format I'm not aware of, or if the UPS responds in a non-standard way.

This change ensures that Scan() is aborted after a fixed amount of blocking time and the shell cmd function accordingly returns an error.

Some error messages, comments, and var names are also updated for clarity.
2024-06-19 19:56:17 -04:00
Greg T. Wallace
841a459dca apcssh: minor log and logic clarity 2024-06-19 19:56:16 -04:00
Greg T. Wallace
f1dd079632 v0.5.1 2024-06-18 21:38:00 -04:00
Greg T. Wallace
04307eff17 readme: update general info about tool and compatibility 2024-06-18 21:30:43 -04:00
Greg T. Wallace
d3ad01da0c build: fix typo for windows install only file 2024-06-18 21:30:42 -04:00
Greg T. Wallace
b94e17e8f3 readme: update info regarding insecure ssh ciphers 2024-06-18 21:30:41 -04:00
Greg T. Wallace
208827f636 ssh: fix shell regex
* from ssh videos I found on youtube, the @ symbol might not be present in prompt, so make it optional
* fix typo of 0-0 instead of 0-9 (all numbers are possible in the prompt)
2024-06-18 21:30:40 -04:00
Greg T. Wallace
7bf70c4d71 ssh: switch string comps to EqualFold func 2024-06-18 21:30:39 -04:00
Greg T. Wallace
c669621bd3 install: add ssh connect log message 2024-06-18 21:30:38 -04:00
Greg T. Wallace
a47dd3fb68 go: update to 1.22.4 2024-06-06 22:52:54 -04:00
Greg T. Wallace
67503e6636 v0.5.0-preview2 2024-06-06 22:52:54 -04:00
Greg T. Wallace
579419ae31 cmd: remove cmd done log msgs
remove these unncessary log messages because it says done before any returned error (which could imply it didn't error)
2024-06-06 22:52:54 -04:00
Greg T. Wallace
12c613f3b4 apcssh: remove logging
For sanity and consistency, centralize logging in the app with the app's loggers.
2024-06-06 22:52:54 -04:00
Greg T. Wallace
ce9958e422 create: always produce both p15 files 2024-06-06 22:52:54 -04:00
Greg T. Wallace
dda11df624 install: add support for native ssl command
The code should auto-select the native ssl method if the ssl command is available on the UPS.

If this fails, install will drop back to the original install method used by this tool (which works on NMC2).
2024-06-06 22:52:54 -04:00
Greg T. Wallace
06c9263bc4 ssh: breakout ups ssh to its own package
This was done for clearer separation of function. A subsequent update will (hopefully) make the SSL command more robust so it works for both NMC2 and NMC3.

The method for sending shell commands was also updated to use an interactive shell instead. This allows capturing responses of the commands which will be needed to deduce if devices are NMC2 or NMC3.
2024-06-06 22:52:54 -04:00
Greg T. Wallace
41efc56c62 ssh: clarify log error msg 2024-06-06 22:52:54 -04:00
Greg T. Wallace
7a415f5c85 v0.5.0-preview1 2024-06-06 22:52:46 -04:00
Greg T. Wallace
7dcf0f10b9 create: fix header debug file 2024-06-04 19:00:56 -04:00
Greg T. Wallace
b44b49cd19 create: add additional flag to signal creation of additional key.p15 2024-06-04 18:59:36 -04:00
Greg T. Wallace
f0253ccaf2 create: set file permissiosns to owner only 2024-06-04 18:59:36 -04:00
Greg T. Wallace
da84a7b085 debug: add base64 encoded debug files
When troubleshooting it is helpful to put the generated files into an asn1 decoder. The files can be copy/pasted easily in b64 format.

This change creates b64 files when the debug flag is set to make this process easier.
2024-06-04 18:59:36 -04:00
Greg T. Wallace
01be6ca577 add p15 key output file
The NMC Security Wizard can also produce .p15 files that contain just a private key. Add this ability to this tool.

When the `create` function is used, both files will be outputted.
2024-06-04 18:59:36 -04:00
Greg T. Wallace
ecf10f1fdc go: update to 1.22.3 2024-06-04 18:59:35 -04:00
Greg T. Wallace
d09c7fa8fc update README for Cert Warden 2024-04-15 19:36:35 -04:00
Greg T. Wallace
ad3ee0d7f5 v0.4.2 2024-03-29 17:17:47 -04:00
Greg T. Wallace
6fe53b9fc6
Merge pull request #2 from k725/k725-patch-1
fix usage message
2024-03-29 17:13:16 -04:00
k725
0476db7c35
fix usage message 2024-03-29 23:47:37 +09:00
Greg T. Wallace
15c6c6488e minor envelope reorg 2024-03-17 13:45:55 -04:00
Greg T. Wallace
02bc7c1239 changelog formatting 2024-03-06 17:27:16 -05:00
Greg T. Wallace
49e30898c1 v0.4.1 2024-03-06 17:19:27 -05:00
Greg T. Wallace
55680245c9 update go to 1.22.1 2024-03-06 17:18:04 -05:00
Greg T. Wallace
14517ca0a1 update go to 1.22.0 2024-02-12 22:24:43 -05:00
Greg T. Wallace
dd246b9f14 v0.4.0 2024-02-05 18:29:06 -05:00
Greg T. Wallace
2b46f33af8 add optional webui restart 2024-02-05 18:25:55 -05:00
Greg T. Wallace
29cd44077b v0.3.3 2024-02-04 17:11:15 -05:00
Greg T. Wallace
598c4ba9f7 install: add insecure cipher options for older devices/firmwares
Requires explicit choice via flag

fixes: https://github.com/gregtwallace/apc-p15-tool/issues/1
2024-02-04 17:09:23 -05:00
Greg T. Wallace
357503382b remove empty file 2024-02-04 14:26:08 -05:00
Greg T. Wallace
7249c73214 v0.3.2 2024-02-04 11:05:04 -05:00
Greg T. Wallace
b633a357c7 add rsa 1024 support (not recommended though) 2024-02-04 10:59:58 -05:00
Greg T. Wallace
b878deaf2d add kex diffie-hellman-group-exchange-sha256 2024-02-04 10:18:21 -05:00
Greg T. Wallace
8a4defcb46 add compatibility notice in readme 2024-02-04 09:36:15 -05:00
Greg T. Wallace
53a3bc5bd7 v0.3.1 2024-02-03 14:09:34 -05:00
Greg T. Wallace
90c2baf343 local build: ensure cgo is disabled 2024-02-03 14:07:26 -05:00
Greg T. Wallace
15d8996b48 fix: only debug logging when specified 2024-02-03 14:05:21 -05:00
Greg T. Wallace
8d0757b553 readme: add thanks 2024-02-03 13:12:59 -05:00