You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by MrRothstein <mr...@gmail.com> on 2009/01/13 04:01:49 UTC

Installing a production certificate for signing

I'm trying to figure out how to get a production certificate for signing with
ws-security.
The link in the documentation is broken. I'm trying to figure out if there
is a specific way to generate the signing request to ensure that the cert
can be used for signing content.

Are there any other resources available that document this process?

Thanks
-- 
View this message in context: http://www.nabble.com/Installing-a-production-certificate-for-signing-tp21428632p21428632.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Installing a production certificate for signing

Posted by Mayank Mishra <ma...@pramati.com>.
Hi,

1) You can configure production certificates using WSS4J configuration. 
WSS4J takes props file for keystore and truststore configuration.

or else,
2 a) you can also create your own objects as,
  
 private Crypto getCrypto() {
        Properties cryptoProps = new Properties();

        cryptoProps.put("org.apache.ws.security.crypto.provider", 
DEFAULT_PROVIDER);
        
cryptoProps.put("org.apache.ws.security.crypto.merlin.keystore.type" 
DEFAULT_TYPE);
        if (getUser() != null) {
            
cryptoProps.put("org.apache.ws.security.crypto.merlin.keystore.alias" 
getUser());
        }
        if (getKeyStorePassword() != null) {
            
cryptoProps.put("org.apache.ws.security.crypto.merlin.keystore.password", 
getKeyStorePassword());
        }
        if (getKeyStorePath() != null) {
            cryptoProps.put("org.apache.ws.security.crypto.merlin.file", 
getKeyStorePath());
        }
        if(getUser() == null || getKeyStorePassword() == null|| 
getKeyStorePath() == null){
            return null;
        }
        return CryptoFactory.getInstance(cryptoProps);
    }


2 b) and can pass them to WSHandler's hashtable cryptos as,
String signProps = (String) 
properties.get(WSHandlerConstants.SIG_PROP_FILE);
cryptos.put(signProps, getCrypto());

AFAIK, the only care one requires is to take care the the production 
certificates we are using are rightly trusted by CAs and only your 
installations trust each other's certificates.

With Regards,
Mayank

MrRothstein wrote:
> I'm trying to figure out how to get a production certificate for signing with
> ws-security.
> The link in the documentation is broken. I'm trying to figure out if there
> is a specific way to generate the signing request to ensure that the cert
> can be used for signing content.
>
> Are there any other resources available that document this process?
>
> Thanks
>