krb5_pk_authenticator_draft9 had a kdcRealm field which was set by the
client code but never encoded or decoded. Remove it. Eliminating this
field exposed a bug in auth_pack_draft9_optional; fix that.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25624
dc483132-0cff-0310-8789-
dd5450dbe970
/* PKAuthenticator draft9 */
typedef struct _krb5_pk_authenticator_draft9 {
krb5_principal kdcName;
- krb5_data kdcRealm;
krb5_int32 cusec; /* (0..999999) */
krb5_timestamp ctime;
krb5_int32 nonce; /* (0..4294967295) */
{
setup();
val->kdcName = NULL;
- val->kdcRealm.data = NULL;
{ begin_structure();
alloc_principal(val->kdcName);
get_field(val->kdcName, 0, asn1_decode_principal_name);
auth_pack_draft9_optional(const void *p)
{
unsigned int optional = 0;
- const krb5_auth_pack *val = p;
+ const krb5_auth_pack_draft9 *val = p;
if (val->clientPublicValue != NULL)
optional |= (1u << 1);
return optional;
auth_pack9->pkAuthenticator.cusec = cusec;
auth_pack9->pkAuthenticator.nonce = nonce;
auth_pack9->pkAuthenticator.kdcName = server;
- auth_pack9->pkAuthenticator.kdcRealm.magic = 0;
- auth_pack9->pkAuthenticator.kdcRealm.data = server->realm.data;
- auth_pack9->pkAuthenticator.kdcRealm.length = server->realm.length;
free(cksum->contents);
break;
case KRB5_PADATA_PK_AS_REQ:
ktest_make_sample_pk_authenticator_draft9(krb5_pk_authenticator_draft9 *p)
{
ktest_make_sample_principal(&p->kdcName);
- ktest_make_sample_data(&p->kdcRealm);
p->cusec = SAMPLE_USEC;
p->ctime = SAMPLE_TIME;
p->nonce = SAMPLE_NONCE;
ktest_empty_pk_authenticator_draft9(krb5_pk_authenticator_draft9 *p)
{
ktest_destroy_principal(&p->kdcName);
- ktest_empty_data(&p->kdcRealm);
}
static void