WrappingOracle { public int maxPossibilities() { return maxPossibilites; } WrappingOracle( Document originalDocument, List<Payload> payloads, SchemaAnalyzer schemaAnalyser ); int maxPossibilities(); Document getPossibility( int index ); List<Payload> getUsedPayloads(); List<XPathAnalyser> getAnalyserList(); int getCountSignedElements(); int getCountElementsReferedByID(); int getCountElementsReferedByXPath(); int getCountElementsReferedByFastXPath(); int getCountElementsReferedByPrefixfreeTransformedFastXPath(); final static Logger LOG; }
@Test public void samlSameIdTest() throws Exception { log.info( "### Reading SAML message" ); SignatureManager manager = new SignatureManager(); Document doc = DomUtilities.readDocument( "src/test/resources/saml_same_id.xml" ); manager.setDocument( doc ); assertEquals( 1, manager.getSignatureElements().size() ); assertEquals( 1, manager.getPayloads().size() ); Payload assertion = manager.getPayloads().get( 0 ); assertion.setValue( assertion.getValue().replace( "joe.user@example.com", "attacker@example.com" ) ); WrappingOracle wrappingOracle = new WrappingOracle( doc, manager.getPayloads(), schemaAnalyser ); assertTrue( wrappingOracle.maxPossibilities() > 0 ); }