Hi Dan.

On Mon, 2009-08-03 at 13:24 -0400, Daniel Kulp wrote:
> With the latest cxf code bases, as long as nothing is configured into the 
> interceptor properties, you should just be able to set the key/values on the 
> request context.   The interceptor would pick them up from the message.

Just a clarifications. 

The WSS4J properties can be put in the request context. The crypto
properties can be passed in a Properties object that is put in the
request context, mapped by a key that is itself passed as a WSS4J
property, SignaturePropRefId.

Easier to see it than to explain it

requestContext.put("passwordCallbackClass", "KeystorePasswordCallback");
                
Properties cryptoProperties = new Properties();
cryptoProperties.put("org.apache.ws.security.crypto.provider",
"org.apache.ws.security.components.crypto.Merlin");
cryptoProperties.put("org.apache.ws.security.crypto.merlin.keystore.password", 
"pwd");
cryptoProperties.put("org.apache.ws.security.crypto.merlin.file",
"file");
cryptoProperties.put("org.apache.ws.security.crypto.merlin.keystore.type", 
"pkcs12");

requestContext.put("cryptoProperties", cryptoProperties);
                
requestContext.put(WSHandlerConstants.SIG_PROP_REF_ID,
"cryptoProperties");


Valerio

> Dan
> 
> 
> On Mon August 3 2009 12:27:06 pm Valerio Venturi wrote:
> > Hi,
> > how do you pass the keystore location and password programmatically to a
> > WSS4JOutInterceptor, the like you do using
> > WSHandlerConstants.SIG_PROP_FILE and
> > org.apache.ws.security.crypto.merlin.file and
> > org.apache.ws.security.crypto.merlin.keystore.password?
> >
> > Regards,
> > Valerio
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to