is not present, fill in the authorization data fields with all zeros.
Don't set kvno (that's *key* version number, not *Kerberos* version
number) to 5.
err2kerr.c (KRB5_KRB__ERROR2krb5_error): The e_data field wasn't being
decoded when it should have been.
qbuf2data.c (qbuf2krb5_data): Set magic number field to zero.
tgrq2ktgrq.c (KRB5_KDC__REQ__BODY2krb5_kdc_req): Allow the service
principal to be optional.
ktgrq2tgrq.c (krb5_kdc_req2KRB5_KDC__REQ__BODY): ditto
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4536
dc483132-0cff-0310-8789-
dd5450dbe970
+Wed Oct 19 10:51:16 1994 Theodore Y. Ts'o (tytso@maytag)
+
+ * err2kerr.c (KRB5_KRB__ERROR2krb5_error): The e_data field
+ wasn't being decoded when it should have been.
+
+ * qbuf2data.c (qbuf2krb5_data): Set magic number field to zero.
+
+ * asn1_decode_k.c (asn1_decode_kdc_req_body): If the authorization
+ field is not present, fill in the authorization data
+ fields with all zeros. Don't set kvno (that's *key*
+ version number, not *Kerberos* version number) to 5.
+
+Tue Oct 18 23:07:20 1994 Theodore Y. Ts'o (tytso@maytag)
+
+ * tgrq2ktgrq.c (KRB5_KDC__REQ__BODY2krb5_kdc_req): Allow the
+ service principal to be optional.
+
+ * ktgrq2tgrq.c (krb5_kdc_req2KRB5_KDC__REQ__BODY): Allow the
+ server principal to be optional.
+
Fri Oct 7 15:05:35 1994 Theodore Y. Ts'o (tytso@dcl)
* Makefile.isode.in: Add -DKRB5_USE_ISODE so that include files
kdc-options[0] KDCOptions,
cname[1] PrincipalName OPTIONAL, -- Used only in AS-REQ
realm[2] Realm, -- Server's realm Also client's in AS-REQ
- sname[3] PrincipalName,
+ sname[3] PrincipalName OPTIONAL,
from[4] KerberosTime OPTIONAL,
till[5] KerberosTime,
rtime[6] KerberosTime OPTIONAL,
if(tagnum == 10){
get_field(val->authorization_data,10,asn1_decode_encrypted_data); }
else{
+ val->authorization_data.magic = 0;
val->authorization_data.etype = 0;
- val->authorization_data.kvno = KVNO;
+ val->authorization_data.kvno = 0;
val->authorization_data.ciphertext.data = NULL;
val->authorization_data.ciphertext.length = 0;
}
}
}
if (val->e__data) {
- temp = qbuf2krb5_data(val->e__text, error);
+ temp = qbuf2krb5_data(val->e__data, error);
if (temp) {
- retval->text = *temp;
+ retval->e_data = *temp;
krb5_xfree(temp);
} else {
goto errout;
if (!retval->cname) {
goto errout;
}
- }
- retval->realm = krb5_data2qbuf(krb5_princ_realm(val->server));
- if (!retval->realm) {
- *error = ENOMEM;
- goto errout;
}
- retval->sname = krb5_principal2KRB5_PrincipalName(val->server, error);
- if (!retval->sname) {
+ if (val->server) {
+ retval->realm = krb5_data2qbuf(krb5_princ_realm(val->server));
+ if (!retval->realm) {
+ *error = ENOMEM;
+ goto errout;
+ }
+ retval->sname = krb5_principal2KRB5_PrincipalName(val->server, error);
+ if (!retval->sname) {
+ goto errout;
+ }
+ } else if (val->client) {
+ retval->realm = krb5_data2qbuf(krb5_princ_realm(val->client));
+ if (!retval->realm) {
+ *error = ENOMEM;
+ goto errout;
+ }
+ } else if (val->second_ticket && val->second_ticket[0] &&
+ val->second_ticket[0]->server) {
+ retval->realm = krb5_data2qbuf(krb5_princ_realm(val->second_ticket[0]->server));
+ if (!retval->realm) {
+ *error = ENOMEM;
+ goto errout;
+ }
+ } else {
+ *error = EINVAL;
goto errout;
}
+
if (val->from) {
retval->from = unix2gentime(val->from, error);
if (!retval->from) {
retval->data = 0;
return retval;
}
+ retval->magic = 0;
retval->data = (char *)xmalloc(val->qb_forw->qb_len);
if (!retval->data) {
krb5_xfree(retval);
krb5_free_kdc_req(retval);
return(0);
}
- if (val->cname)
+ if (val->cname) {
retval->client =
KRB5_PrincipalName2krb5_principal(val->cname,
val->realm,
error);
- retval->server = KRB5_PrincipalName2krb5_principal(val->sname,
- val->realm,
- error);
- if (!retval->server) {
- goto errout;
+ if (*error) {
+ goto errout;
+ }
+ }
+
+ if (val->sname) {
+ retval->server = KRB5_PrincipalName2krb5_principal(val->sname,
+ val->realm,
+ error);
+ if (*error) {
+ goto errout;
+ }
}
+
if (val->from) {
retval->from = gentime2unix(val->from, error);
if (*error) {