Same dir with different type in X509_LOOKUP_hash_dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

during setup of my X509_STORE I use X509_LOOKUP_hash_dir with same dir
but different type X509_FILETYPE_PEM and X509_FILETYPE_ASN1. But only
certificates of the first type are looked up.
I dig into the code and made a little change to fix my problem, see
attached patched. Is this behavior by design and I am doing anything
wrong or is this a bug?

Regards
Jan Burgmeier

--- a/crypto/x509/by_dir.c
+++ b/crypto/x509/by_dir.c
@@ -217,7 +217,8 @@
                 continue;
             for (j = 0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++) {
                 ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j);
-                if (strlen(ent->dir) == (size_t)len &&
+                if (type == ent->dir_type &&
+                    strlen(ent->dir) == (size_t)len &&
                     strncmp(ent->dir, ss, (unsigned int)len) == 0)
                     break;
             }

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux