(as_rep): add an empty X500-compress string as transited.

(fix_transited_encoding): check length.
From Miroslav Ruda <ruda@ics.muni.cz>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6722 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-08-04 17:14:27 +00:00
parent bff061de49
commit d50e05405a

View File

@@ -727,6 +727,14 @@ as_rep(KDC_REQ *req,
copy_HostAddresses(b->addresses, et.caddr); copy_HostAddresses(b->addresses, et.caddr);
} }
{
krb5_data empty_string;
krb5_data_zero(&empty_string);
et.transited.tr_type = DOMAIN_X500_COMPRESS;
et.transited.contents = empty_string;
}
copy_EncryptionKey(&et.key, &ek.key); copy_EncryptionKey(&et.key, &ek.key);
/* The MIT ASN.1 library (obviously) doesn't tell lengths encoded /* The MIT ASN.1 library (obviously) doesn't tell lengths encoded
@@ -944,7 +952,7 @@ fix_transited_encoding(TransitedEncoding *tr,
char **realms = NULL, **tmp; char **realms = NULL, **tmp;
int num_realms = 0; int num_realms = 0;
int i; int i;
if(tr->tr_type){ if(tr->tr_type && tr->contents.length != 0) {
if(tr->tr_type != DOMAIN_X500_COMPRESS){ if(tr->tr_type != DOMAIN_X500_COMPRESS){
kdc_log(0, "Unknown transited type: %u", kdc_log(0, "Unknown transited type: %u",
tr->tr_type); tr->tr_type);