org.apache.ws.security.message
Class STRSignatureTest

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

public class STRSignatureTest
extends org.junit.Assert

WS-Security Test Case for signature creation/validation using the SecurityTokenReference transform.

Author:
Davanum Srinivas (dims@yahoo.com)

Constructor Summary
STRSignatureTest()
           
 
Method Summary
 void testWSS96()
          This is a test for WSS-96: "Error when making a signature when containing a WSSecTimestamp" A timestamp is added to the document and signed.
 void testX509SignatureDirectSTR()
          Test that signs and verifies a WS-Security envelope.
 void testX509SignatureISSTR()
          Test that signs and verifies a WS-Security envelope.
 void testX509SignatureSKISTR()
          Test that signs and verifies a WS-Security envelope.
 
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

STRSignatureTest

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

testX509SignatureDirectSTR

public void testX509SignatureDirectSTR()
                                throws java.lang.Exception
Test that signs and verifies a WS-Security envelope. This test uses the direct reference key identifier (certificate included as a BinarySecurityToken (BST) in the message). The test signs the message body (SOAP Body) and uses the STRTransform to sign the embedded certificate

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

testWSS96

public void testWSS96()
               throws java.lang.Exception
This is a test for WSS-96: "Error when making a signature when containing a WSSecTimestamp" A timestamp is added to the document and signed.

Throws:
java.lang.Exception

testX509SignatureISSTR

public void testX509SignatureISSTR()
                            throws java.lang.Exception
Test that signs and verifies a WS-Security envelope. This test uses the IssuerSerial reference key identifier (certificate not included in the message)and reads the certificate from a keystore using IssuerSerialNumber to identify it.

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

testX509SignatureSKISTR

public void testX509SignatureSKISTR()
                             throws java.lang.Exception
Test that signs and verifies a WS-Security envelope. This test uses the SubjectKeyIdentifier key identifier (certificate not included in the message) and reads the certificate from a keystore using SKI to identify it.

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


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