This directory contains Test Indication Consumer and 
some Test Indication generator Clients.

Example programs
=================

'IndConsumer.java' is an example Indication consumer that uses CIMListener 
interface. 

'sendIndication.java' is a tests porgram that uses socket connection 
to talk to Indication Listeners.

Srcipts
========
The following scripts make use of the example programs.
NOTE: For SSL enabling - refer to SSL section first.

Indication Consumer -  Refer to these scripts
    startConsumer.sh  - Starts the consumers in non-SSL mode
    startConsumerSSL.sh - Starts the consumers in SSL mode

Indication Clients - Refer to these scripts
    sendIndication.sh  - send Indications using non-SSL connection
    sendIndicationSSL.sh - send Indications using SSL connection

 
Start Indication Listener
=================================
 1. Make sure the proper CLASSPATH is set

 2. Starts the consumer
   - To Start Consumer in Non-SSL mode, run
      $ startConsumer.sh
   Or
  - To Start Consumer in SSL mode, run
    Make sure that you have done the steps from 
    'SSL certificate generation' section first. And then run
      $ startConsumerSSL.sh

 3. (Optional test) To start another Indication consumer, use
    - $ myTestConsumer.sh
  
Run Indication generator clients
=================================
  - Use a separate window
  - Make sure the proper CLASSPATH is set
  - To Start Indication generator client Non-SSL mode, run
      $ sendIndication.sh
      
  - To Start Indication generator client SSL mode, 
    Make sure that you have done the steps from 
    'SSL certificate generation' section first. And then run
      $ sendIndicationSSL.sh
      
Note:  Please refer to .java files for the explaination of
       what each program does.


SSL certificate generation:
==========================

Server Certificate 
------------------
You can use 'mkcert.sh' to generate certificates for the use  by
the above SSL scripts. For more information on this script refer
to Java keytool command.

1. Create Server certificates, using
   # mkcert.sh

  This will create
    cimind.cert  - Server Certificate
    cimind.key   - Server Key Store
    cimind.trust - Server Trust Store

2. As of now all the tests use the sample Trust Manager provided
   with the SDK and this trust manager is set in cim.properties file as
     TrustManager=org.snia.wbem.listener.DoNotValidateClientCert
   For now, this ignores the certificates that is sent by the
   Client applications. In case you are interested  in writing
   own Trust Manager, refer to JSSE X509TrustManager documentation.


Client Certificate
------------------
1. First create Client certificates, using
   # mkcertClient.sh

  This will create
    cimindCL.cert  - Client Certificate 
    cimindCL.key   - Client Key Store
    cimindCL.trust - Client Trust Store
 

2. You must import CIM Listener (which acts as a SSL server) certificate 
   into client trust store, using java keytool command
     # keytool -import -alias listener -file cimind.cert -keystore cimindCL.trust
      then enter...
         Enter keystore password:  cimindCLcertpass
         Trust this certificate? [no]:  yes

  You can verify using 
     # keytool -printcert -file cimind.cert

