*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
#include <string.h>
#include <stdlib.h>
*/
/* start out by storing key in pads */
- memset(k_ipad, 0, sizeof k_ipad);
- memset(k_opad, 0, sizeof k_opad);
+ memset(k_ipad, 0, sizeof(k_ipad));
+ memset(k_opad, 0, sizeof(k_opad));
memcpy(k_ipad, key, key_len);
memcpy(k_opad, key, key_len);
/*
* Do we have all the packet data to be checked?
*/
- if (!ND_TTEST2(pptr, plen)) {
+ if (!ND_TTEST_LEN(pptr, plen)) {
/* No. */
return (CANT_CHECK_SIGNATURE);
}
/*
* Do we have the entire signature to check?
*/
- if (!ND_TTEST2(sig_ptr, sizeof(sig))) {
+ if (!ND_TTEST_LEN(sig_ptr, sizeof(sig))) {
/* No. */
return (CANT_CHECK_SIGNATURE);
}
} else {
/* No - print the computed signature. */
for (i = 0; i < sizeof(sig); ++i) {
- ND_PRINT((ndo, "%02x", sig[i]));
+ ND_PRINT("%02x", sig[i]);
}
return (SIGNATURE_INVALID);
return (CANT_CHECK_SIGNATURE);
}
#endif
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 4
- * End:
- */