Thanks for the reply. So do you mean that I would write my own class
instead of using the CryptoConfig class ? I am not sure what do you mean by
writing my own crypto class. Where will I use it? I tried extending
crypto.Merlin class and override some of its methods to see if I can
control the signing part but no luck there. If I write my own crypto
implementation how would I plug it into the Rampart config ? Sorry to be
asking basic questions but as I said previously I am new to it all so not
too familiar with all of it just yet so some more specifics may help.
By the way, my api is using SunMSCAPI to access MS CryptoAPI (CAPI) key
store in windows instead of JKS.
thanks,
Adil
On Dec 11, 2008 11:36am, Dimuthu Leelarathne <[email protected]> wrote:
Hi,
I think the solution is to write your own crypto implementation by
implementing the interface org.apache.ws.security.components.crypto.Crypto.
It will be something similar to
org.apache.ws.security.components.crypto.Merlin. Inside this implementation
use your key store API.
Thank you,
Dimuthu
[email protected] wrote:
Hello,
I am new to rampart and axis in general so I dont know if this is
possible at all or not. The problem I have is that we have a custom
keystore (not using java key store) that we have an api to talk to. When
specifying the rampart config, specifically the keystore file in
signaturecrypto, I have to get the keystore from the api. So far all
examples I have seen require you to specify the keystore file and I dont
have that. The api that I have to use gives me a java.security.KeyStore
Object and I want to know if there is anyway I can specify that instead of
the file. If I have to extend any class and then use that instead of course
that can be done, but I just don't know where to start which file/method to
override and so on . Following is some sample of how I am specifying the
rampart configuration :
RampartConfig rampartConfig = new RampartConfig();
rampartConfig.setUser("c1");
rampartConfig.setPwCbClass("custom.PasswordCallbackHandler");
CryptoConfig sigCrypto = new CryptoConfig();
sigCrypto.setProvider("org.apache.ws.security.components.crypto.Merlin");
Properties props = new Properties();
props.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "JKS");
props.setProperty("org.apache.ws.security.crypto.merlin.file","c:/keys/client.ks");
props.setProperty("org.apache.ws.security.crypto.merlin.keystore.password",
"client-ks-pass");
sigCrypto.setProp(props);
rampartConfig.setSigCryptoConfig(sigCrypto);
Policy policy = new Policy();
policy.addAssertion(rampartConfig);
Any help in this regard is greatly appreciated.
Thanks in advance,
Adil