vendor/bundle/ruby/2.7.0/gems/dnsruby-1.61.5/lib/dnsruby/single_verifier.rb
#  Check that the RRSet and RRSIG record are compatible
Check that the RRSet and RRSIG record are compatible
Check that the RRSet and RRSIG record are compatible
def check_rr_data(rrset, sigrec)
      if (rrset.name.canonical != sigrec.name.canonical)
        raise VerifyError.new("RRSET should have same owner name as RRSIG for verification (rrsert=#{rrset.name}, sigrec=#{sigrec.name}")
      end
      if (rrset.klass != sigrec.klass)
        raise VerifyError.new("RRSET should have same DNS class as RRSIG for verification")
      end
      if (rrset.type != sigrec.type_covered)
        raise VerifyError.new("RRSET should have same type as RRSIG for verification")
      end
      now = Time.now.to_i
      if ((sigrec.expiration < now) || (sigrec.inception > now))
        raise VerifyError.new("Signature record not in validity period")
      end
    end
def check_rr_data ( rrset , sigrec ) if ( rrset . name . canonical != sigrec . name . canonical ) raise VerifyError . new ( "RRSET should have same owner name as RRSIG for verification (rrsert=#{rrset.name}, sigrec=#{sigrec.name}" ) end if ( rrset . klass != sigrec . klass ) raise VerifyError . new ( "RRSET should have same DNS class as RRSIG for verification" ) end if ( rrset . type != sigrec . type_covered ) raise VerifyError . new ( "RRSET should have same type as RRSIG for verification" ) end now = Time . now . to_i if ( ( sigrec . expiration < now ) || ( sigrec . inception > now ) ) raise VerifyError . new ( "Signature record not in validity period" ) end end
Check that the RRSet and RRSIG record are compatible
Check that the RRSet and RRSIG record are compatible
#:nodoc: all # Each RR MUST have the same owner name as the RRSIG RR; # Each RR MUST have the same class as the RRSIG RR; # Each RR in the RRset MUST have the RR type listed in the # RRSIG RR's Type Covered field; #       #Each RR in the RRset MUST have the TTL listed in the #       #RRSIG Original TTL Field; #       if (rrset.ttl  != sigrec.original_ttl) #         raise VerifyError.new("RRSET should have same ttl as RRSIG original_ttl for verification (should be #{sigrec.original_ttl} but was #{rrset.ttl}") #       end #  Now check that we are in the validity period for the RRSIG
rrset
<not_specific>
sigrec
<not_specific>