Hi,
I need to use a bit different definition of one of existing extension
methods. I have done it by putting the changed method in "ext_list" by
function "X509V3_EXT_add". Unfortunately I have found that function
"X509V3_EXT_get_nid" seeks through "standard_exts" first and only then
through "ext_list", so the standard method is found first, and the
changed one is never used, so changes described in attachment are necessary.
Is changing the order possible or even planned?
Best regards,
Libor Krystek
--- v3_lib-old.c 2009-05-22 16:03:27.557510309 +0200
+++ v3_lib.c 2009-05-22 16:00:24.108728645 +0200
@@ -101,12 +101,14 @@
int idx;
if(nid < 0) return NULL;
tmp.ext_nid = nid;
+ if(ext_list)
+ {
+ idx = sk_X509V3_EXT_METHOD_find(ext_list, &tmp);
+ if(idx != -1) return sk_X509V3_EXT_METHOD_value(ext_list, idx);
+ }
ret = OBJ_bsearch_ext(&t, standard_exts, STANDARD_EXTENSION_COUNT);
if(ret) return *ret;
- if(!ext_list) return NULL;
- idx = sk_X509V3_EXT_METHOD_find(ext_list, &tmp);
- if(idx == -1) return NULL;
- return sk_X509V3_EXT_METHOD_value(ext_list, idx);
+ return NULL;
}
const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext)