/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 4635230 6365103 6366054 6824440 7131084
* @summary Basic unit tests for validating XML Signatures with JSR 105
* @compile -XDignore.symbol.file KeySelectors.java SignatureValidator.java
* @author Sean Mullan
*/
public class ValidationTests {
static class Test {
}
}
static {
try {
skks =
} catch (Exception e) {
//should not occur
}
}
new KeySelectors.KeyValueKeySelector();
new KeySelectors.RawX509KeySelector();
};
};
httpUd = new HttpURIDereferencer();
boolean atLeastOneFailed = false;
if (test_signature(test)) {
} else {
atLeastOneFailed = true;
}
}
// test with reference caching enabled
} else {
atLeastOneFailed = true;
}
try {
atLeastOneFailed = true;
} catch (XMLSignatureException xse) {
}
}
if (atLeastOneFailed) {
throw new Exception
("At least one signature did not validate as expected");
}
}
return test_signature(test, false);
}
throws Exception
{
}
}
}
/**
* This URIDereferencer returns locally cached copies of http content to
* avoid test failures due to network glitches, etc.
*/
}
throws URIReferenceException {
try {
} catch (Exception e) { throw new URIReferenceException(e); }
}
// fallback on builtin deref
}
}
}