use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class RSASecurityTest method test_enveloped.
@org.junit.Test
public void test_enveloped() throws Exception {
String filename = blakesDir + "certj201_enveloped.xml";
boolean followManifests = false;
ResourceResolverSpi resolver = null;
boolean verify = this.verify(filename, resolver, followManifests);
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 IAIKTest method test_signatureAlgorithms_signatures_hMACSignature.
/**
* Method test_signatureAlgorithms_signatures_hMACSignature
*
* @throws Exception
*/
@org.junit.Test
public void test_signatureAlgorithms_signatures_hMACSignature() throws Exception {
String filename = gregorsDir + "signatureAlgorithms/signatures/hMACSignature.xml";
ResourceResolverSpi resolver = new OfflineResolver();
boolean followManifests = false;
byte[] hmacKey = "secret".getBytes(StandardCharsets.US_ASCII);
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 IAIKTest method test_coreFeatures_signatures_manifestSignature_core.
/**
* Method test_coreFeatures_signatures_manifestSignature
*
* @throws Exception
*/
@org.junit.Test
public void test_coreFeatures_signatures_manifestSignature_core() throws Exception {
String filename = gregorsDir + "coreFeatures/signatures/manifestSignature.xml";
ResourceResolverSpi resolver = null;
boolean followManifests = false;
boolean verify = false;
try {
verify = this.verify(filename, resolver, followManifests);
} catch (RuntimeException ex) {
LOG.error("Core validation crashed for " + filename);
throw ex;
}
if (!verify) {
LOG.error("Core validation failed for " + filename);
}
assertTrue("Core validation failed for " + filename, verify);
}
use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class IAIKTest method test_coreFeatures_signatures_signatureTypesSignature.
/**
* Method test_coreFeatures_signatures_signatureTypesSignature
*
* @throws Exception
*/
@org.junit.Test
public void test_coreFeatures_signatures_signatureTypesSignature() throws Exception {
String filename = gregorsDir + "coreFeatures/signatures/signatureTypesSignature.xml";
ResourceResolverSpi resolver = new OfflineResolver();
boolean followManifests = false;
boolean verify = false;
try {
verify = this.verify(filename, resolver, followManifests, false);
} catch (RuntimeException ex) {
LOG.error("Verification crashed for " + filename);
throw ex;
}
if (!verify) {
LOG.error("Verification failed for " + filename);
}
assertTrue("Verification failed for " + filename, verify);
}
use of org.apache.xml.security.utils.resolver.ResourceResolverSpi in project santuario-java by apache.
the class IAIKTest method test_coreFeatures_signatures_anonymousReferenceSignature.
/**
* Method test_coreFeatures_signatures_anonymousReferenceSignature
*
* @throws Exception
*/
@org.junit.Test
public void test_coreFeatures_signatures_anonymousReferenceSignature() throws Exception {
String filename = gregorsDir + "coreFeatures/signatures/anonymousReferenceSignature.xml";
String anonymousRef = gregorsDir + "coreFeatures/samples/anonymousReferenceContent.xml";
ResourceResolverSpi resolver = new ResolverAnonymous(anonymousRef);
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