blob: ae5aa30d087549688d3d30fcfd022ef1c210eb5b [file] [log] [blame]
diff -burN android-openssl.orig/crypto/x509/by_dir.c android-openssl/crypto/x509/by_dir.c
--- android-openssl.orig/crypto/x509/by_dir.c 2013-03-25 11:30:17.775049611 +0100
+++ android-openssl/crypto/x509/by_dir.c 2013-03-25 11:31:52.936070192 +0100
@@ -287,6 +287,8 @@
int ok=0;
int i,j,k;
unsigned long h;
+ unsigned long hash_array[2];
+ int hash_index;
BUF_MEM *b=NULL;
X509_OBJECT stmp,*tmp;
const char *postfix="";
@@ -322,7 +324,11 @@
ctx=(BY_DIR *)xl->method_data;
- h=X509_NAME_hash(name);
+ hash_array[0]=X509_NAME_hash(name);
+ hash_array[1]=X509_NAME_hash_old(name);
+ for (hash_index=0; hash_index < 2; ++hash_index)
+ {
+ h=hash_array[hash_index];
for (i=0; i < sk_BY_DIR_ENTRY_num(ctx->dirs); i++)
{
BY_DIR_ENTRY *ent;
@@ -476,6 +482,7 @@
goto finish;
}
}
+ }
finish:
if (b != NULL) BUF_MEM_free(b);
return(ok);