[openssl.org #1936] enhancement request - X509V3_EXT_get_nid

2014-08-08 Thread Rich Salz via RT
we're not planning to do this.
--
Rich Salz, OpenSSL dev team; rs...@openssl.org

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #1936] enhancement request - X509V3_EXT_get_nid

2009-06-02 Thread Stephen Henson via RT
 [krys...@ica.cz - Mon May 25 20:04:32 2009]:
 
 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?
 

Doing this is inadvisable because the existing code might depend on the
way standard extensions behave. For example if you ended up using a
different structure for an existing extension.


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #1936] enhancement request - X509V3_EXT_get_nid

2009-05-25 Thread Libor Krystek via RT
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.c2009-05-22 16:03:27.557510309 +0200
+++ v3_lib.c2009-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)