Package org.springframework.ws.soap.security.wss4j.support

Examples of org.springframework.ws.soap.security.wss4j.support.CryptoFactoryBean


    @Override
    protected void onSetup() throws Exception {
        interceptor = new Wss4jSecurityInterceptor();
        interceptor.setSecurementActions("Signature");
        interceptor.setValidationActions("Signature");
        CryptoFactoryBean cryptoFactoryBean = new CryptoFactoryBean();
        cryptoFactoryBean.setCryptoProvider(Merlin.class);
        cryptoFactoryBean.setKeyStoreType("jceks");
        cryptoFactoryBean.setKeyStorePassword("123456");
        cryptoFactoryBean.setKeyStoreLocation(new ClassPathResource("private.jks"));

        cryptoFactoryBean.afterPropertiesSet();
        interceptor.setSecurementSignatureCrypto(cryptoFactoryBean
                .getObject());
        interceptor.setValidationSignatureCrypto(cryptoFactoryBean
                .getObject());
        interceptor.afterPropertiesSet();

    }
View Full Code Here


        KeyStoreCallbackHandler callbackHandler = new KeyStoreCallbackHandler();
        callbackHandler.setPrivateKeyPassword("123456");
        interceptor.setValidationCallbackHandler(callbackHandler);

        CryptoFactoryBean cryptoFactoryBean = new CryptoFactoryBean();

        Properties cryptoFactoryBeanConfig = new Properties();
        cryptoFactoryBeanConfig.setProperty("org.apache.ws.security.crypto.provider",
                "org.apache.ws.security.components.crypto.Merlin");
        cryptoFactoryBeanConfig.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jceks");
        cryptoFactoryBeanConfig.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "123456");

        // from the class path
        cryptoFactoryBeanConfig.setProperty("org.apache.ws.security.crypto.merlin.file", "private.jks");
        cryptoFactoryBean.setConfiguration(cryptoFactoryBeanConfig);
        cryptoFactoryBean.afterPropertiesSet();
        interceptor.setValidationDecryptionCrypto(cryptoFactoryBean
                .getObject());
        interceptor.setSecurementEncryptionCrypto(cryptoFactoryBean
                .getObject());

        interceptor.afterPropertiesSet();
    }
View Full Code Here

    @Override
    protected void onSetup() throws Exception {
        interceptor = new Wss4jSecurityInterceptor();
        interceptor.setValidationActions("Signature");

        CryptoFactoryBean cryptoFactoryBean = new CryptoFactoryBean();
        Properties cryptoFactoryBeanConfig = new Properties();
        cryptoFactoryBeanConfig.setProperty("org.apache.ws.security.crypto.provider",
                "org.apache.ws.security.components.crypto.Merlin");
        cryptoFactoryBeanConfig.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jceks");
        cryptoFactoryBeanConfig.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "123456");

        // from the class path
        cryptoFactoryBeanConfig.setProperty("org.apache.ws.security.crypto.merlin.file", "private.jks");
        cryptoFactoryBean.setConfiguration(cryptoFactoryBeanConfig);
        cryptoFactoryBean.afterPropertiesSet();
        interceptor.setValidationSignatureCrypto(cryptoFactoryBean
                .getObject());
        interceptor.setSecurementSignatureCrypto(cryptoFactoryBean
                .getObject());
        interceptor.afterPropertiesSet();

    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.soap.security.wss4j.support.CryptoFactoryBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.