org.apache.ws.security.message
Class SignatureEncryptionTest

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.ws.security.message.SignatureEncryptionTest

public class SignatureEncryptionTest
extends org.junit.Assert

A set of tests for combined signature/encryption, verification/decryption.

Author:
Davanum Srinivas (dims@yahoo.com)

Constructor Summary
SignatureEncryptionTest()
           
 
Method Summary
 void testEncryptedKeySignature()
          Test signature created using an encrypted key SOAP Body is signed and encrypted.
 void testEncryptionElementSigning()
          Test that encrypts and then signs a WS-Security envelope (including the encrypted element), then performs verification and decryption

 void testEncryptionSigning()
          Test that encrypts and then signs a WS-Security envelope, then performs verification and decryption

 void testSigningEncryption()
          Test that signs and then encrypts a WS-Security envelope, then performs decryption and verification

 void testSigningEncryptionEmbedded()
          Test that encrypts and signs a WS-Security envelope, then performs verification and decryption.
 void testSigningEncryptionIS3DES()
          Test that first signs, then encrypts a WS-Security envelope.
 void testWSS198()
          Test that signs a SOAP Body, and then encrypts some data inside the SOAP Body.
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignatureEncryptionTest

public SignatureEncryptionTest()
                        throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

testEncryptionSigning

public void testEncryptionSigning()
                           throws java.lang.Exception
Test that encrypts and then signs a WS-Security envelope, then performs verification and decryption

Throws:
java.lang.Exception - Thrown when there is any problem in signing, encryption, decryption, or verification

testEncryptionElementSigning

public void testEncryptionElementSigning()
                                  throws java.lang.Exception
Test that encrypts and then signs a WS-Security envelope (including the encrypted element), then performs verification and decryption

Throws:
java.lang.Exception - Thrown when there is any problem in signing, encryption, decryption, or verification

testSigningEncryption

public void testSigningEncryption()
                           throws java.lang.Exception
Test that signs and then encrypts a WS-Security envelope, then performs decryption and verification

Throws:
java.lang.Exception - Thrown when there is any problem in signing, encryption, decryption, or verification

testWSS198

public void testWSS198()
                throws java.lang.Exception
Test that signs a SOAP Body, and then encrypts some data inside the SOAP Body. As the encryption adds a wsu:Id to the encrypted element, this test checks that verification still works ok.

Throws:
java.lang.Exception

testSigningEncryptionIS3DES

public void testSigningEncryptionIS3DES()
                                 throws java.lang.Exception
Test that first signs, then encrypts a WS-Security envelope. The test uses the IssuerSerial key identifier to get the keys for signature and encryption. Encryption uses 3DES.

Throws:
java.lang.Exception - Thrown when there is any problem in signing, encryption, decryption, or verification

testSigningEncryptionEmbedded

public void testSigningEncryptionEmbedded()
                                   throws java.lang.Exception
Test that encrypts and signs a WS-Security envelope, then performs verification and decryption.

Throws:
java.lang.Exception - Thrown when there is any problem in signing, encryption, decryption, or verification

testEncryptedKeySignature

public void testEncryptedKeySignature()
                               throws java.lang.Exception
Test signature created using an encrypted key SOAP Body is signed and encrypted. In the encryption, The ReferenceList element is put into the Encrypted Key, as a child of the EncryptedKey. Signature is created using the encrypted key.

Throws:
java.lang.Exception


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.