+Mon Oct 14 01:55:41 1996 Sam Hartman <hartmans@mit.edu>
+
+ * utility.c (printsub): Patch from jhawk@bbnplannet.com to deal
+ with bug printing out authentication name. [71]
Sat Sep 21 03:38:31 1996 Sam Hartman <hartmans@mit.edu>
+(printsub): Fix encrypt promise bit option parsing [74]
* utility.c (ttloop): Continue on eintr.
nfrontp += strlen(nfrontp);
break;
}
- sprintf(nfrontp, "%s|%s",
+ sprintf(nfrontp, "%s|%s%s",
((pointer[3] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ?
"CLIENT" : "SERVER",
((pointer[3] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ?
- "MUTUAL" : "ONE-WAY");
+ "MUTUAL" : "ONE-WAY",
+ ((pointer[3] & AUTH_ENCRYPT_MASK) == AUTH_ENCRYPT_ON) ?
+ "|ENCRYPT" : "");
nfrontp += strlen(nfrontp);
auth_printsub(&pointer[1], length - 1, buf, sizeof(buf));
nfrontp += strlen(nfrontp);
break;
}
- sprintf(nfrontp, "%s|%s ",
+ sprintf(nfrontp, "%s|%s%s ",
((pointer[i] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ?
"CLIENT" : "SERVER",
((pointer[i] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ?
- "MUTUAL" : "ONE-WAY");
+ "MUTUAL" : "ONE-WAY",
+ ((pointer[3] & AUTH_ENCRYPT_MASK) == AUTH_ENCRYPT_ON) ?
+ "|ENCRYPT" : "");
nfrontp += strlen(nfrontp);
++i;
}
i = 2;
sprintf(nfrontp, " NAME \"");
nfrontp += strlen(nfrontp);
- while (i < length)
- *nfrontp += pointer[i++];
- *nfrontp += '"';
+ while (i < length) {
+ if (isprint(pointer[i]))
+ *nfrontp++ = pointer[i++];
+ else {
+ sprintf(nfrontp, "\"%03o",pointer[i++]);
+ nfrontp += strlen(nfrontp);
+ }
+ }
+ *nfrontp++ = '"';
break;
default: