Don't you think, in the X509_STORE_get_by_subject function, that the following
line
vs->current_method=j;
would be replaced by :
vs->current_method=i;
in the case where j<0 , i.e. j==X509_LU_RETRY ? i is a LOOKUP method, not j.
------------------------------------------------------------------------------
int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
X509_OBJECT *ret)
{
X509_STORE *ctx=vs->ctx;
X509_LOOKUP *lu;
X509_OBJECT stmp,*tmp;
int i,j;
tmp=X509_OBJECT_retrieve_by_subject(ctx->objs,type,name);
if (tmp == NULL)
{
for (i=vs->current_method;
i<sk_X509_LOOKUP_num(ctx->get_cert_methods); i++)
{
lu=sk_X509_LOOKUP_value(ctx->get_cert_methods,i);
j=X509_LOOKUP_by_subject(lu,type,name,&stmp);
if (j < 0)
{
// vs->current_method=j;
vs->current_method=i;
return j;
}
else if (j)
{
tmp= &stmp;
break;
}
}
vs->current_method=0;
if (tmp == NULL)
return 0;
}
/* if (ret->data.ptr != NULL)
X509_OBJECT_free_contents(ret); */
ret->type=tmp->type;
ret->data.ptr=tmp->data.ptr;
X509_OBJECT_up_ref_count(ret);
return 1;
}
--
------- Francoise LACAMBRE ------------ BULL I&S ------
Tel : 01 30 80 77 51 (237 7751) Rue Jean Jaures
Fax : 01 30 80 65 40 (237 6540) 78340 Les Clayes-sous-Bois
mailto:[EMAIL PROTECTED] Poste Courrier : FRCL P2/130
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]