127df3f5dSRui Paulo /* 227df3f5dSRui Paulo * Redistribution and use in source and binary forms, with or without 327df3f5dSRui Paulo * modification, are permitted provided that: (1) source code 427df3f5dSRui Paulo * distributions retain the above copyright notice and this paragraph 527df3f5dSRui Paulo * in its entirety, and (2) distributions including binary code include 627df3f5dSRui Paulo * the above copyright notice and this paragraph in its entirety in 727df3f5dSRui Paulo * the documentation or other materials provided with the distribution. 827df3f5dSRui Paulo * THIS SOFTWARE IS PROVIDED ``AS IS'' AND 927df3f5dSRui Paulo * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT 1027df3f5dSRui Paulo * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 1127df3f5dSRui Paulo * FOR A PARTICULAR PURPOSE. 1227df3f5dSRui Paulo * 1327df3f5dSRui Paulo * Functions for signature and digest verification. 1427df3f5dSRui Paulo * 15*0bff6a5aSEd Maste * Original code by Hannes Gredler (hannes@gredler.at) 1627df3f5dSRui Paulo */ 1727df3f5dSRui Paulo 183c602fabSXin LI /* for netdissect_options */ 193c602fabSXin LI #include "netdissect.h" 2027df3f5dSRui Paulo 2127df3f5dSRui Paulo /* signature checking result codes */ 2227df3f5dSRui Paulo #define SIGNATURE_VALID 0 2327df3f5dSRui Paulo #define SIGNATURE_INVALID 1 243340d773SGleb Smirnoff #define CANT_ALLOCATE_COPY 2 253340d773SGleb Smirnoff #define CANT_CHECK_SIGNATURE 3 2627df3f5dSRui Paulo 2727df3f5dSRui Paulo extern const struct tok signature_check_values[]; 283340d773SGleb Smirnoff extern int signature_verify(netdissect_options *, const u_char *, u_int, 293340d773SGleb Smirnoff const u_char *, void (*)(void *), const void *); 30