Package org.apache.wss4j.dom

Examples of org.apache.wss4j.dom.WSSecurityEngine.processSecurityHeader()


        receivedActions.add(WSConstants.SIGN);
        receivedActions.add(WSConstants.TS);
        handler.receive(receivedActions, reqData);
       
        WSSecurityEngine securityEngine = new WSSecurityEngine();
        return securityEngine.processSecurityHeader(doc, "", reqData);
    }
   
    private void sendResponse(List<WSHandlerResult> handlerResults) throws Exception {
        final RequestData reqData = new RequestData();
       
View Full Code Here


        Document doc, WSSConfig wssConfig
    ) throws Exception {
        WSSecurityEngine secEngine = new WSSecurityEngine();
        RequestData requestData = new RequestData();
        requestData.setWssConfig(wssConfig);
        return secEngine.processSecurityHeader(doc, "", requestData);
    }
   
    /**
     * Verifies the soap envelope
     */
 
View Full Code Here

        Document doc, List<BSPRule> ignoredRules
    ) throws Exception {
        WSSecurityEngine secEngine = new WSSecurityEngine();
        RequestData requestData = new RequestData();
        requestData.setIgnoredBSPRules(ignoredRules);
        return secEngine.processSecurityHeader(doc, "", requestData);
    }
   
    /**
     * Verifies the soap envelope
     */
 
View Full Code Here

    ) throws Exception {
        WSSecurityEngine secEngine = new WSSecurityEngine();
        RequestData requestData = new RequestData();
        requestData.setWssConfig(wssConfig);
        requestData.setIgnoredBSPRules(ignoredRules);
        return secEngine.processSecurityHeader(doc, "", requestData);
    }
   
   
}
View Full Code Here

        data.setCallbackHandler(secretKeyCallbackHandler);
       
        data.setAlgorithmSuite(algorithmSuite);
       
        algorithmSuite.addEncryptionMethod(WSConstants.AES_128);
        secEngine.processSecurityHeader(securityHeader, data);
       
        algorithmSuite.setMinimumSymmetricKeyLength(256);
        try {
            secEngine.processSecurityHeader(securityHeader, data);
            fail("Expected failure as a 128 bit key is not allowed");
View Full Code Here

        algorithmSuite.addEncryptionMethod(WSConstants.AES_128);
        secEngine.processSecurityHeader(securityHeader, data);
       
        algorithmSuite.setMinimumSymmetricKeyLength(256);
        try {
            secEngine.processSecurityHeader(securityHeader, data);
            fail("Expected failure as a 128 bit key is not allowed");
        } catch (WSSecurityException ex) {
            // expected
        }
       
View Full Code Here

        }
       
        algorithmSuite.setMinimumSymmetricKeyLength(64);
        algorithmSuite.setMaximumSymmetricKeyLength(120);
        try {
            secEngine.processSecurityHeader(securityHeader, data);
            fail("Expected failure as a 128 bit key is not allowed");
        } catch (WSSecurityException ex) {
            // expected
        }
    }
View Full Code Here

       
        data.setAlgorithmSuite(algorithmSuite);
       
        data.setCallbackHandler(new KeystoreCallbackHandler());
       
        return secEngine.processSecurityHeader(securityHeader, data);
    }

}
View Full Code Here

    ) throws Exception {
        WSSecurityEngine secEngine = new WSSecurityEngine();
        WSSConfig config = WSSConfig.getNewInstance();
        config.setAllowUsernameTokenNoPassword(allowUsernameTokenDerivedKeys);
        secEngine.setWssConfig(config);
        return secEngine.processSecurityHeader(doc, null, callbackHandler, crypto);
    }

}
View Full Code Here

            LOG.debug(outputString);
        }
       
        WSSecurityEngine newEngine = new WSSecurityEngine();
        try {
            newEngine.processSecurityHeader(doc, null, new KeystoreCallbackHandler(), wssCrypto);
            fail("Failure expected on a modified EncryptedData structure");
        } catch (WSSecurityException ex) {
            // expected
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.