Search in sources :

Example 1 with X500NameStyleProvider

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);
}
Also used : DefaultX500NameStyleProvider(xades4j.providers.impl.DefaultX500NameStyleProvider) X500NameStyleProvider(xades4j.providers.X500NameStyleProvider) X500Principal(javax.security.auth.x500.X500Principal) DefaultX500NameStyleProvider(xades4j.providers.impl.DefaultX500NameStyleProvider) Test(org.junit.Test)

Aggregations

X500Principal (javax.security.auth.x500.X500Principal)1 Test (org.junit.Test)1 X500NameStyleProvider (xades4j.providers.X500NameStyleProvider)1 DefaultX500NameStyleProvider (xades4j.providers.impl.DefaultX500NameStyleProvider)1