One quick follow-up: If its not possible to do what I just asked for with the current API, can we add another signature to the CryptoFactory.getInstance() API as follows (please correct me if I am missing something):

public static Crypto getInstance(String cryptoClassName, Properties properties, InputStream keystoreStream)

Thanks!

On 11/21/05, Soactive Inc <[EMAIL PROTECTED]> wrote:
I am using WSS4J and am wondering how I can use the WSS4J API in conjunction with non-file resources such as a database. I know that there is a section of code in AbstractCrypto.java that says:

...
this.properties = properties;
String location = this.properties.getProperty("org.apache.ws.security.crypto.merlin.file
"
);
InputStream is = null;

/**
* Look for the keystore in classpaths
*/

DiscoverResources disc =
new DiscoverResources();
disc.addClassLoader(JDKHooks.getJDKHooks().getThreadContextClassLoader());
disc.addClassLoader(loader);
ResourceIterator iterator =
disc.findResources(location);
if (iterator.hasNext()) {
Resource resource = iterator.nextResource();
is = resource.getResourceAsStream();
}


/**
* If we don't find it, then look on the file system.
*/

if (is == null
) {
try {
is = new FileInputStream(location);
} catch
(Exception e) {
throw new CredentialException(3, "proxyNotFound",
new
Object[]{location});
}


}
....

Does this mean I can provide a non-file resource URL in the same ...file property? If so, how can I specify a database URL? Any ideas appreciated.

Thanks.


Reply via email to