);
if (qdebug != -1) {
- mesg(";; Signed by: ");
+ printf(";; Signed by: ");
ldns_rdf_print(stdout, ldns_rr_rdf(cur_sig, 7));
- mesg("\n");
+ printf("\n");
}
if (!keys) {
return LDNS_STATUS_CRYPTO_NO_DNSKEY;
} else {
for (key_i = 0; key_i < ldns_rr_list_rr_count(keys); key_i++) {
- if (ldns_verify_rrsig(rrset, cur_sig, ldns_rr_list_rr(keys, key_i))) {
+ result = ldns_verify_rrsig(rrset, cur_sig, ldns_rr_list_rr(keys, key_i));
+ if (result == LDNS_STATUS_OK) {
for (tkey_i = 0; tkey_i < ldns_rr_list_rr_count(trusted_keys); tkey_i++) {
if (ldns_rr_compare_ds(ldns_rr_list_rr(keys, key_i),
ldns_rr_list_rr(trusted_keys, tkey_i)
ldns_rr_free(cur_sig);
return result;
} else {
- mesg("Bad signature of wrong key\n");
+ return result;
}
}
ldns_rr_list_deep_free(keys);
}
/* verify */
- key_verified = ldns_pkt_verify(pkt, type, qname, key_list, NULL);
+ result = ldns_pkt_verify(pkt, type, qname, key_list, NULL, NULL);
- if (key_verified) {
+ if (result == LDNS_STATUS_OK) {
for(key_count = 0; key_count < ldns_rr_list_rr_count(key_verified);
key_count++) {
if (qdebug != -1) {