Hi Stephen,
thank you for your answer. As I can see, you solved the problem by putting the
lock around
CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
tmp=X509_OBJECT_retrieve_by_subject(ctx->objs,type,name);
CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
in the method X509_STORE_get_by_subject (file x509_lu.c, Version 1.34).
But the problem may still be here, if somebody calls directly
X509_OBJECT_retrieve_by_subject(). Then nothing will be locked and we may
have the same problem again.
So I think, the solution to sort the list, after having added the object (in
X509_STORE_add_cert()), solves the problem in any case:
file openssl/crypto/x509/x509_lu.c:
function X509_STORE_add_cert(X509_STORE *ctx, X509 *x):
int X509_STORE_add_cert(X509_STORE *ctx, X509 *x)
{
...
if (X509_OBJECT_retrieve_match(ctx->objs, obj))
{
...
}
else {
sk_X509_OBJECT_push(ctx->objs, obj);
==> sk_X509_OBJECT_sort(ctx->objs); /* the call
X509_OBJECT_retrieve_match() will sort anyway, so
it's exactly one sort call more than before this
change, because a next call to X509_OBJECT_retrieve_match
will not sort any more, because the list is already
sorted */
}
Best Regards
Paolo
On 3/28/2010 15:39, Stephen Henson via RT wrote:
> According to our records, your request has been resolved. If you have any
> further questions or concerns, please respond to this message.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]