use of xades4j.providers.X500NameStyleProvider in project xades4j by luisgoncalves.
the class X500NameStyleProviderTest method normalWithExtendKeywords.
@Test
public void normalWithExtendKeywords() {
X500NameStyleProvider x500NameStyleProvider = new DefaultX500NameStyleProvider();
X500Principal name1 = x500NameStyleProvider.fromString(NAME_CANONICAL);
X500Principal name2 = x500NameStyleProvider.fromString(NAME_SIMPLE_NORMAL);
RFC4519ExtensibleStyle es = new RFC4519ExtensibleStyle();
es.addSymbol("1.2.840.113549.1.9.1", "E");
X500NameStyleProvider x500NameStyleProviderExtend = new DefaultX500NameStyleProvider(es);
X500Principal name3 = x500NameStyleProviderExtend.fromString(NAME_SIMPLE);
Assert.assertEquals(name1, name2);
Assert.assertEquals(name1, name3);
}
Aggregations