MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / verifyMessage

Method verifyMessage

src/main/java/core/org/xbill/DNS/SIG0.java:62–77  ·  view source on GitHub ↗

Verify a message using SIG(0). @param message The message to be signed @param b An array containing the message in unparsed form. This is necessary since SIG(0) signs the message in wire format, and we can't recreate the exact wire format (with the same name compression). @param key The KEY record

(Message message, byte [] b, KEYRecord key, SIGRecord previous)

Source from the content-addressed store, hash-verified

60 * @param previous If this message is a response, the SIG(0) from the query
61 */
62public static void
63verifyMessage(Message message, byte [] b, KEYRecord key, SIGRecord previous)
64 throws DNSSEC.DNSSECException
65{
66 SIGRecord sig = null;
67 Record [] additional = message.getSectionArray(Section.ADDITIONAL);
68 for (int i = 0; i < additional.length; i++) {
69 if (additional[i].getType() != Type.SIG)
70 continue;
71 if (((SIGRecord) additional[i]).getTypeCovered() != 0)
72 continue;
73 sig = (SIGRecord) additional[i];
74 break;
75 }
76 DNSSEC.verifyMessage(message, b, sig, previous, key);
77}
78
79}

Callers

nothing calls this directly

Calls 4

verifyMessageMethod · 0.95
getSectionArrayMethod · 0.80
getTypeCoveredMethod · 0.80
getTypeMethod · 0.65

Tested by

no test coverage detected