Returns the TSIG record from the ADDITIONAL section, if one is present. @see TSIGRecord @see TSIG @see Section
()
| 276 | * @see Section |
| 277 | */ |
| 278 | public TSIGRecord |
| 279 | getTSIG() { |
| 280 | int count = header.getCount(Section.ADDITIONAL); |
| 281 | if (count == 0) |
| 282 | return null; |
| 283 | List l = sections[Section.ADDITIONAL]; |
| 284 | Record rec = (Record) l.get(count - 1); |
| 285 | if (rec.type != Type.TSIG) |
| 286 | return null; |
| 287 | return (TSIGRecord) rec; |
| 288 | } |
| 289 | |
| 290 | /** |
| 291 | * Was this message signed by a TSIG? |
no test coverage detected