Examples of WSSConfig


Examples of org.apache.ws.security.WSSConfig

        if (encrKeyResults != null) {
            completeResults.addAll(encrKeyResults);
        }
        completeResults.add(result);
       
        WSSConfig wssConfig = request.getWssConfig();
        if (wssConfig != null) {
            // Get hold of the plain text element
            Element decryptedElem;
            if (previousSibling == null) {
                decryptedElem = (Element)parent.getFirstChild();
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

        verify(doc);
    }
   
    @org.junit.Test
    public void testSignedBSTAction() throws Exception {
        final WSSConfig cfg = WSSConfig.getNewInstance();
        final int action = WSConstants.SIGN;
        final RequestData reqData = new RequestData();
        reqData.setWssConfig(cfg);
        reqData.setUsername("wss40");
       
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

        }
       
        //
        // Do some processing
        //
        WSSConfig wssConfig = WSSConfig.getNewInstance();
        wssConfig.setTimeStampTTL(-1);
        try {
            verify(createdDoc, wssConfig);
            fail("The timestamp validation should have failed");
        } catch (WSSecurityException ex) {
            assertTrue(ex.getErrorCode() == WSSecurityException.MESSAGE_EXPIRED);
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

            LOG.debug(outputString);
        }
        //
        // Do some processing
        //
        WSSConfig config = WSSConfig.getNewInstance();
        verify(doc, config);
        try {
            config.setTimeStampFutureTTL(0);
            verify(doc, config);
            fail("The timestamp validation should have failed");
        } catch (WSSecurityException ex) {
            assertTrue(ex.getErrorCode() == WSSecurityException.MESSAGE_EXPIRED);
        }
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

            LOG.debug(outputString);
        }
        //
        // Do some processing
        //
        WSSConfig config = WSSConfig.getNewInstance();
        try {
            verify(doc, config);
            fail("The timestamp validation should have failed");
        } catch (WSSecurityException ex) {
            assertTrue(ex.getErrorCode() == WSSecurityException.MESSAGE_EXPIRED);
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

        }
       
        //
        // Do some processing
        //
        WSSConfig wssConfig = WSSConfig.getNewInstance();
        wssConfig.setWsiBSPCompliant(true);
        try {
            verify(createdDoc, wssConfig);
            fail("Expected failure on multiple timestamps");
        } catch (WSSecurityException ex) {
            // expected
        }
       
        // Turn off BSP compliance and the test should pass
        wssConfig.setWsiBSPCompliant(false);
        verify(createdDoc, wssConfig);
    }
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

            LOG.debug(outputString);
        }
        //
        // Do some processing
        //
        WSSConfig wssConfig = WSSConfig.getNewInstance();
        wssConfig.setWsiBSPCompliant(true);
        try {
            verify(doc, wssConfig);
            fail("The timestamp validation should have failed on no Created element");
        } catch (WSSecurityException ex) {
            // expected
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

            LOG.debug(outputString);
        }
        //
        // Do some processing
        //
        WSSConfig wssConfig = WSSConfig.getNewInstance();
        wssConfig.setWsiBSPCompliant(true);
        try {
            verify(doc, wssConfig);
            fail("The timestamp validation should have failed");
        } catch (WSSecurityException ex) {
            // expected
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

        }
        //
        // Do some processing - disable the validator to make sure that the Timestamp processor
        // is rejecting the Timestamp
        //
        WSSConfig wssConfig = WSSConfig.getNewInstance();
        wssConfig.setWsiBSPCompliant(true);
        wssConfig.setValidator(WSSecurityEngine.TIMESTAMP, new NoOpValidator());
        try {
            verify(doc, wssConfig);
            fail("The timestamp validation should have failed");
        } catch (WSSecurityException ex) {
            //assertTrue(ex.getMessage().contains("Unparseable date"));
View Full Code Here

Examples of org.apache.ws.security.WSSConfig

            LOG.debug(outputString);
        }
        //
        // Do some processing
        //
        WSSConfig wssConfig = WSSConfig.getNewInstance();
        wssConfig.setWsiBSPCompliant(true);
        wssConfig.setValidator(WSSecurityEngine.TIMESTAMP, new NoOpValidator());
        try {
            verify(doc, wssConfig);
            fail("The timestamp validation should have failed");
        } catch (WSSecurityException ex) {
            //
        }
       
        // Now it should pass...
        wssConfig.setWsiBSPCompliant(false);
        verify(doc, wssConfig);
    }
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.