Search in sources :

Example 1 with ContentEncryptedElementSecurityEvent

use of org.apache.xml.security.stax.securityEvent.ContentEncryptedElementSecurityEvent in project santuario-java by apache.

the class DecryptionTest method checkEncryptedContentSecurityEvents.

protected void checkEncryptedContentSecurityEvents(TestSecurityEventListener securityEventListener) {
    ContentEncryptedElementSecurityEvent encryptedElementEvent = (ContentEncryptedElementSecurityEvent) securityEventListener.getSecurityEvent(SecurityEventConstants.ContentEncrypted);
    assertNotNull(encryptedElementEvent);
    assertEquals(encryptedElementEvent.getElementPath().size(), 2);
    assertEquals("{urn:example:po}PurchaseOrder", encryptedElementEvent.getElementPath().get(0).toString());
    assertEquals("{urn:example:po}PaymentInfo", encryptedElementEvent.getElementPath().get(1).toString());
    assertTrue(encryptedElementEvent.isEncrypted());
}
Also used : ContentEncryptedElementSecurityEvent(org.apache.xml.security.stax.securityEvent.ContentEncryptedElementSecurityEvent)

Aggregations

ContentEncryptedElementSecurityEvent (org.apache.xml.security.stax.securityEvent.ContentEncryptedElementSecurityEvent)1