One approach is to import the self-signed certificates into a key store and
point that key store for cryptographic operations using the rampart-config.
You can use  rampart:encryptionCrypto> and <rampart:signatureCrypto> for
this.

Following listing is an example of it. You can get a good idea by going
through the Rampart samples. (Especially Sample 2 and Sample 3)

<rampart:RampartConfig xmlns:rampart="http://ws.apache.org/rampart/policy";>
        <rampart:encryptionCrypto>
          <rampart:crypto
provider="org.wso2.carbon.security.util.ServerCrypto">
            <rampart:property
name="org.wso2.carbon.security.crypto.alias">service</rampart:property>
            <rampart:property
name="org.wso2.carbon.security.crypto.privatestore">service.jks</rampart:property>
            <rampart:property
name="org.wso2.carbon.security.crypto.truststores">service.jks,</rampart:property>
            <rampart:property
name="rampart.config.user">service</rampart:property>
          </rampart:crypto>
        </rampart:encryptionCrypto>
        <rampart:signatureCrypto>
          <rampart:crypto
provider="org.wso2.carbon.security.util.ServerCrypto">
            <rampart:property
name="org.wso2.carbon.security.crypto.alias">service</rampart:property>
            <rampart:property
name="org.wso2.carbon.security.crypto.privatestore">service.jks</rampart:property>
            <rampart:property
name="org.wso2.carbon.security.crypto.truststores">service.jks,</rampart:property>
            <rampart:property
name="rampart.config.user">service</rampart:property>
          </rampart:crypto>
        </rampart:signatureCrypto>
      </rampart:RampartConfig>

Thanks.
/ thilina

E-Mail         : [email protected]
I blog here : http://thilinamb.com


On Wed, Sep 9, 2009 at 4:13 PM, ghader <[email protected]> wrote:

> how to use self signed certificates for signing and encrypting sent
> messages
> of a web service and verifying and decrypting received messages, in a web
> service using rampart?
>

Reply via email to