
============================================================================
Relating files list G
============================================================================
   iWAPI Databasej
         The WAPI database will save all certification into a file whose path is defined in FLASH_DEVICE_NAME1 parameter.
         The FLASH_DEVICE_NAME1 parameter is defined in wapi_utils\rwWapiFiles\wapiFiles.h.
         It will record the path of certification database.

    iCertificationj
         CA.cert    : AS server certificationCgenerated by AS server C
 
         ca4ap.cert : AS SERVER certification for AS client( aeUdpClient daemon ) usingCThe aeUdpClient daemin will use itC
         ap.cert    : AP certification for AS client( aeUdpClient daemon ) usingC

   iOPENSSLj
         openssl     : openssl daemon
         openssl.cnf : openssl configure file
         ecdsatest   : To change file format from DER to PEM.
         libssl.so.0.9.8
         libcrypto.so.0.9.8
 
   iWAPIj
         aseUdpServer  : WPAI server
         aeUdpClient   : WPAI client
 
         storeWapiFiles: Save the content of certification into the certification database
                         ( the path of certification database is recorded in FLASH_DEVICE_NAME1 )

         loadWapiFiles : Re-generated the all certification recorded in certification database.
                          (For Example : CA.cert , CA.key , CA.crl , ap.cert &  all user certification )
         readFileSize
 
   iScript filej
         initCAFiles.sh : remove all cert data & geterate new CA.cert
         genUserCert.sh : geterate client certification

============================================================================
How to compile
============================================================================
   make        : compile all daemon
   make clean  : compile all clean
   make help   : compile halp

============================================================================
How to generate certification
============================================================================
1. Generate AS server certification.
   Execure initCAFiles.sh
   The script will execute following steps :
      1. clean all exist certification.
      2. build new AS server certification.
      3. record the information of certification in WAPI database( FLASH_DEVICE_NAME1 )

   For Example :
      ./initCAFiles.sh

2. Generate AP certification.
   Step 2.1. Execure genUserCert.sh <user name>  <vaild days> < file name >
   Step 2.2. Execure storeWapiFiles -apCert

   The Step 2.1 will geterate a user certification.
   The Step 2.2 will write the certificaion into the AP certification field in WAPI database( FLASH_DEVICE_NAME1 ).
                When you execute loadWapiFiles , the loadWapiFiles daemon will read the AP certification of WAPI database and save it in /var/myca/ap.cert

   For Example :
       ./genUserCert.sh ap 11 ap.cert
       ./storeWapiFiles -apCert

3.  Generate user certification.
   ./genUserCert.sh <name> <vaild days> <file name>
   To generate user ceerification.

   For Example : 
      ./genUserCert.sh pc_client 30  pc_client.cert
      ./genUserCert.sh pc_client1 30 pc_client1.cert
      ./genUserCert.sh pc_client2 30 pc_client2.cert



============================================================================
How to re-load certification
============================================================================
   Execute loadWapiFiles
       The loadWapiFiles daemon will read WAPI database and re-generate all user certification in /var/myca/certs
   For Example :
      ./loadWapiFiles



============================================================================
How to run AS serverG 
============================================================================
   aseUdpServer &

   Note : Both AS server & AS client is able to independently run.

============================================================================
How to run AS clientG 
============================================================================

   First running
      step 0 :  
         Jump step 1.

   Normal runing : non-first running
      step 0 :  
         Execute  loadWapiFiles
         The loadWapiFiles daemon will read WAPI database and re-generate all user certification in /var/myca/certs.
         
 

     step 1. copy <AS server certification> to /var/myca/ca4ap.cert
         For Example :
            cp /var/myca/CA.cert /var/myca/ca4ap.cert
 
     step 2. copy <AP certification> to /var/myca/ap.cert
         For Example :
            cp ap.cert /var/myca/ap.cert

     step 3. web_wapi_cert.sh <interface name> < AS server IP >
         For Example :
	    web_wapi_cert.sh wlan0 192.168.1.100


Note : Both AS server & AS client is able to independently run.


============================================================================
Close daemonG 
============================================================================
killall aseUdpServer aeUdpClient
or
killall aseUdpServer 
or
killall aeUdpClient 
