You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EnhanceKeyStoreLoader throws an exception when trying to generate an agreement key when there is no signing key present:
2025-02-12 08:31:48.636 TRACE 317 EnhancedKeyStoreLoader - Completed key store enumeration
2025-02-12 08:31:48.636 INFO 336 EnhancedKeyStoreLoader - Generating agreement key pair for local node 0 [ alias = node1 ]
java.lang.NullPointerException: Cannot invoke "java.security.cert.X509Certificate.getPublicKey()" because "signingCert" is null
at com.swirlds.platform.crypto.EnhancedKeyStoreLoader.generate(EnhancedKeyStoreLoader.java:348) ~[swirlds-platform-core-0.59.0.jar:0.59.0]
at com.swirlds.platform.crypto.CryptoStatic.initNodeSecurity(CryptoStatic.java:566) ~[swirlds-platform-core-0.59.0.jar:0.59.0]
at com.hedera.node.app.ServicesMain.main(ServicesMain.java:331) ~[HederaNode.jar:0.59.0]
Acceptance Criteria
As a precondition of generating the agreement keys in generate() , the system should check that all local nodes have signing keys and public certificates loaded. If not, then log an informative error message and exit the application.
The above might be better implemented as a post condition of scan().
Dependencies
None
Definition of Ready (DoR) Checklist
Clear acceptance criteria
Clear and detailed description
Dependencies identified
Links to documentation
Should be completable in 2-3 Days
Initial draft of Low-level design document
At least high level test plan
Groomed/Estimated
Definition of Done (DoD) Checklist
Acceptance Criteria complete
No Codacy issues greater than minor (in new code)
JavaDocs updated/created
Code commented
Unit tests created/updated
80% test code coverage (in new code)
Happy Path and major negative cases in HAPI tests as applicable
The text was updated successfully, but these errors were encountered:
I propose to protect the scan method against null keys so that the verify method can fail as it is programmed to do. Also, add a Warn logging exception in the verify before throwing the exception.
Once verify throws the exception, the program stops as requested.
Background
The
EnhanceKeyStoreLoader
throws an exception when trying to generate an agreement key when there is no signing key present:Acceptance Criteria
As a precondition of generating the agreement keys in
generate()
, the system should check that all local nodes have signing keys and public certificates loaded. If not, then log an informative error message and exit the application.The above might be better implemented as a post condition of
scan()
.Dependencies
None
Definition of Ready (DoR) Checklist
Definition of Done (DoD) Checklist
The text was updated successfully, but these errors were encountered: