The scenario of using a secret key in a keystore for encryption is not
really supported. The more usual scenario for encryption is that CXF/WSS4J
will generate a secret key internally to use for encryption, which is
subsequently encrypted with the public key of the recipient.

If you really want to implement the other scenario, you can try setting the
property "encryptSymmetricEncryptionKey" to "false". This will try to get
the Symmetric key as an array of bytes from the WSPasswordCallback that is
processed by the CallbackHandler. So you will have to read in the keystore
there and set the byte array on the WSPasswordCallback object.

Colm.

On Tue, Jun 26, 2012 at 5:45 PM, Thundr <[email protected]> wrote:

> The "SymetricKeystore.properties" contains:
>
>
> ####
>
> org.apache.ws.security.crypto.merlin.keystore.file=symmetricStore.jks
>
> org.apache.ws.security.crypto.merlin.keystore.password=symmetricPassword
>
> org.apache.ws.security.crypto.merlin.keystore.type=jceks
>
> org.apache.ws.security.crypto.merlin.keystore.alias=symmetric
>
> ####
>
>
> And contains:
>  http://cxf.547215.n5.nabble.com/file/n5710333/symmetricStore.jks.png
>
>
> "symmetric" is the key shared by client and server for *only* encrypt
> messages.
>
> Carlos
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Encryption-Decryption-using-a-shared-symmetric-key-tp5710302p5710333.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to