-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.0.0
-
Fix Version/s: None
-
Component/s: Unknown
-
Labels:None
If a HSM has a private key but not a public key, and the key was imported with ods-ksmutil key import, ods-ksmutil key list -verbose propagates error to ldns where it aborts with a meaningless assert:
# ods-ksmutil key list --verbose SQLite database set to: /var/opendnssec/kasp.db Keys: Zone: Keytype: State: Date of next transition: CKA_ID: Repository: Keytag: .... ods-ksmutil: rdata.c:26: ldns_rdf_size: Assertion `rd != ((void *)0)' failed. cz ZSK publish 2010-03-13 04:00:00 Aborted
One culprit is in hsm_get_dnskey() in libhsm, as it does not check return code from hsm_get_key_rdata().
2301 ldns_rr_push_rdf(dnskey, hsm_get_key_rdata(ctx, session, key));