use of xades4j.providers.impl.DefaultX500NameStyleProvider in project xades4j by luisgoncalves.
the class KeyInfoBuilderTest method testIncludeSubjectName.
@Test
public void testIncludeSubjectName() throws Exception {
System.out.println("includeSubjectName");
KeyInfoBuilder keyInfoBuilder = new KeyInfoBuilder(new BasicSignatureOptions().includeSubjectName(true), new SignatureAlgorithms(), new TestAlgorithmsParametersMarshallingProvider(), new DefaultX500NameStyleProvider());
XMLSignature xmlSignature = getTestSignature();
keyInfoBuilder.buildKeyInfo(certificates, xmlSignature);
Assert.assertEquals(1, xmlSignature.getKeyInfo().lengthX509Data());
Assert.assertEquals(1, xmlSignature.getKeyInfo().itemX509Data(0).lengthSubjectName());
}
Aggregations