1 Aug 2005 11:32
Re: Thinkng something like this for mod_auth_svn
Dirk-Willem van Gulik <dirkx <at> webweaving.org>
2005-08-01 09:32:50 GMT
2005-08-01 09:32:50 GMT
Ok found the problem; turns out that if openssl does not have the
extension hardcoded in its objects.c (from objects.txt in crypto/objects;
compiled by a objects.pl perl scripts) then X509V3_EXT_print() does not do
anything sensible with that string unless the flag
X509V3_EXT_PARSE_UNKNOWN or X509V3_EXT_DUMP_UNKNOWN is passed. (And Martin
his code does then sensibly ignore it).
But once you pass either of these flags it then yields a string which is
not proberly terminated - hence making it possible for a bad cert to
segfault the server. Plus the format in any case not usable for any proper
access control.
So that perhaps means that this OID thing requires the re-use an existing
extension (like id-aca, role, etc) known to the locally installed version
of openssl or add to our code some ability, like a DER format string, to
handle arbitrary string extraction from the extension fields.
Dw.
PS: plus right now it seems that ssl_expr_parse.* and ssl_expr_scan.*
which are generated from the lex/yax files - are under svn control.
Index: ssl_expr_eval.c
===================================================================
--- ssl_expr_eval.c (revision 226665)
+++ ssl_expr_eval.c (working copy)
<at> <at> -229,7 +229,25 <at> <at>
/* Loop over all extensions, extract the desired oids */
for (j = 0; j < count; j++) {
(Continue reading)
RSS Feed