Class GenSigningKeyCommand
java.lang.Object
org.egothor.methodatlas.evidence.GenSigningKeyCommand
CLI command handler for the
-gen-signing-key mode, which creates (or
extends) an encrypted ZeroEcho keyring containing a fresh signing key pair for
evidence-pack signing.
The mode is recognised and dispatched by MethodAtlasApp before the
normal scan-argument parsing, mirroring how -diff is handled. It is
self-contained: it parses its own small set of options and never participates
in the scan pipeline.
Usage
methodatlas -gen-signing-key <keyring-file> [-key-alias <alias>] \
[-key-algo <algorithm>] [-overwrite] \
[-key-password-file <file> | -key-password-env <VAR>]
The keyring is encrypted with a password resolved by
KeyringPasswordSource: a password file, a named environment variable,
METHODATLAS_KEYRING_PASSWORD, or an interactive prompt. A password is
never accepted as a command-line value. The keyring lives in an owner-only
directory together with its .nonce sidecar; keep both out of version
control and out of any distributed evidence pack. See SigningKeyGenerator.
- Since:
- 4.0.0
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intrun(String[] args, PrintWriter out) Parses-gen-signing-keyarguments and runs the command.
-
Field Details
-
FLAG_GEN_SIGNING_KEY
-
-
Method Details
-
run
Parses-gen-signing-keyarguments and runs the command.- Parameters:
args- full command-line arguments, including the-gen-signing-keyflag and its valueout- writer that receives the success summary- Returns:
0on success,2when the arguments are invalid- Throws:
IOException- if no password is available, the keyring cannot be written, an alias collides without-overwrite, or key generation fails
-