Hi,

You need to configure encryption properties with keystore and alias as well:

        outProps.put("encryptionUser", "clientx509v1");
        outProps.put("encryptionPropFile", "etc/Server_SignVerf.properties");
        outProps.put("encryptionKeyIdentifier", "IssuerSerial");

Take a look into following CXF sample (delivered with CXF distribution): 
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=tree;f=distribution/src/main/release/samples/ws_security/sign_enc;h=61611774baed837359879cbed16ef17e4bd9a7d2;hb=HEAD
 


Also consider to use recommended way to apply ws-security using WS-Policy:
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=tree;f=distribution/src/main/release/samples/ws_security/sign_enc_policy;h=7c87a6ee81a836e4e75d7b4645926d48cf25905e;hb=HEAD
 

Regards,
Andrei.


> -----Original Message-----
> From: Pete Long [mailto:[email protected]]
> Sent: Samstag, 1. November 2014 22:55
> To: [email protected]
> Subject: Asymmetric Encryption Configuration
> 
> Hi
> 
> I am using Spring for configuring an "outbound" interceptor to encrypt the 
> soap
> message response from my web service method.
> 
> I would like to use "Asymmetric" encryption. My understanding is for this, I
> need to use the Client's public key to encrypt the soap message response.
> The client will use its private key to de crypt.
> 
> With respect to configuring the outbound WSS4J interceptor, I am able to
> configure which key (alias) to use ie
> 
>                 <entry key="encryptionUser" value="client" />
> 
> I believe the option to configure the WSS4J interceptor for symmetric
> encryption is
>                <entry key="encryptionSymAlgorithm"
> value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"; />
> 
> However, I would like to configure  WSS4J interceptor for *Asymmetric
> encryption*. Can you please suggest how I can acheive this.
> 
> Thank you.
> Pete
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Asymmetric-
> Encryption-Configuration-tp5750571.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to