Class SignatureEncryptionTest


  • public class SignatureEncryptionTest
    extends Object
    A set of tests for combined signature/encryption, verification/decryption.
    • Constructor Detail

      • SignatureEncryptionTest

        public SignatureEncryptionTest()
                                throws Exception
        Throws:
        Exception
    • Method Detail

      • testEncryptionSigning

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

        Throws:
        Exception - Thrown when there is any problem in signing, encryption, decryption, or verification
      • testEncryptionElementSigning

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

        Throws:
        Exception - Thrown when there is any problem in signing, encryption, decryption, or verification
      • testSigningEncryption

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

        Throws:
        Exception - Thrown when there is any problem in signing, encryption, decryption, or verification
      • testWSS198

        @Test
        public void testWSS198()
                        throws 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:
        Exception
      • testSigningEncryptionIS3DES

        @Test
        public void testSigningEncryptionIS3DES()
                                         throws 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:
        Exception - Thrown when there is any problem in signing, encryption, decryption, or verification
      • testEncryptedKeySignature

        @Test
        public void testEncryptedKeySignature()
                                       throws 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:
        Exception
      • testEncryptionSigningHandler

        @Test
        public void testEncryptionSigningHandler()
                                          throws Exception
        Throws:
        Exception
      • testSigningEncryptionHandler

        @Test
        public void testSigningEncryptionHandler()
                                          throws Exception
        Throws:
        Exception
      • testSigningEncryptionSOAP12Fault

        @Test
        public void testSigningEncryptionSOAP12Fault()
                                              throws Exception
        Throws:
        Exception