Class LocalStatefulSigningAuthority
java.lang.Object
zeroecho.core.storage.LocalStatefulSigningAuthority
- All Implemented Interfaces:
AutoCloseable
Default local monotonic authority for stateful signatures. Its directory must
be independently preserved outside keyring/PKI backup and restore domains.
Never roll back, clone, replace or reconstruct this authority. Losing it retires
its enrolled signing keys. All signing copies must consult the same authority.
A lifetime filesystem lock serializes all processes using this root. Closing
waits for admitted operations; callers own this resource separately from keyrings.
Records contain authenticated public commitments, never private-key material.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases exclusive authority ownership after admitted signing completes.Creates an empty authority in a new owner-only directory.Opens a previously initialized authority without creating missing state.
-
Method Details
-
create
Creates an empty authority in a new owner-only directory. Creation never replaces or repairs an existing directory and never enrolls existing keys.- Parameters:
directory- new authority directory, outside all backup roots- Returns:
- exclusively owned authority
- Throws:
IOException- if secure durable initialization failsNullPointerException- if directory is null
-
open
Opens a previously initialized authority without creating missing state.- Parameters:
directory- existing authority directory at its original location- Returns:
- exclusively owned authority
- Throws:
IOException- if missing, corrupt, moved, insecure or already ownedNullPointerException- if directory is null
-
close
Releases exclusive authority ownership after admitted signing completes.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- if releasing the filesystem fence fails
-