My choices are, use an undocumented feature with a frozen library version,
or repackage the jar file myself.  You may know from previous messages that
I'm trying very hard to ship our product with the original jar file from the
website, so modifying xmlsec.jar is something I'm averse to.

If you know of a way to programatically disable undesirable algorithms (like
RIPE which our JRE doesn't support anyway, or MD5), then I'm all ears.  But
this seemed to be the simplest way to do it.

-Jason

On Jan 30, 2008 10:03 AM, jason marshall <[EMAIL PROTECTED]> wrote:

> False alarm.  I figured it out.  "/config/myconfig.xml" is the pattern I
> needed.
>
> I was having vague flashbacks of getResource from the bad old days.  It
> seems that JDK1.5 at least has no trouble finding this in another JAR file
> from the xmlsec.jar
>
> Thanks,
> Jason
>
>
> On Jan 29, 2008 3:05 PM, Brent Putman <[EMAIL PROTECTED]> wrote:
>
> > Well, it's undocumented AFAIK, so I don't know if this is considered
> > "stable", but: You can set a system property
> > "org.apache.xml.security.resource.config",  prior to calling
> > Init.init(), which controls which resource is loaded as the config file.
> >
> > Here's the code from Init which does the actual loading.  It uses
> > Class#getResourceAsStream as you can see.  So you should be able to put
> > the alternative config file in your own jar file or elsewhere on your
> > classpath, as long as it can be loaded as a resource in this manner.
> >
> > InputStream is = (InputStream) AccessController.doPrivileged(
> >        new PrivilegedAction() {
> >            public Object run() {
> >               String cfile =
> > System.getProperty("org.apache.xml.security.resource.config");
> >               return getClass().getResourceAsStream(cfile != null ?
> > cfile : "resource/config.xml");
> >            }
> >        }
> > );
> >
> > jason marshall wrote:
> > > Does anyone have a good description of how to override the config.xml
> > > file without modifying the xml-sec.jar file?
> > >
> > > I can't see a way to get the config.xml file somewhere that Init can
> > > see it, short of modifying the Jar, and if I have to do that, I'll
> > > just modify the config.xml file in place.
> > >
> > > Thanks,
> > > Jason
> >
>
>
>
> --
> - Jason




-- 
- Jason

Reply via email to