]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Slightly more consice way of expressing the same ldns2 upstream/ldns2
authorWillem Toorop <willem@nlnetlabs.nl>
Mon, 29 Mar 2021 10:28:09 +0000 (12:28 +0200)
committerWillem Toorop <willem@nlnetlabs.nl>
Mon, 29 Mar 2021 10:28:09 +0000 (12:28 +0200)
examples/ldns-verify-zone.c

index 75e4ab37e76b24325399d0b12bf8ee12359e9af6..0187202e3a4e21ffc287007701b22fb47daec274 100644 (file)
@@ -175,13 +175,12 @@ verify_rrs(ldns_rr_list* rrset_rrs, ldns_dnssec_rrs* cur_sig,
 
        /* A single valid signature validates the RRset */
        while (cur_sig) {
-               status = ldns_verify_rrsig_keylist_time(rrset_rrs, cur_sig->rr,
-                               keys, check_time, NULL);
-               status = status ? status 
-                               : rrsig_check_time_margins(cur_sig->rr);
-               if (status == LDNS_STATUS_OK) 
+               if (ldns_verify_rrsig_keylist_time( rrset_rrs, cur_sig->rr
+                                                 , keys, check_time, NULL)
+               ||  rrsig_check_time_margins(cur_sig->rr))
+                       cur_sig = cur_sig->next;
+               else
                        return LDNS_STATUS_OK;
-               cur_sig = cur_sig->next;
        }
        /* Without any valid signature, do print all errors.  */
        for (cur_sig = cur_sig_bak; cur_sig; cur_sig = cur_sig->next) {