} else {
/* from somewhere else */
- krb5_octet keytype;
+ krb5_ui_2 keytype;
char defkeyfile[MAXPATHLEN+1];
krb5_data *realm = krb5_princ_realm(context, mname);
FILE *kf;
if (!(kf = fopen(defkeyfile, "r")))
#endif
return KRB5_KDB_CANTREAD_STORED;
- if (fread((krb5_pointer) &keytype, 1, 1, kf) != 1) {
+ if (fread((krb5_pointer) &keytype, 2, 1, kf) != 1) {
retval = KRB5_KDB_CANTREAD_STORED;
goto errout;
}
{
FILE *kf;
krb5_error_code retval = 0;
- krb5_octet keytype;
+ krb5_ui_2 keytype;
char defkeyfile[MAXPATHLEN+1];
krb5_data *realm = krb5_princ_realm(context, mname);
#if defined(unix) || defined(__unix__)
}
keytype = key->keytype;
if ((fwrite((krb5_pointer) &keytype,
- 1, 1, kf) != 1) ||
+ 2, 1, kf) != 1) ||
(fwrite((krb5_pointer) &key->length,
sizeof(key->length), 1, kf) != 1) ||
(fwrite((krb5_pointer) key->contents,