If the client sent more then 10 EDI, don't bother looking more then 10

of performance reasons.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25002 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-03-29 19:49:09 +00:00
parent eb81f54da8
commit 27e41bf7d6

View File

@@ -612,7 +612,7 @@ _kdc_pk_rd_padata(krb5_context context,
/* XXX look at r.kdcPkId */
if (r.trustedCertifiers) {
ExternalPrincipalIdentifiers *edi = r.trustedCertifiers;
unsigned int i;
unsigned int i, maxedi;
ret = hx509_certs_init(kdc_identity->hx509ctx,
"MEMORY:client-anchors",
@@ -625,7 +625,14 @@ _kdc_pk_rd_padata(krb5_context context,
goto out;
}
for (i = 0; i < edi->len; i++) {
/*
* If the client sent more then 10 EDI, don't bother
* looking more then 10 of performance reasons.
*/
maxedi = edi->len;
if (maxedi > 10)
maxedi = 10;
for (i = 0; i < maxedi; i++) {
IssuerAndSerialNumber iasn;
hx509_query *q;
hx509_cert cert;