On Wed, Jun 11, 2008 at 7:41 PM, Fabien Couvert <[EMAIL PROTECTED]>
wrote:

> Hi all,
> I have a question about the mechanism of Encryption with asymmetric key.
> In my application I use 2 keystore, one for the client(specified in the
> client.properties file) and one for the server (specified in the
> service.properties).
>
> In the client conf file I added :
>       <items>Encrypt</items>
>       <encryptionUser>service</encryptionUser>
>       <encryptionPropFile>client.properties</encryptionPropFile>
>     </action>
>
> Everything works fine but how ?! :)
>
> How the client can crypt the message with the public key of the server ?
> (name service)


In the keystore of the client, you must be having the service's certificate
with the alias "service". You can check this with the java keytool. Use the
command given bellow to check the content of the key store.

$ keytool -v -list -keystore /path/to/keystore.jks -storepass
keystore-password

How the client recover the public key of the server ?
>

It has to be there in the client's key store. But in the server side, if you
have use "useReqSigCert" as the encryption user , binary certificate which
was in security header of the request can be used to encrypt the message
back to the client.

-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/

Reply via email to