use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class IBMTest method test_enveloping_dsa_soaped_broken.
/**
* Method test_enveloping_dsa_soaped_broken
*
* @throws Exception
*/
@org.junit.Test
public void test_enveloping_dsa_soaped_broken() throws Exception {
if (!runTests) {
return;
}
String filename = kentsDir + "enveloping-dsa-soaped-broken.sig";
if (!new File(filename).exists()) {
System.err.println("Couldn't find: " + filename + " and couldn't do the test");
return;
}
ResourceResolverSpi resolver = null;
boolean followManifests = false;
boolean verify = true;
try {
verify = this.verify(filename, resolver, followManifests);
} catch (RuntimeException ex) {
LOG.error("Verification crashed for " + filename);
throw ex;
}
if (verify) {
LOG.error("Verification failed for " + filename + ", had to be broken but was successful");
}
assertTrue(filename, !verify);
}
use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class IBMTest method test_enveloping_hmac.
/**
* Method test_enveloping_hmac
*
* @throws Exception
*/
@org.junit.Test
public void test_enveloping_hmac() throws Exception {
if (!runTests) {
return;
}
String filename = kentsDir + "enveloping-hmac.sig";
ResourceResolverSpi resolver = new OfflineResolver();
boolean followManifests = false;
byte[] hmacKey = JavaUtils.getBytesFromFile(kentsDir + "enveloping-hmac.key");
boolean verify = false;
try {
verify = this.verifyHMAC(filename, resolver, followManifests, hmacKey);
} catch (RuntimeException ex) {
LOG.error("Verification crashed for " + filename);
throw ex;
}
if (!verify) {
LOG.error("Verification failed for " + filename);
}
assertTrue(filename, verify);
}
use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class IBMTest method test_enveloping_rsa.
/**
* Method test_enveloping_rsa
*
* @throws Exception
*/
@org.junit.Test
public void test_enveloping_rsa() throws Exception {
if (!runTests) {
return;
}
String filename = kentsDir + "enveloping-rsa.sig";
ResourceResolverSpi resolver = null;
boolean followManifests = false;
boolean verify = false;
try {
verify = this.verify(filename, resolver, followManifests);
} catch (RuntimeException ex) {
LOG.error("Verification crashed for " + filename);
throw ex;
}
if (!verify) {
LOG.error("Verification failed for " + filename);
}
assertTrue(filename, verify);
}
use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class BaltimoreTest method test_twenty_three_enveloping_dsa.
/**
* Method test_twenty_three_enveloping_dsa
*
* @throws Exception
*/
@org.junit.Test
public void test_twenty_three_enveloping_dsa() throws Exception {
String filename = merlinsDir23 + "signature-enveloping-dsa.xml";
ResourceResolverSpi resolver = new OfflineResolver();
boolean followManifests = false;
boolean verify = false;
try {
verify = this.verify(filename, resolver, followManifests);
} catch (RuntimeException ex) {
LOG.error("Verification crashed for " + filename);
throw ex;
}
if (!verify) {
LOG.error("Verification failed for " + filename);
}
assertTrue(filename, verify);
}
use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class BaltimoreTest method test_twenty_three_enveloping_rsa.
/**
* Method test_twenty_three_enveloping_rsa
*
* @throws Exception
*/
@org.junit.Test
public void test_twenty_three_enveloping_rsa() throws Exception {
String filename = merlinsDir23 + "signature-enveloping-rsa.xml";
ResourceResolverSpi resolver = new OfflineResolver();
boolean followManifests = false;
boolean verify = false;
try {
verify = this.verify(filename, resolver, followManifests);
} catch (RuntimeException ex) {
LOG.error("Verification crashed for " + filename);
throw ex;
}
if (!verify) {
LOG.error("Verification failed for " + filename);
}
assertTrue(filename, verify);
}
Aggregations