Search in sources :

Example 6 with XMLX509Digest

use of org.apache.xml.security.keys.content.x509.XMLX509Digest in project santuario-java by apache.

the class XMLX509DigestTest method testDigestOnConstructionWithCert.

@org.junit.Test
public void testDigestOnConstructionWithCert() throws Exception {
    XMLX509Digest x509Digest = new XMLX509Digest(documentBuilder.newDocument(), certControl, algorithmURIControl);
    assertEquals(algorithmURIControl, x509Digest.getAlgorithm());
    assertArrayEquals(digestControl, x509Digest.getDigestBytes());
}
Also used : XMLX509Digest(org.apache.xml.security.keys.content.x509.XMLX509Digest)

Aggregations

XMLX509Digest (org.apache.xml.security.keys.content.x509.XMLX509Digest)5 Element (org.w3c.dom.Element)4 Certificate (java.security.cert.Certificate)2 X509Certificate (java.security.cert.X509Certificate)2 XMLSecurityException (com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException)1 XMLX509Digest (com.sun.org.apache.xml.internal.security.keys.content.x509.XMLX509Digest)1 KeyResolverException (com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverException)1 XMLSecurityException (org.apache.xml.security.exceptions.XMLSecurityException)1 KeyResolverException (org.apache.xml.security.keys.keyresolver.KeyResolverException)1 Document (org.w3c.dom.Document)1 NodeList (org.w3c.dom.NodeList)1