/* \summary: Kerberos printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
* Kerberos Authentication and Authorization System
* by S. P. Miller, B. C. Neuman, J. I. Schiller, and J. H. Saltzer
*
- * http://web.mit.edu/Saltzer/www/publications/athenaplan/e.2.1.pdf
+ * https://web.mit.edu/Saltzer/www/publications/athenaplan/e.2.1.pdf
*
* 7. Appendix I Design Specifications
*
kp = (const struct krb *)cp;
- ND_TCHECK_1(kp->type);
-
type = GET_U_1(kp->type) & (0xFF << 1);
ND_PRINT(" %s %s: ",
if ((cp = krb4_print_hdr(ndo, cp)) == NULL)
return;
cp += 4; /* ctime */
- ND_TCHECK_1(cp);
ND_PRINT(" %umin ", GET_U_1(cp) * 5);
cp++;
PRINT;
case AUTH_MSG_APPL_REQUEST:
cp += 2;
- ND_TCHECK_1(cp);
ND_PRINT("v%u ", GET_U_1(cp));
cp++;
PRINT;
- ND_TCHECK_1(cp);
ND_PRINT(" (%u)", GET_U_1(cp));
cp++;
- ND_TCHECK_1(cp);
ND_PRINT(" (%u)", GET_U_1(cp));
break;
if ((cp = krb4_print_hdr(ndo, cp)) == NULL)
return;
cp += 10; /* timestamp + n + exp + kvno */
- ND_TCHECK_LEN(cp, sizeof(short));
len = KTOHSP(kp, cp);
ND_PRINT(" (%u)", len);
break;
case AUTH_MSG_ERR_REPLY:
if ((cp = krb4_print_hdr(ndo, cp)) == NULL)
return;
- cp += 4; /* timestamp */
- ND_TCHECK_LEN(cp, sizeof(short));
+ cp += 4; /* timestamp */
ND_PRINT(" %s ", tok2str(kerr2str, NULL, KTOHSP(kp, cp)));
cp += 4;
PRINT;
{
const struct krb *kp;
- ndo->ndo_protocol = "krb";
- kp = (const struct krb *)dat;
+ ndo->ndo_protocol = "kerberos";
+ nd_print_protocol(ndo);
- if (dat >= ndo->ndo_snapend) {
- nd_print_trunc(ndo);
- return;
- }
+ kp = (const struct krb *)dat;
switch (GET_U_1(kp->pvno)) {
/* Decode ASN.1 here "someday" */
break;
}
- return;
}