use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class BaltimoreTest method test_fifteen_enveloping_b64_dsa.
/**
* Method test_fifteen_enveloping_b64_dsa
*
* @throws Exception
*/
@org.junit.Test
public void test_fifteen_enveloping_b64_dsa() throws Exception {
String filename = merlinsDir15 + "signature-enveloping-b64-dsa.xml";
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_b64_dsa.
/**
* Method test_twenty_three_enveloping_b64_dsa
*
* @throws Exception
*/
@org.junit.Test
public void test_twenty_three_enveloping_b64_dsa() throws Exception {
String filename = merlinsDir23 + "signature-enveloping-b64-dsa.xml";
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_external_b64_dsa.
/**
* Method test_twenty_three_external_b64_dsa
*
* @throws Exception
*/
@org.junit.Test
public void test_twenty_three_external_b64_dsa() throws Exception {
String filename = merlinsDir23 + "signature-external-b64-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_sixteen_bad_signature.
/**
* Method test_sixteen_bad_signature. This tests make sure that an
* invalid signature is not valid. This is validating merlin's 16
* signature but some of the referenced content has been modified so
* some of the references should be invalid.
*
* @throws Exception
*/
@org.junit.Test
public void test_sixteen_bad_signature() throws Exception {
String filename = merlinsDir16 + "/bad-signature.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 passed (should have failed) for " + filename);
}
assertFalse(filename, verify);
}
use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class BaltimoreTest method test_twenty_three_external_dsa_2.
/**
* Method test_twenty_three_external_dsa_2
*
* @throws Exception
*/
@org.junit.Test
public void test_twenty_three_external_dsa_2() throws Exception {
String filename = merlinsDir23 + "signature.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