org.eu.mayrhofer.authentication.test
Class SimpleKeyAgreementTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eu.mayrhofer.authentication.test.SimpleKeyAgreementTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
SimpleKeyAgreementTest_BCAPI, SimpleKeyAgreementTest_Mixed1, SimpleKeyAgreementTest_Mixed2

public class SimpleKeyAgreementTest
extends junit.framework.TestCase


Field Summary
protected  boolean useJSSE
           
protected  boolean useJSSE2
           
 
Constructor Summary
SimpleKeyAgreementTest(java.lang.String s)
           
 
Method Summary
static boolean compareByteArray(byte[] b1, byte[] b2)
           
static boolean compareByteArray(byte[] b1, short[] b2)
           
 void testCorrectAgreement()
           
 void testDHParameters()
           
 void testMessages_addRemotePublicKey_equalPublicKeyAdded()
           
 void testMessages_addRemotePublicKey_invalidPublicKeyAdded1()
           
 void testMessages_addRemotePublicKey_invalidPublicKeyAdded2()
           
 void testMessages_addRemotePublicKey_invalidPublicKeyAdded3()
           
 void testMessages_addRemotePublicKey_invalidPublicKeyAdded4()
           
 void testMessages_addRemotePublicKey_invalidPublicKeyAdded5()
           
 void testStates_addRemotePublicKey_correctState()
           
 void testStates_addRemotePublicKey_wrongState1()
           
 void testStates_addRemotePublicKey_wrongState2()
           
 void testStates_getAuthenticationKey_correctState()
           
 void testStates_getAuthenticationKey_wrongState1()
           
 void testStates_getAuthenticationKey_wrongState2()
           
 void testStates_getPublicKey_correctState()
           
 void testStates_getPublicKey_wrongState()
           
 void testStates_getSessionKey_correctState()
           
 void testStates_getSessionKey_wrongState1()
           
 void testStates_getSessionKey_wrongState2()
           
 void testStates_Initialize()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

useJSSE

protected boolean useJSSE

useJSSE2

protected boolean useJSSE2
Constructor Detail

SimpleKeyAgreementTest

public SimpleKeyAgreementTest(java.lang.String s)
Method Detail

compareByteArray

public static boolean compareByteArray(byte[] b1,
                                       byte[] b2)

compareByteArray

public static boolean compareByteArray(byte[] b1,
                                       short[] b2)

testDHParameters

public void testDHParameters()

testStates_Initialize

public void testStates_Initialize()
                           throws InternalApplicationException
Throws:
InternalApplicationException

testStates_getPublicKey_correctState

public void testStates_getPublicKey_correctState()
                                          throws KeyAgreementProtocolException,
                                                 InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_getPublicKey_wrongState

public void testStates_getPublicKey_wrongState()
                                        throws KeyAgreementProtocolException,
                                               InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_addRemotePublicKey_correctState

public void testStates_addRemotePublicKey_correctState()
                                                throws KeyAgreementProtocolException,
                                                       InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_addRemotePublicKey_wrongState1

public void testStates_addRemotePublicKey_wrongState1()
                                               throws KeyAgreementProtocolException,
                                                      InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_addRemotePublicKey_wrongState2

public void testStates_addRemotePublicKey_wrongState2()
                                               throws KeyAgreementProtocolException,
                                                      InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_getSessionKey_wrongState1

public void testStates_getSessionKey_wrongState1()
                                          throws KeyAgreementProtocolException,
                                                 InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_getSessionKey_wrongState2

public void testStates_getSessionKey_wrongState2()
                                          throws KeyAgreementProtocolException,
                                                 InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_getSessionKey_correctState

public void testStates_getSessionKey_correctState()
                                           throws KeyAgreementProtocolException,
                                                  InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_getAuthenticationKey_wrongState1

public void testStates_getAuthenticationKey_wrongState1()
                                                 throws KeyAgreementProtocolException,
                                                        InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_getAuthenticationKey_wrongState2

public void testStates_getAuthenticationKey_wrongState2()
                                                 throws KeyAgreementProtocolException,
                                                        InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testStates_getAuthenticationKey_correctState

public void testStates_getAuthenticationKey_correctState()
                                                  throws KeyAgreementProtocolException,
                                                         InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testMessages_addRemotePublicKey_equalPublicKeyAdded

public void testMessages_addRemotePublicKey_equalPublicKeyAdded()
                                                         throws KeyAgreementProtocolException,
                                                                InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testMessages_addRemotePublicKey_invalidPublicKeyAdded1

public void testMessages_addRemotePublicKey_invalidPublicKeyAdded1()
                                                            throws KeyAgreementProtocolException,
                                                                   InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testMessages_addRemotePublicKey_invalidPublicKeyAdded2

public void testMessages_addRemotePublicKey_invalidPublicKeyAdded2()
                                                            throws KeyAgreementProtocolException,
                                                                   InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testMessages_addRemotePublicKey_invalidPublicKeyAdded3

public void testMessages_addRemotePublicKey_invalidPublicKeyAdded3()
                                                            throws KeyAgreementProtocolException,
                                                                   InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testMessages_addRemotePublicKey_invalidPublicKeyAdded4

public void testMessages_addRemotePublicKey_invalidPublicKeyAdded4()
                                                            throws KeyAgreementProtocolException,
                                                                   InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testMessages_addRemotePublicKey_invalidPublicKeyAdded5

public void testMessages_addRemotePublicKey_invalidPublicKeyAdded5()
                                                            throws KeyAgreementProtocolException,
                                                                   InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException

testCorrectAgreement

public void testCorrectAgreement()
                          throws KeyAgreementProtocolException,
                                 InternalApplicationException
Throws:
KeyAgreementProtocolException
InternalApplicationException


2005-2006, Rene Mayrhofer.