[xmlsec] Application specific URIs?

Aleksey Sanin aleksey at aleksey.com
Fri Dec 6 08:01:50 PST 2002


>
>
>Even if I use "ftp://" URIs.
>I also found a comment in io.c saying  /* todo: add an ability to use custom
>protocol handlers */
>  
>
This is an obsolete comment. The loop below this comment goes thru the 
list of
registered callbacks and calls "matchcallback" functions. The first 
handler that
returns 1 wins :) Please set a breakpoint there and try the following 
command
(paths are relative to the top level xmlsec folder):

    ./xmlsec verify 
./tests/merlin-xmldsig-twenty-three/signature-external-b64-dsa.xml

>I then found out that the callbacks are a general XML-lib feature so
>"ftp://" and "http://" URIs seem to be taken care of in libxml2. So if I use
>the libXML2 xmlRegisterInputCallbacks instead my methods gets called but
>since there is an xmlSecRegisterInputCallbacks function this does not seem
>logical to do.
>What does xmlSecRegisterInputCallbacks do that xmlRegisterInputCallbacks
>don't and what is the clue to triggering
>the callback methods?
>  
>
I am confused here. What exactly are you trying to achieve by using external
callbacks? It is possible that you have to register your callbacks for 
*both*
xmlsec and libxml. XMLSec callbacks provide support for custom URLs in
the Reference URI attribute when LibXML2 callbacks give you support for
custom URLs for external DTDs, stylesheets, etc. I thought about using 
the Libxml2
system everywhere and decided that this is wrong idea (but I do not remember
exact reasons :( ). Probably I'll take a look at this one more time in 
the next
"big refresh" I am working on right now.
The good news is that the callbacks are exactly the same so you just 
need to call
two registration functions :)


Aleksey







More information about the xmlsec mailing list